From efcad4c910a271e846f1d274fe297a83ba97b3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 25 Oct 2015 11:38:07 +0100 Subject: [PATCH] gcc5: split $doc into $man and $info ... because cc-wrapper is meant to propagate man pages into user envs, and info pages are rather large. Also replace the duplicate g++ and gcc man1 pages by a symlink. --- pkgs/build-support/cc-wrapper/default.nix | 2 +- pkgs/development/compilers/gcc/5/default.nix | 2 +- pkgs/development/compilers/gcc/builder.sh | 19 ++++++++++--------- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 8bb215947b0..0c7bf5b667f 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -140,7 +140,7 @@ stdenv.mkDerivation { # Propagate the wrapped cc so that if you install the wrapper, # you get tools like gcov, the manpages, etc. as well (including # for binutils and Glibc). - echo ${cc} ${binutils_bin} ${libc_bin} > $out/nix-support/propagated-user-env-packages + echo ${cc} ${cc.man or ""} ${binutils_bin} ${libc_bin} > $out/nix-support/propagated-user-env-packages echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs '' diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index a02a59c4347..2a5b43a871f 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -215,7 +215,7 @@ stdenv.mkDerivation ({ inherit patches; - outputs = [ "out" "lib" "doc" ]; + outputs = [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index bfe3b6a559f..2f19f4219da 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -211,16 +211,14 @@ preInstall() { postInstall() { # Move runtime libraries to $lib. - mkdir -p $lib/lib - ln -s lib $lib/lib64 - mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ - for i in $lib/lib/*.la; do - substituteInPlace $i --replace $out $lib - done + _moveToOutput "lib/lib*.so*" "$lib" + _moveToOutput "lib/lib*.la" "$lib" + ln -s lib "$lib/lib64" # for *.la + _moveToOutput "share/gcc-*/python" "$lib" - # Remove precompiled headers for now. They are very big and - # probably not very useful yet. - find $out/include -name "*.gch" -exec rm -rf {} \; -prune + for i in "$lib"/lib/*.{la,py}; do + substituteInPlace "$i" --replace "$out" "$lib" + done # Remove `fixincl' to prevent a retained dependency on the # previous gcc. @@ -266,6 +264,9 @@ postInstall() { paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus} eval "$postInstallGhdl" + + # Two identical man pages are shipped (moving and compressing is done later) + ln -sf gcc.1 "$out"/share/man/man1/g++.1 } genericBuild