I recently set up a bi-arch environment on i686-unknown-linux-gnu with --enable-targets=all to check which of a couple of problems I'm seeing on i386-pc-solaris2.1? are Solaris specific and which are generic. When trying to bootstrap such a compiler with all languages, Ada bootstrap failed compiling the 64-bit libada:
$ /var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc/xgcc -B/var/gcc/regression/trunk/2.6.18-gcc-gas-gld-32/build/./gcc/ -B/vol/gcc/i686-unknown-linux-gnu/bin/ -B/vol/gcc/i686-unknown-linux-gnu/lib/ -isystem /vol/gcc/i686-unknown-linux-gnu/include -isystem /vol/gcc/i686-unknown-linux-gnu/sys-include -c -g -O2 -m64 -fpic -W -Wall -gnatpg -nostdinc -m64 a-finali.adb -o a-finali.o a-finali.ads:64:09: alignment for "Controlledb64s" must be at least 8 a-finali.ads:64:09: alignment for "Controlledr62s" must be at least 8 a-finali.ads:64:09: alignment for "Controlledt59s" must be at least 8 a-finali.ads:70:09: alignment for "Limited_Controlledb98s" must be at least 8 a-finali.ads:70:09: alignment for "Limited_Controlledr96s" must be at least 8 a-finali.ads:70:09: alignment for "Limited_Controlledt93s" must be at least 8 It turned out that this configuration incorrectly used system-linux-x86.ads for both multilibs. The following patch fixes this and allowed (together with a libffi and libjava patch to be submitted shortly) the bootstrap to complete. Ok for mainline? Rainer 2011-12-13 Rainer Orth <r...@cebitec.uni-bielefeld.de> * gcc-interface/Makefile.in (%86 linux%): (LIBGNAT_TARGET_PAIRS_32): Split off from LIBGNAT_TARGET_PAIRS. (LIBGNAT_TARGET_PAIRS_64): New. (LIBGNAT_TARGET_PAIRS): Add either depending on multilib.
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1102,9 +1102,21 @@ ifeq ($(strip $(filter-out %86 linux%,$( a-exetim.ads<a-exetim-default.ads \ s-linux.ads<s-linux.ads \ s-osinte.adb<s-osinte-posix.adb \ - system.ads<system-linux-x86.ads \ - $(ATOMICS_TARGET_PAIRS) \ - $(X86_TARGET_PAIRS) + $(ATOMICS_TARGET_PAIRS) + + LIBGNAT_TARGET_PAIRS_32 = \ + $(X86_TARGET_PAIRS) \ + system.ads<system-linux-x86.ads + + LIBGNAT_TARGET_PAIRS_64 = \ + $(X86_64_TARGET_PAIRS) \ + system.ads<system-linux-x86_64.ads + + ifeq ($(strip $(MULTISUBDIR)),/64) + LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_64) + else + LIBGNAT_TARGET_PAIRS += $(LIBGNAT_TARGET_PAIRS_32) + endif ifeq ($(strip $(filter-out xenomai,$(THREAD_KIND))),) LIBGNAT_TARGET_PAIRS += \
-- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University