Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 469154 - sys-devel/gcc-4.2.4-r01.4 fails to build on Cygwin
Summary: sys-devel/gcc-4.2.4-r01.4 fails to build on Cygwin
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords: Bug, PATCH
Depends on:
Blocks:
 
Reported: 2013-05-09 10:26 UTC by Richard Yao (RETIRED)
Modified: 2017-07-18 08:53 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
sys-devel/gcc-4.2.4-r01.4 failure log (build.log.xz,44.38 KB, text/plain)
2013-05-09 10:26 UTC, Richard Yao (RETIRED)
Details
configure{,.ac} patch to fix libiberty builds (gcc-4.2.4-cygwin-fix-libiberty.patch,2.62 KB, patch)
2013-05-09 10:28 UTC, Richard Yao (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao (RETIRED) gentoo-dev 2013-05-09 10:26:27 UTC
Created attachment 347812 [details]
sys-devel/gcc-4.2.4-r01.4 failure log

GCC's build system was patched upstream to omit checks for strsignal() and psignal() on Cygwin. This causes a failure when building libiberty because libiberty will then define its own functions for strsignal() and psignal(), which are already provided by Cygwin's libc. The build fails before the linker is invoked because Cygwin's headers define incompatible prototypes.

A comment included in the code that omits these checks suggests that this (somehow?) works when building Cygwin itself because one of Cygwin's components links to libiberty. Unfortunately, this makes no sense when building a standalone GCC. Removing the code in question fixes the problem.
Comment 1 Richard Yao (RETIRED) gentoo-dev 2013-05-09 10:28:17 UTC
Created attachment 347814 [details, diff]
configure{,.ac} patch to fix libiberty builds

This patch fixes the problem on sys-devel/gcc-4.2.4-r01.4. A similar patch is probably needed on other versions of GCC, but I have not gotten far enough in the bootstrap process to encounter that issue yet.
Comment 2 Richard Yao (RETIRED) gentoo-dev 2013-05-09 10:38:28 UTC
This hack is no longer present in the upstream repositories' GCC 4.3.x branch, so there should be no need to port this patch to other versions of GCC. Ignore my previous comment about needing a similar patch on other versions of GCC.
Comment 3 Michael Haubenwallner (RETIRED) gentoo-dev 2017-07-18 08:53:34 UTC
Cygwin (x64) support was integrated in Prefix in 2016, using something newer than gcc-4.2.