[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Gentoo GCC multilib
On 03/30/11 18:14, Vincent Rivière wrote:
> Alan Hourihane wrote:
>> bash# m68k-atari-mint-gcc -v -mshort -o main main.c
>
> The only significant difference I see is on the collect2 (ld wrapper)
> command line:
>
> Gentoo:
> -L/usr/lib/gcc/m68k-atari-mint/4.5.2
> -L/usr/lib/gcc/m68k-atari-mint/4.5.2/../../../../m68k-atari-mint/lib
>
> Cygwin:
> -L/opt/cross-mint/lib/gcc/m68k-atari-mint/4.5.2/mshort
> -L/opt/cross-mint/lib/gcc/m68k-atari-mint/4.5.2/../../../../m68k-atari-mint/lib/mshort
>
> -L/opt/cross-mint/lib/gcc/m68k-atari-mint/4.5.2
> -L/opt/cross-mint/lib/gcc/m68k-atari-mint/4.5.2/../../../../m68k-atari-mint/lib
>
>
> We can see that on Cygwin the mshort libdirs are prepended, while on
> Gentoo they are lost. Everything else is correct.
>
> If I'm not wrong that command line is built by the "gcc" command.
>
> Really, I wonder if Gentoo's multilib support has not been hacked to
> match their guidelines, something like Patrice's patch to avoid mixing
> different multilibs.
> I don't say multilib does not work on Gentoo, but maybe it works
> differently, so it may require different patching for MiNT.
>
This is a test using the native gcc on Gentoo with -m32 to compile a
32bit binary on a 64bit system. Notice that it does correctly append
"lib32" to the collect2 options.
I'll dig some more to see if it is Gentoo specific though.
bash# gcc -v -m32 -o main main.c -Wl,-t
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap
--disable-libssp --enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.4.5/python
--enable-checking=release --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.5
p1.2, pie-0.4.5'
Thread model: posix
gcc version 4.4.5 (Gentoo 4.4.5 p1.2, pie-0.4.5)
COLLECT_GCC_OPTIONS='-v' '-m32' '-o' 'main' '-mtune=generic'
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/cc1 -quiet -v -imultilib 32
main.c -D_FORTIFY_SOURCE=2 -quiet -dumpbase main.c -m32 -mtune=generic
-auxbase main -version -o /tmp/cc5zU8MQ.s
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include-fixed
/usr/include
End of search list.
GNU C (Gentoo 4.4.5 p1.2, pie-0.4.5) version 4.4.5 (x86_64-pc-linux-gnu)
compiled by GNU C version 4.4.5, GMP version 4.3.2, MPFR version
2.4.2-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ac66273e6e4bac18b794272374ef543f
COLLECT_GCC_OPTIONS='-v' '-m32' '-o' 'main' '-mtune=generic'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/as
-V -Qy --32 -o /tmp/ccj6QT1I.o /tmp/cc5zU8MQ.s
GNU assembler version 2.20.1 (x86_64-pc-linux-gnu) using BFD version
(GNU Binutils) 2.20.1.20100303
COMPILER_PATH=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/libexec/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-pc-linux-gnu/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/:/lib/../lib32/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-m32' '-o' 'main' '-mtune=generic'
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.4.5/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o main
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crt1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/crtbegin.o
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32
-L/lib/../lib32 -L/usr/lib/../lib32
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../.. /tmp/ccj6QT1I.o -t
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/crtend.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crtn.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../x86_64-pc-linux-gnu/bin/ld:
mode elf_i386
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crt1.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crti.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/crtbegin.o
/tmp/ccj6QT1I.o
-lgcc_s (/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/libgcc_s.so)
/lib32/libc.so.6
(/usr/lib32/libc_nonshared.a)elf-init.oS
/lib32/ld-linux.so.2
-lgcc_s (/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/libgcc_s.so)
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/32/crtend.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/../../../../lib32/crtn.o
Alan.