Skip to content

Commit

Permalink
Merge pull request #207 from MartinNowak/fix16794
Browse files Browse the repository at this point in the history
fix Issue 16794 - .deb no working on Ubuntu 16.10
  • Loading branch information
MartinNowak authored Dec 25, 2016
2 parents 0b0425b + ca90c15 commit bd6e4c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit bd6e4c1

Please sign in to comment.