[dmd-internals] Create a dmd-cxx branch on dlang/dmd

Sebastian Wilzbach seb at wilzba.ch
Wed Dec 13 19:41:11 UTC 2017


FYI: DMD has been using -fPIC by default on Linux x86_64 since 2.072.2 
too:

https://github.com/dlang/dmd/pull/6359

It's just that the Makefile scripts in dmd, druntime and phobos reset 
the predefined flags with `-conf=` (aka the backdoor) and thus a lot of 
manual updating was required.

On 2017-12-13 15:17, David Nadlinger via dmd-internals wrote:
> On 13 Dec 2017, at 14:09, Diederik de Groot via dmd-internals wrote:
>> On Wednesday, 13 December 2017 at 13:48:01 UTC, Sebastian Wilzbach 
>> wrote:
>>> […]
>>> So simply add -fPIC to DFLAGS or maybe even hard-code it like it's 
>>> done for macOS:
>>> 
>>> https://github.com/dlang/dmd/blob/master/src/ddmd/mars.d#L465
>> 
>> […]
>> 
>> Thanks for finding all the PR's related to this issue.
>> 
>> I will look into as soon as my current project is finished. Can only 
>> concentrate on one thing at a time :-)
> 
> Yep, just defaulting to -fPIC should be perfectly workable. LDC has
> been doing this since the first Ubuntu version requiring PIC was
> released (16.10?), and we haven't had any complaints so far. Since I'm
> not sure DMD has a way of negating -fPIC once it has been set, just
> adding it to the default config file is probably the best approach, as
> it leaves a backdoor open for users wanting to build non-PIC code.
> 
> Best,
> David
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals


More information about the dmd-internals mailing list