Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions create_dmd_release/create_dmd_release.d
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ void buildAll(Bits bits, string branch, bool dmdOnly=false)
auto hostDMDEnv = " HOST_DC="~hostDMD;
auto isRelease = " RELEASE=1";
auto latest = " LATEST="~branch;
// PIC libraries on amd64 for PIE-by-default distributions, see Bugzilla 16794
version (linux)
auto pic = bits == Bits.bits64 ? " PIC=1" : "";
else
auto pic = "";

// common make arguments
auto makecmd = make~jobs~makeModel~dmdEnv~hostDMDEnv~isRelease~latest~" -f "~targetMakefile;
Expand Down Expand Up @@ -474,13 +479,13 @@ void buildAll(Bits bits, string branch, bool dmdOnly=false)

info("Building Druntime "~bitsDisplay);
changeDir(cloneDir~"/druntime");
run(makecmd~msvcEnv~makeTargetDruntime);
run(makecmd~pic~msvcEnv~makeTargetDruntime);
removeFiles(cloneDir~"/druntime", "*{"~obj~"}", SpanMode.depth,
file => !file.baseName.startsWith("gcstub", "minit"));

info("Building Phobos "~bitsDisplay);
changeDir(cloneDir~"/phobos");
run(makecmd~msvcEnv);
run(makecmd~pic~msvcEnv);

version(OSX) if(bits == Bits.bits64)
{
Expand Down
2 changes: 1 addition & 1 deletion linux/dmd_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ else
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/i386-linux-gnu -L--export-dynamic

[Environment64]
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/x86_64-linux-gnu -L--export-dynamic
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/x86_64-linux-gnu -L--export-dynamic -fPIC
' | sed 's/^\t//' > etc/dmd.conf


Expand Down
2 changes: 1 addition & 1 deletion linux/dmd_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ do
then
echo -en '
[Environment64]
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib64 -L--export-dynamic
DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib64 -L--export-dynamic -fPIC
' | sed 's/^\t\t\t//' >> etc/dmd.conf
fi

Expand Down