Lack of 64bit support breaks -run
Russ Lewis
spamhole-2001-07-16 at deming-os.org
Mon May 22 12:44:44 PDT 2006
Since dmd can't link properly on AMD64 linux, I can't use -run.
It has occurred to me that one (simple) solution to this would be to add
an argument to dmd which it would pass to gcc, so that I could pass
-m32. I tried using -L, but that passes the argument
-Xlinker -m32
to gcc rather than what I'm attempting to pass, which is simply
-m32
Russ
Russ Lewis wrote:
> I recently upgraded to an Athlon 64, and installed Fedora Core 5 with
> the AMD64 kernel. This broke my D applications, because Phobos is
> released as a 32-bit library. I am writing this partly as an FYI for
> anybody else who hits this problem, and partly as a request to Walter
>
>
> TO MAKE THINGS WORK:
>
> You need to pass -m32 to gcc. Most importantly, you need to do that at
> the link step. So, if you're like me, and you used to use dmd to link,
> then you'll see something like this:
> dmd ...FILES... -ofcebu
> gcc ...FILES... -o cebu -lphobos -lpthread -lm
> /usr/bin/ld: skipping incompatible /usr/lib/libphobos.a when
> searching for -lphobos
> /usr/bin/ld: cannot find -lphobos
>
> Basically, you need to change your Makefile to call gcc directly, and
> pass it the -m32 argument:
> gcc -m32 ...FILES... -o cebu -lphobos -lpthread -lm
>
> Also, if you link with any C files, then you need to pass -m32 to gcc
> when you build those as well.
>
>
>
> FOR WALTER:
>
> I don't know how much this would take, but it would be really nice if
> you released a 64-bit version of Phobos, as well as the 32-bit one. I
> suppose that this would mean that the compiler would need to be able to
> produce 64-bit ELF files.
>
> But, I realize that this is probably low on the priority list. That is
> probably as it should be.
More information about the Digitalmars-d-bugs
mailing list