AMD64 Linux

John Demme me at teqdruid.com
Thu Aug 24 04:27:22 PDT 2006


Thomas Kuehne wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> It seems like the -m32 has been lost in the tool chain. test.s is
> 32bit but the compiler seems to use the 64bit assembly driver...
> 
> #
> # gdc -v -m32 test.s -o test -lm -lgcc -lpthread -lgphobos
> # -L/where/ever/gphobos/is ./test
> # > Hello
> #
> 
> The above should succeed and print:
> #
> # Reading specs from
> # /opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/specs Reading
> # specs from /lib/libgphobos.spec rename spec lib to liborig
> # Configured with: ./configure --prefix=/opt/gdc/gdc-0.19
> # --enable-languages=c,d
> # --enable-checking=misc,tree,gc,rtl,rtlflag,fold,gcac Thread model: posix
> # gcc version 3.4.6 (Gentoo Hardened 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
> # (gdc 0.19, using dmd 0.162)
> #  as -V -Qy --32 -o /tmp/ccQi0vUU.o a.s
> # GNU assembler version 2.16.1 (x86_64-pc-linux-gnu) using BFD version
> # 2.16.1
> # /opt/gdc/gdc-0.19/libexec/gcc/x86_64-unknown-linux-gnu/3.4.6/collect2
> # --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -pie -z
> # relro -z now -o test /usr/lib/../lib32/Scrt1.o /usr/lib/../lib32/crti.o
> # /opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/32/crtbeginS.o
> # -L/where/ever/gphobos/is
> # -L/opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/32
> # -L/opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6
>
# -L/opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/../../../../lib32
> # -L/opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/../../..
> # -L/lib/../lib32 -L/usr/lib/../lib32 /tmp/ccQi0vUU.o -lgcc -lpthread
> # -lgphobos -lgphobos -lm -lgcc_s_32 -lgcc -lm -lpthread -lc -lgcc_s_32
> # -lgcc
> # /opt/gdc/gdc-0.19/lib/gcc/x86_64-unknown-linux-gnu/3.4.6/32/crtendS.o
> # /usr/lib/../lib32/crtn.o
> #
> 
> If that fails - most likely the "--32" in the "as" line is missing - it is
> a GDC bug.
> 
> The following should always succeed:
> #
> # gcc -v -m32 test.s -o test -lm -lgcc -lpthread -lgphobos
> # -L/where/ever/gphobos/is ./test
> # > Hello
> #
> 
> Thomas
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iD8DBQFE7axaLK5blCcjpWoRAn7eAJ0QaoZOeKGXgBsMZHGwdzwZ04TYtQCgl7TG
> FGCHD7eIBgfLCht/xliwcXA=
> =5eOt
> -----END PGP SIGNATURE-----

You are correct: the gdc -m32 -v was lacking the --32 on the as line.  The
direct GCC invocation worked correctly.

Who is maintaining GDC these days that I might contact?

Thanks a ton.

-- 
~John Demme
me at teqdruid.com
http://www.teqdruid.com/



More information about the D.gnu mailing list