You can compile but not link. Maybe you need and extra package for the linker.
$ gcc -m32 foo.c /usr/local/bin/ld: skipping incompatible /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd11.0/4.8.5/libgcc.a when searching for -lgcc /usr/local/bin/ld: skipping incompatible //usr/lib/libgcc.a when searching for -lgcc /usr/local/bin/ld: cannot find -lgcc /usr/local/bin/ld: skipping incompatible /usr/local/lib/gcc48/gcc/x86_64-portbld-freebsd11.0/4.8.5/../../../libgcc_s. so when searching for -lgcc_s /usr/local/bin/ld: skipping incompatible //usr/lib/libgcc_s.so when searching for -lgcc_s /usr/local/bin/ld: cannot find -lgcc_s /usr/local/bin/ld: skipping incompatible /lib/libc.so.7 when searching for /lib/libc.so.7 /usr/local/bin/ld: cannot find /lib/libc.so.7 /usr/local/bin/ld: skipping incompatible /usr/lib/libc_nonshared.a when searching for /usr/lib/libc_nonshared.a /usr/local/bin/ld: cannot find /usr/lib/libc_nonshared.a /usr/local/bin/ld: skipping incompatible /usr/lib/libssp_nonshared.a when searching for /usr/lib/libssp_nonshared.a /usr/local/bin/ld: cannot find /usr/lib/libssp_nonshared.a collect2: error: ld returned 1 exit status -----Original Message----- From: Tinycc-devel [mailto:[email protected]] On Behalf Of Michael Matz Sent: lundi 24 octobre 2016 18:02 To: [email protected] Subject: Re: [Tinycc-devel] core dump on FreeBSD with last commit "configure: --triplet= option, Makefile: cleanup" Hi, On Thu, 20 Oct 2016, Christian Jullien wrote: > I'm sure you'll not believe me, but it's NOT an April Fool. > > $ uname -a > FreeBSD freebsd64.eligis.com 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 > #0 > r306420: Thu Sep 29 01:43:23 UTC 2016 > [email protected]:/usr/obj/usr/src/sys/GENERIC amd64 $ gcc > -m32 --print-file-name=crt1.o /usr/lib/crt1.o $ gcc -m64 > --print-file-name=crt1.o /usr/lib/crt1.o $ gcc > --print-file-name=crt1.o /usr/lib/crt1.o $ find /usr -name crt1.o > /usr/lib32/crt1.o /usr/lib/crt1.o Gnah! So they managed to break GCCs multi-lib support in subtle ways. Can you even build a hello world type program with "gcc -m32" on that system? Sigh. Okay, of course nothing is ever as simple :-/ :) Ciao, Michael. > > -----Original Message----- > From: Tinycc-devel > [mailto:[email protected]] > On Behalf Of Michael Matz > Sent: jeudi 20 octobre 2016 17:23 > To: [email protected] > Subject: Re: [Tinycc-devel] core dump on FreeBSD with last commit > "configure: --triplet= option, Makefile: cleanup" > > Hello Christian, > > On Wed, 19 Oct 2016, Christian Jullien wrote: > > > x86_64: > > $ uname -m > > amd64 > > $ gcc --print-file-name=crt1.o > > /usr/lib/crt1.o > > $ find /usr -name crt1.o > > /usr/lib32/crt1.o > > /usr/lib/crt1.o > > Aha! So they chose the opposite way to the linuxes. Okay, that > helps, thanks. Can you verify that > > % gcc -m32 --print-file-name=crt1.o > > gives /usr/lib32/crt1.o ? > > > Ciao, > Michael. > > _______________________________________________ > Tinycc-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > > > _______________________________________________ > Tinycc-devel mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
