DMD in Cygwin linking with ELF objects
Benji Smith
dlanguage at benjismith.net
Mon Oct 13 15:37:10 PDT 2008
Gregor Richards wrote:
> Simon Lehmayr wrote:
>> Is there a possiblity to get a cygwin compatible D compiler binary
>> which creates ELF objects just as the pure Linux version does from
>> DigitalMars?
>> As far as I know the cygwin-included GDC is ancient, the current GDC
>> is not really finished (lots of bugs remain) and the windows DMD only
>> produces some strange OMF object format. I need ELF objects to link
>> with my project using cygwin on Windows.
>>
>
> ... what? Cygwin doesn't use ELF, so unless you're using something
> really strange like my ELF-on-Windows environment something is wrong here.
>
> - Gregor Richards
I think the idea was to produce linux binaries from a compiler on a
windows system.
It'd be very cool (and personally, I see no reason it ought to depend on
cygwin). A compiler should not be dependent upon its environment to
produce compatible binaries.
In an ideal world, I'd just tell the compiler to use its linux backend
rather than its windows backend (and to link with linux libraries,
located in a directory of my choice). There's no hard and fast reason
why the reverse couldn't be true as well, compiling windows binaries
from a linux machine.
(NOTE: I am not actually *suggesting* this, because I realize it'd be a
gargantuan amount of work. I've just been thinking about this lately,
because I need to produce multi-platform binaries, and I'd rather do all
my compilation in one place, even if I still need to run acceptance
tests on those other platforms.)
--benji
More information about the Digitalmars-d
mailing list