Skip to content

Commit

Permalink
gcc: put target-specific libs in lib output
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Bauer <mjbauer95@gmail.com>
  • Loading branch information
illegalprime and matthewbauer committed Mar 4, 2020
1 parent ca7d439 commit 16951cf
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,24 @@ preInstall() {

postInstall() {
# Move runtime libraries to $lib.
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
if [[ -n "$targetConfig" && -d "$out/$targetConfig/lib" && -n "$(ls -A $out/$targetConfig/lib)" ]]; then
moveToOutput "$targetConfig/lib/lib*.so*" "$lib"
moveToOutput "$targetConfig/lib/lib*.la" "$lib"
moveToOutput "$targetConfig/lib/lib*.dylib" "$lib"
mv "$lib/$targetConfig"/lib/* "$lib/lib/"
rmdir -p --ignore-fail-on-non-empty "$lib/$targetConfig/lib" || :
elif [[ -n "$targetConfig" && -d "$out/$targetConfig/lib64" && -n "$(ls -A $out/$targetConfig/lib64)" ]]; then
moveToOutput "$targetConfig/lib64/lib*.so*" "$lib"
moveToOutput "$targetConfig/lib64/lib*.la" "$lib"
moveToOutput "$targetConfig/lib64/lib*.dylib" "$lib"
mv "$lib/$targetConfig"/lib64/* "$lib/lib/"
rmdir -p --ignore-fail-on-non-empty "$lib/$targetConfig/lib64" || :
else
moveToOutput "lib/lib*.so*" "$lib"
moveToOutput "lib/lib*.la" "$lib"
moveToOutput "lib/lib*.dylib" "$lib"
fi

moveToOutput "share/gcc-*/python" "$lib"

for i in "$lib"/lib/*.{la,py}; do
Expand Down

0 comments on commit 16951cf

Please sign in to comment.