-m64 doesn't work?
Andre Tampubolon
andre at lc.vlsm.org
Sun Feb 12 00:26:09 PST 2012
When I was looking at dmd's options, I found this:
m64 generate 64 bit code
I guessed it behaves like gcc (m64 for 64 bit code and m32 for 32 bit code, assuming you have the multilibs), so I did a rebuild.
This is the structure of my /opt/dmd-dev
|-bin (64-bit version of dmd, impcnvgen, idgen, optabgen, plus dmd.conf)
|-import
|---core
|-----stdc
|-----sync
|-----sys
|-------osx
|---------mach
|-------posix
|---------arpa
|---------net
|---------netinet
|---------sys
|-------windows
|-lib32 (libdruntime-linux32.a and libphobos.a)
|-lib64 (libdruntime-linux64.a and libphobos.a)
|-phobos
|---std
|-----c
|-------freebsd
|-------linux
|-------osx
|-------windows
|-----internal
|-------math
|-------windows
|-----net
|-----windows
And this is my dmd.conf:
[Environment]
DFLAGS=-I/opt/dmd-dev/import -I/opt/dmd-dev/phobos -L-L/opt/dmd-dev/lib32 -L-L/opt/dmd-dev/lib64
dmd -32 works fine. But either dmd or dmd -m64 doesn't work, e.g:
$ dmd -m64 einstein2b.d
/usr/bin/ld: skipping incompatible /opt/dmd-dev/lib32//libphobos2.a when searching for -lphobos2
/usr/bin/ld: cannot find -lphobos2
collect2: ld returned 1 exit status
--- errorlevel 1
I wonder why ld searches at /opt/dmd-dev/lib32, whereas it should be /opt/dmd-dev/lib64 ?
More information about the Digitalmars-d
mailing list