Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes: > 2009/4/22 Ian Lance Taylor: >> Jonathan Wakely writes: >> >>> I tried to build the 4.4.0-RC-20090414 on Solaris x86, configured with >>> >>> /var/tmp/build-gcc/gcc-4.4.0-RC-20090414/configure >>> --prefix=/opt/gcc/32-bit/4.4.0-RC-20090414 --enable-languages=c,c++ >>> --with-gnu-as --with-as=/var/tmp/build-gcc/binutils_2.18/bin/as >>> --with-ld=/usr/ccs/bin/ld --with-gmp=/var/tmp/build-gcc/stage >>> --with-mpfr=/var/tmp/build-gcc/stage --build=i686-pc-solaris2.10 >>> --with-arch-32=pentium4 --with-system-zlib --enable-shared >>> --enable-threads=posix --enable-nls --enable-libstdcxx-debug >>> >>> where the 'stage' dir contains gmp and mpfr installations, built with >>> --disable-shared. The --with-as path is a symlink to the real binutils >>> dir, I realise I don't want to use that /var/tmp path in a real build, >>> but I'm just trying to get my build script working for now. >> >>> ld: fatal: symbol `__i686.get_pc_thunk.bx' is multiply-defined: >>> (file /var/tmp/build-gcc/gcc/./gcc/crtbegin.o type=FUNC; file >>> _enable_execute_stack_s.o type=FUNC); >> >> This means that the configure script thought that hidden linkonce >> symbols were supported, but for some reason they are not working. This >> could happen if the configure script used one linker and the build used >> another, but that shouldn't happen with the above configure command. I >> guess look at config.log to see the test used to set >> USE_HIDDEN_LINKONCE, and compare it to the object files which are >> failing to link. > > Further investigation shows that this problem only happens with > --build=i686-pc-solaris2.10, without that the thunks are not emitted, > and so there's no problem. > > gcc_cv_as_hidden is set conditionally after checking for a suitable > version of GNU as. For my build (using GNU as from binutils 2.18) that > gets set to yes. > > gcc/configure assumes that the linker always supports hidden symbols > for ,*-*-solaris2.9* or *-*-solaris2.1[0-9]*, so sets > gcc_cv_ld_hidden=yes (this is what changed since 4.3.2, which always > set it to no.) > > Should I enter a bug or is --build=i686-pc-solaris2.10 not supported? > My configuration used to work with 4.3.2 and seems to fail because > gcc/configure now makes wrong assumptions. Thanks for investigating this. It sounds to me like you are saying that gcc/configure.ac is incorrect in assuming that the i686-pc-solaris2.10 linker always supports hidden symbols. If that is correct, then it seems like a bug report would be appropriate. The change was made by Rainer Orth, and I've CC'ed him. Ian