AMD64 Linux
Thomas Kuehne
thomas-dloop at kuehne.cn
Thu Aug 24 12:45:22 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Demme schrieb am 2006-08-24:
> Thomas Kuehne wrote:
>
>> 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
>> #
> You are correct: the gdc -m32 -v was lacking the --32 on the as line. The
> direct GCC invocation worked correctly.
Try:
#
# gdc -m32 -Wa,--32 test.d
#
> Who is maintaining GDC these days that I might contact?
Please use the usuall bugzilla.
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFE7g7ZLK5blCcjpWoRAs1eAKCK7xvBBfXnUlpXxJl3+VB44iVhpgCfTZ2V
J9jnUiwYI93xXY/AU818Bfw=
=BwZP
-----END PGP SIGNATURE-----
More information about the D.gnu
mailing list