Thread overview | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 02, 2014 Cross Compiler | ||||
---|---|---|---|---|
| ||||
Is there a DMD cross compiler, or am I forced to use the GDC? I don't really mind using GDC, but I've always preferred DMD for some odd reason. I guess it has some good point, like faster compilation time and more up-to-date. |
March 02, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeroen Bollen | On Sunday, 2 March 2014 at 21:08:38 UTC, Jeroen Bollen wrote:
> Is there a DMD cross compiler, or am I forced to use the GDC? I don't really mind using GDC, but I've always preferred DMD for some odd reason. I guess it has some good point, like faster compilation time and more up-to-date.
I never tried for myself, but DMD is supposed to be able to be a cross compiler (see src/mars.h).
Of course this apply only if you are targeting x86 / x86_64. If you want an ARM cross compiler you have to stick with LDC / GDC AFAIK.
|
March 02, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mathias LANG | On Sunday, 2 March 2014 at 21:39:11 UTC, Mathias LANG wrote:
> On Sunday, 2 March 2014 at 21:08:38 UTC, Jeroen Bollen wrote:
>> Is there a DMD cross compiler, or am I forced to use the GDC? I don't really mind using GDC, but I've always preferred DMD for some odd reason. I guess it has some good point, like faster compilation time and more up-to-date.
>
> I never tried for myself, but DMD is supposed to be able to be a cross compiler (see src/mars.h).
> Of course this apply only if you are targeting x86 / x86_64. If you want an ARM cross compiler you have to stick with LDC / GDC AFAIK.
Am I correct saying no special flags are required?
|
March 02, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeroen Bollen | On Sunday, 2 March 2014 at 21:40:50 UTC, Jeroen Bollen wrote:
> On Sunday, 2 March 2014 at 21:39:11 UTC, Mathias LANG wrote:
>> On Sunday, 2 March 2014 at 21:08:38 UTC, Jeroen Bollen wrote:
>>> Is there a DMD cross compiler, or am I forced to use the GDC? I don't really mind using GDC, but I've always preferred DMD for some odd reason. I guess it has some good point, like faster compilation time and more up-to-date.
>>
>> I never tried for myself, but DMD is supposed to be able to be a cross compiler (see src/mars.h).
>> Of course this apply only if you are targeting x86 / x86_64. If you want an ARM cross compiler you have to stick with LDC / GDC AFAIK.
>
> Am I correct saying no special flags are required?
-m32 / -m64 control target platform for DMD. For ARM + GDC/LDC you should check their wiki's / manuals.
|
March 02, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Dicebot | On Sunday, 2 March 2014 at 21:49:28 UTC, Dicebot wrote:
> On Sunday, 2 March 2014 at 21:40:50 UTC, Jeroen Bollen wrote:
>> On Sunday, 2 March 2014 at 21:39:11 UTC, Mathias LANG wrote:
>>> On Sunday, 2 March 2014 at 21:08:38 UTC, Jeroen Bollen wrote:
>>>> Is there a DMD cross compiler, or am I forced to use the GDC? I don't really mind using GDC, but I've always preferred DMD for some odd reason. I guess it has some good point, like faster compilation time and more up-to-date.
>>>
>>> I never tried for myself, but DMD is supposed to be able to be a cross compiler (see src/mars.h).
>>> Of course this apply only if you are targeting x86 / x86_64. If you want an ARM cross compiler you have to stick with LDC / GDC AFAIK.
>>
>> Am I correct saying no special flags are required?
>
> -m32 / -m64 control target platform for DMD. For ARM + GDC/LDC you should check their wiki's / manuals.
Al right, thanks!
|
March 02, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeroen Bollen | If you want to build a Windows exe on Linux, you can also just run the windows version of dmd in wine. |
March 03, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | How to stop DMD from linking against any libraries? A simple program like this already links to quite a few libraries: > void main() > { > return; > } > linux-vdso.so.1 => (0x00007fffdf5fe000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3ba9433000) > libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3ba912f000) > librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3ba8f26000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3ba8b5e000) > /lib64/ld-linux-x86-64.so.2 (0x00007f3ba9679000) |
March 03, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeroen Bollen | On Monday, 3 March 2014 at 14:31:09 UTC, Jeroen Bollen wrote:
> How to stop DMD from linking against any libraries? A simple program like this already links to quite a few libraries:
>
>> void main()
>> {
>> return;
>> }
>
>> linux-vdso.so.1 => (0x00007fffdf5fe000)
>> libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3ba9433000)
>> libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3ba912f000)
>> librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3ba8f26000)
>> libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3ba8b5e000)
>> /lib64/ld-linux-x86-64.so.2 (0x00007f3ba9679000)
I'm guessing this is caused by the presence of the main method. Why would a single method require all those libraries though?
|
March 03, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jeroen Bollen | "Jeroen Bollen" wrote in message news:unvhloslmpxvxhawypoq@forum.dlang.org... > How to stop DMD from linking against any libraries? A simple program like this already links to quite a few libraries: The easiest way is to link yourself. You can run dmd with -v to get the link command and start from there. |
March 03, 2014 Re: Cross Compiler | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | On Monday, 3 March 2014 at 15:36:02 UTC, Daniel Murphy wrote:
>
> "Jeroen Bollen" wrote in message news:unvhloslmpxvxhawypoq@forum.dlang.org...
>
>> How to stop DMD from linking against any libraries? A simple program like this already links to quite a few libraries:
>
> The easiest way is to link yourself. You can run dmd with -v to get the link command and start from there.
Cheers
|
Copyright © 1999-2021 by the D Language Foundation