It turns out that bug #40959 actually is only one of two regressions that breaks bootstrap on FreeBSD/ia64. This is the other case. Since 2004-11-09 H.J. Lu <hongjiu.lu@intel.com> PR target/18380 * config/ia64/unwind-ia64.h (_Unwind_FindTableEntry): Mark it hidden. * unwind-dw2.c (_Unwind_FindTableEntry): Removed. _Unwind_FindTableEntry has been marked hidden which is okay for those cases where GCC defines the function but breaks FreeBSD which has this in libc.
Forgot to provide the actual failure mode: unwind-ia64_s.o(.text+0x30b2): In function `uw_frame_state_for': ../.././../gcc-4.5-20091112/libgcc/../gcc/config/ia64/unwind-ia64.c:1788: undefined reference to `_Unwind_FindTableEntry' unwind-ia64_s.o(.text+0x7632): In function `_Unwind_FindEnclosingFunction': ../.././../gcc-4.5-20091112/libgcc/../gcc/config/ia64/unwind-ia64.c:1745: undefined reference to `_Unwind_FindTableEntry' /usr/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `_Unwind_FindTableEntry' isn't defined collect2: ld returned 1 exit status gmake[3]: *** [libgcc_s.so] Error 1 gmake[3]: Leaving directory `/usr/ports/lang/gcc45/work/build/ia64-portbld-freebsd9.0/libgcc' gmake[2]: *** [all-stage1-target-libgcc] Error 2 gmake[2]: Leaving directory `/usr/ports/lang/gcc45/work/build' gmake[1]: *** [stage1-bubble] Error 2 gmake[1]: Leaving directory `/usr/ports/lang/gcc45/work/build' gmake: *** [bootstrap-lean] Error 2 *** Error code 1
4.3 branch is being closed, moving to 4.4.7 target.
This issue reappeared again. On FreeBSD 9.0-CURRENT ia64: gcc-4.7.0.20110730 builds fine. Updating to 4.7.0.20110827 gives this error again: gmake[3]: Leaving directory `/usr/ports/lang/gcc47/work/build/gcc' Checking multilib configuration for libgcc... gmake[3]: Entering directory `/usr/ports/lang/gcc47/work/build/ia64-portbld-freebsd9.0/libgcc' # If this is the top-level multilib, build all the other # multilibs. # Early copyback; see "all" above for the rationale. The # early copy is necessary so that the gcc -B options find # the right startup files when linking shared libgcc. /bin/sh ../.././../gcc-4.7-20110827/libgcc/../mkinstalldirs ../.././gcc parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o"; \ for file in $parts; do \ rm -f ../.././gcc/$file; \ install -o root -g wheel -m 444 $file ../.././gcc/; \ case $file in \ *.a) \ /usr/local/ia64-portbld-freebsd9.0/bin/ranlib ../.././gcc/$file ;; \ esac; \ done dest=../.././gcc/include/tmp$$-unwind.h; \ cp unwind.h $dest; \ chmod a+r $dest; \ sh ../.././../gcc-4.7-20110827/libgcc/../move-if-change $dest ../.././gcc/include/unwind.h # @multilib_flags@ is still needed because this may use # /usr/ports/lang/gcc47/work/build/./gcc/xgcc -B/usr/ports/lang/gcc47/work/build/./gcc/ -B/usr/local /ia64-portbld-freebsd9.0/bin/ -B/usr/local/ia64-portbld-freebsd9.0/lib/ -isystem /usr/local/ia64-por tbld-freebsd9.0/include -isystem /usr/local/ia64-portbld-freebsd9.0/sys-include and -O2 -I. -I. -I.././../gcc-4.7-20110827/gcc -I.././../gcc-4.7-20110827/gcc/. -I.././../gcc-4.7-20110827/gcc/../in clude -I.././../gcc-4.7-20110827/gcc/../libdecnumber -I.././../gcc-4.7-20110827/gcc/../libdecnumber/ dpd -I../libdecnumber -I.././../gcc-4.7-20110827/gcc/../libgcc -g -O2 -pipe -I/usr/local/include -fn o-strict-aliasing -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prot otypes -Wold-style-definition -isystem ./include -fPIC -pthread -g -DHAVE_GTHR_DEFAULT -DIN_LIBGC C2 -fbuilding-libgcc -fno-stack-protector directly. # @multilib_dir@ is not really necessary, but sometimes it has # more uses than just a directory name. /bin/sh ../.././../gcc-4.7-20110827/libgcc/../mkinstalldirs . /usr/ports/lang/gcc47/work/build/./gcc/xgcc -B/usr/ports/lang/gcc47/work/build/./gcc/ -B/usr/local/i a64-portbld-freebsd9.0/bin/ -B/usr/local/ia64-portbld-freebsd9.0/lib/ -isystem /usr/local/ia64-portb ld-freebsd9.0/include -isystem /usr/local/ia64-portbld-freebsd9.0/sys-include -O2 -I. -I. -I../. /../gcc-4.7-20110827/gcc -I.././../gcc-4.7-20110827/gcc/. -I.././../gcc-4.7-20110827/gcc/../include -I.././../gcc-4.7-20110827/gcc/../libdecnumber -I.././../gcc-4.7-20110827/gcc/../libdecnumber/dpd -I ../libdecnumber -I.././../gcc-4.7-20110827/gcc/../libgcc -g -O2 -pipe -I/usr/local/include -fno-stri ct-aliasing -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pthread -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -fb uilding-libgcc -fno-stack-protector -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version -script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -pipe -I/usr/local/include -fno-strict-aliasing -B. / __divxf3_s.o __divdf3_s.o __divsf3_s.o __divdi3_s.o __moddi3_s.o __udivdi3_s.o __umoddi3_s.o __div si3_s.o __modsi3_s.o __udivsi3_s.o __umodsi3_s.o __save_stack_nonlocal_s.o __nonlocal_goto_s.o __res tore_stack_nonlocal_s.o __trampoline_s.o _fixtfdi_s.o _fixunstfdi_s.o _floatditf_s.o _muldi3_s.o _ne gdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o enable-execute-stack_s.o unwind-ia64_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so unwind-ia64_s.o: In function `uw_frame_state_for': /usr/ports/lang/gcc47/work/build/ia64-portbld-freebsd9.0/libgcc/../.././../gcc-4.7-20110827/libgcc/config/ia64/unwind-ia64.c:1786: undefined reference to `_Unwind_FindTableEntry' unwind-ia64_s.o: In function `_Unwind_FindEnclosingFunction': /usr/ports/lang/gcc47/work/build/ia64-portbld-freebsd9.0/libgcc/../.././../gcc-4.7-20110827/libgcc/config/ia64/unwind-ia64.c:1738: undefined reference to `_Unwind_FindTableEntry' /usr/local/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `_Unwind_FindTableEntry' isn't defined /usr/local/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake[3]: *** [libgcc_s.so] Error 1
(In reply to comment #3) > This issue reappeared again. This issue never was gone for upstream GCC. I had a hack in the lang/gcc47 port on FreeBSD which worked around this which did not apply any more with the latest snapshot.
gcc-4.7.0.20111022 now builds fine on ia64
(In reply to comment #5) > gcc-4.7.0.20111022 now builds fine on ia64 Also if you remove files/patch-unwind-ia64.h from the lang/gcc47 port on FreeBSD which I assume you are using? In the context of upstream GCC -- that is here ;-) -- please always remove that one when reporting success or failure.
Yes, *without* files/patch-unwind-ia64.h. I've built and installed gcc-4.7.0.20111029
Cool, removing 4.7 from the list of regressing versions then (and removing that patch from the lang/gcc47 port in FreeBSD). I don't think this is ever going to be addressed for the older versions of GCC since nobody knows for sure how it was fixed and there have been a number of changes around ia64 in the last months. How is that best reflected in Bugzilla?
Fixed for 4.7.0, wontfix for earlier releases.
Failed again on 4.7-20111105: /usr/ports/lang/gcc47/work/build/ia64-portbld-freebsd9.9/libgcc/../.././../gcc-4.7-20111105/libgcc/onfig/ia64/unwind-ia64.c:1739: undefined reference to `_Unwind_FindTableEntry' /usr/local/bin/ld: ./libgcc_s.so.1.tmp: hidden symbol `_Unwind_FindTableEntry' isn't defined /usr/local/bin/ld: final link failed: Bad value collect2: error: ld returned 1 exit status gmake[3]: *** [libgcc_s.so] Error 1 gmake[3]: Leaving directory `/usr/ports/lang/gcc47/work/build/ia64-portbld-freebsd9.9/libgcc'