Skip to content

Commit

Permalink
gcj, gccgo: port fixes for 4.9 to 6
Browse files Browse the repository at this point in the history
Tested that pdftk builds on linux again, and gccgo6 builds hello-world.
The default gcc doesn't rebuild.

(cherry picked from commit 80c57fd)
  • Loading branch information
vcunat authored and dezgeg committed Oct 22, 2017
1 parent 52f381c commit 47d0cf7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions pkgs/development/compilers/gcc/6/default.nix
Expand Up @@ -217,7 +217,8 @@ stdenv.mkDerivation ({

inherit patches;

outputs = [ "out" "lib" "man" "info" ];
outputs = if langJava || langGo then ["out" "man" "info"]
else [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;

Expand Down Expand Up @@ -321,7 +322,11 @@ stdenv.mkDerivation ({
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
'';
''
+ stdenv.lib.optionalString (langJava || langGo) ''
export lib=$out;
''
;

dontDisableStatic = true;

Expand Down Expand Up @@ -563,4 +568,10 @@ stdenv.mkDerivation ({
// optionalAttrs (!stripped || targetPlatform != hostPlatform) { dontStrip = true; }

// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }

// optionalAttrs (langJava) {
postFixup = ''
target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
'';}
)

0 comments on commit 47d0cf7

Please sign in to comment.