diff options
author | Ben Wolsieffer <benwolsieffer@gmail.com> | 2019-08-12 18:59:01 -0400 |
---|---|---|
committer | Ben Wolsieffer <benwolsieffer@gmail.com> | 2020-03-04 16:12:36 -0500 |
commit | e1831ebea3bcb415800a74fe458f802e63549e1c (patch) | |
tree | acb6446926815c4f32a4e7ae1ad825b4b336167f /pkgs/development/compilers/gcc | |
parent | 85befe90b0e041984c1d5d3116385ae49f0ecf88 (diff) | |
download | nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar.gz nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar.bz2 nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar.lz nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar.xz nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.tar.zst nixlib-e1831ebea3bcb415800a74fe458f802e63549e1c.zip |
gcc: move target-specific runtime libraries to separate output
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/builder.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 07a003691d6b..579378764f0d 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -133,7 +133,7 @@ if test "$noSysDirs" = "1"; then if test "$crossStageStatic" == 1; then # We don't want the gcc build to assume there will be a libc providing - # limits.h in this stagae + # limits.h in this stage makeFlagsArray+=( 'LIMITS_H_TEST=false' ) @@ -203,31 +203,31 @@ postConfigure() { preInstall() { # Make ‘lib64’ symlinks to ‘lib’. if [ -n "$is64bit" -a -z "$enableMultilib" ]; then - mkdir -p "$out/lib" - ln -s lib "$out/lib64" - mkdir -p "$lib/lib" - ln -s lib "$lib/lib64" + mkdir -p "$out/${targetConfig}/lib" + ln -s lib "$out/${targetConfig}/lib64" + mkdir -p "$lib/${targetConfig}/lib" + ln -s lib "$lib/${targetConfig}/lib64" fi } postInstall() { # Move runtime libraries to $lib. - moveToOutput "lib/lib*.so*" "$lib" - moveToOutput "lib/lib*.la" "$lib" - moveToOutput "lib/lib*.dylib" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib/lib*.so*" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib/lib*.la" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dylib" "$lib" moveToOutput "share/gcc-*/python" "$lib" - for i in "$lib"/lib/*.{la,py}; do + for i in "$lib/${targetConfig}"/lib/*.{la,py}; do substituteInPlace "$i" --replace "$out" "$lib" done if [ -n "$enableMultilib" ]; then - moveToOutput "lib64/lib*.so*" "$lib" - moveToOutput "lib64/lib*.la" "$lib" - moveToOutput "lib64/lib*.dylib" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.so*" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.la" "$lib" + moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.dylib" "$lib" - for i in "$lib"/lib64/*.{la,py}; do + for i in "$lib/${targetConfig}"/lib64/*.{la,py}; do substituteInPlace "$i" --replace "$out" "$lib" done fi |