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.
This commit is contained in:
Vladimír Čunát 2015-10-25 11:38:07 +01:00
parent 55d129609d
commit efcad4c910
3 changed files with 12 additions and 11 deletions

View File

@ -140,7 +140,7 @@ stdenv.mkDerivation {
# Propagate the wrapped cc so that if you install the wrapper, # Propagate the wrapped cc so that if you install the wrapper,
# you get tools like gcov, the manpages, etc. as well (including # you get tools like gcov, the manpages, etc. as well (including
# for binutils and Glibc). # 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 echo ${toString extraPackages} > $out/nix-support/propagated-native-build-inputs
'' ''

View File

@ -215,7 +215,7 @@ stdenv.mkDerivation ({
inherit patches; inherit patches;
outputs = [ "out" "lib" "doc" ]; outputs = [ "out" "lib" "man" "info" ];
setOutputFlags = false; setOutputFlags = false;
NIX_NO_SELF_RPATH = true; NIX_NO_SELF_RPATH = true;

View File

@ -211,16 +211,14 @@ preInstall() {
postInstall() { postInstall() {
# Move runtime libraries to $lib. # Move runtime libraries to $lib.
mkdir -p $lib/lib _moveToOutput "lib/lib*.so*" "$lib"
ln -s lib $lib/lib64 _moveToOutput "lib/lib*.la" "$lib"
mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ ln -s lib "$lib/lib64" # for *.la
for i in $lib/lib/*.la; do _moveToOutput "share/gcc-*/python" "$lib"
substituteInPlace $i --replace $out $lib
done
# Remove precompiled headers for now. They are very big and for i in "$lib"/lib/*.{la,py}; do
# probably not very useful yet. substituteInPlace "$i" --replace "$out" "$lib"
find $out/include -name "*.gch" -exec rm -rf {} \; -prune done
# Remove `fixincl' to prevent a retained dependency on the # Remove `fixincl' to prevent a retained dependency on the
# previous gcc. # previous gcc.
@ -266,6 +264,9 @@ postInstall() {
paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus} paxmark r $out/libexec/gcc/*/*/{cc1,cc1plus}
eval "$postInstallGhdl" 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 genericBuild