Bug 38903 - Bootstrap failure on Cygwin vs. libiberty.
Summary: Bootstrap failure on Cygwin vs. libiberty.
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.4
: P3 normal
Target Milestone: 4.3.4
Assignee: Dave Korn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-18 00:29 UTC by Dave Korn
Modified: 2009-07-30 10:24 UTC (History)
1 user (show)

See Also:
Host: i686-pc-cygwin
Target: i686-pc-cygwin
Build: i686-pc-cygwin
Known to work:
Known to fail:
Last reconfirmed: 2009-07-29 09:27:57


Attachments
Remove troublesome clause from libiberty configure (753 bytes, patch)
2009-01-18 00:31 UTC, Dave Korn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Korn 2009-01-18 00:29:17 UTC
[refs: http://gcc.gnu.org/ml/gcc/2009-01/threads.html#00060
       http://gcc.gnu.org/ml/gcc/2009-01/threads.html#00216 ]

Bootstrap on cygwin is currently failing during stage 3 with:

	  /home/andy/live-gcc/my_gcc/./gcc/xgcc
-B/home/andy/live-gcc/my_gcc/./gcc/ -B/usr/local/i686-pc-cygwin/bin/
-B/usr/local/i686-pc-cygwin/lib/ -isystem
/usr/local/i686-pc-cygwin/include -isystem
/usr/local/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -g -O2    -I.
-I../../../gcc/libiberty/../include  -W -Wall -Wwrite-strings
-Wc++-compat -Wstrict-prototypes -pedantic
../../../gcc/libiberty/strsignal.c -o pic/strsignal.o; \
	else true; fi
/home/andy/live-gcc/my_gcc/./gcc/xgcc
-B/home/andy/live-gcc/my_gcc/./gcc/ -B/usr/local/i686-pc-cygwin/bin/
-B/usr/local/i686-pc-cygwin/lib/ -isystem
/usr/local/i686-pc-cygwin/include -isystem
/usr/local/i686-pc-cygwin/sys-include -c -DHAVE_CONFIG_H -g -O2    -I.
-I../../../gcc/libiberty/../include  -W -Wall -Wwrite-strings
-Wc++-compat -Wstrict-prototypes -pedantic
../../../gcc/libiberty/strsignal.c -o strsignal.o
../../../gcc/libiberty/strsignal.c:408: error: conflicting types for 'strsignal'
/usr/include/string.h:78: note: previous declaration of 'strsignal' was here
make[2]: *** [strsignal.o] Error 1
make[2]: Leaving directory `/home/andy/live-gcc/my_gcc/i686-pc-cygwin/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/home/andy/live-gcc/my_gcc'
make: *** [all] Error 2

This happens because libiberty configure has a hard-coded hack that kicks in when building libiberty as a target library, which causes strsignal (and a couple of others) to be removed from the list of functions for configure to check against the system libraries, causing the libiberty versions to be built when they aren't needed.  (They used to be required; formerly, Cygwin pulled in the object files from libiberty when linking the DLL, but this was fixed some time ago and the hack has been obsolete since then).  I am testing a patch to remove the hack.
Comment 1 Dave Korn 2009-01-18 00:31:58 UTC
Created attachment 17131 [details]
Remove troublesome clause from libiberty configure

Now testing vs. both src/ and gcc/
Comment 2 Dave Korn 2009-01-18 21:40:12 UTC
Fixed on HEAD by r.143487; sorry, forgot to put the PR/ reference in the SVN logfile.
Comment 3 Dave Korn 2009-01-26 09:48:03 UTC
http://gcc.gnu.org/ml/gcc/2009-01/msg00367.html
Confirmed by OP.
Comment 4 Dave Korn 2009-07-29 09:23:51 UTC
Reopening against 4.3.4 RC 20090727.
Comment 5 Dave Korn 2009-07-29 11:45:43 UTC
Subject: Bug 38903

Author: davek
Date: Wed Jul 29 11:45:30 2009
New Revision: 150209

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150209
Log:
	PR bootstrap/38903: Backport fix from HEAD.
	* configure.ac (funcs, vars, checkfuncs): Don't munge on Cygwin,
	as it no longer shares libiberty object files.
	* configure: Regenerated.


Modified:
    branches/gcc-4_3-branch/libiberty/ChangeLog
    branches/gcc-4_3-branch/libiberty/configure
    branches/gcc-4_3-branch/libiberty/configure.ac

Comment 6 Dave Korn 2009-07-29 12:08:24 UTC
Fixed on gcc-4_3-branch.
Not present on gcc-4_4-branch, fix was applied to HEAD before branching.