Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #967 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

issue with makefile for dmd on 64-bit linux

Reported by: Lutger Assigned to: sean
Priority: major Milestone: 0.99.6
Component: Core Functionality Version: trunk
Keywords: Cc:

Description

Compiling on a 64-bit linux system with dmd results in a couple of objects files to be compiled in 64-bit mode. These are compiled from c by gcc.

I could resolve the issue by adding -m32 to CFLAGS in /lib/compiler/dmd/posix.mak

Change History

03/07/08 17:17:00 changed by sean

  • status changed from new to assigned.

To do this, -m32 should be added to ADD_CFLAGS in the top-level DMD makefile for Posix. I believe it's already in ADD_DFLAGS. If not, it should be there as well.

03/29/08 12:52:22 changed by Lutger

Is the top-level DMD makefile /trunk/lib/dmd-posix.mak? -m32 is already specified for ADD_CFLAGS but not for ADD_DFLAGS. I tried adding -L-m32 to ADD_DFLAGS but that didn't work.

My guess is that this line in dmd-posix.mak: (I don't know anything about makefiles actually)

make -C $(DIR_RT) -fposix.mak lib

should be:

make -C $(DIR_RT) -fposix.mak lib DC=$(DC) ADD_DFLAGS="$(ADD_DFLAGS)" ADD_CFLAGS="$(ADD_CFLAGS)"

04/01/08 22:10:26 changed by sean

Oops, I bet you're right.

04/16/08 23:21:46 changed by sean

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [3436]) Added ADD_CFLAGS and ADD_DFLAGS params to compiler build process. This should sort out the -m32 issue on linux/x86-64. I can't recall if there was any reason for these flags not to be passed before, but it seems like thre should be no problems to do so. This closes #967