-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] gcc: put target-specific libs in lib output #58606
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 [[ -d "$out/$target_triple/lib" && -n "$(ls -A $out/$target_triple/lib)" ]]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i should check if |
||
moveToOutput "$target_triple/lib/lib*.so*" "$lib" | ||
moveToOutput "$target_triple/lib/lib*.la" "$lib" | ||
moveToOutput "$target_triple/lib/lib*.dylib" "$lib" | ||
mv "$lib/$target_triple"/lib/* "$lib/lib/" | ||
rmdir -p --ignore-fail-on-non-empty "$lib/$target_triple/lib" || : | ||
elif [[ -d "$out/$target_triple/lib64" && -n "$(ls -A $out/$target_triple/lib64)" ]]; then | ||
moveToOutput "$target_triple/lib64/lib*.so*" "$lib" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can remove the special handling of |
||
moveToOutput "$target_triple/lib64/lib*.la" "$lib" | ||
moveToOutput "$target_triple/lib64/lib*.dylib" "$lib" | ||
mv "$lib/$target_triple"/lib64/* "$lib/lib/" | ||
rmdir -p --ignore-fail-on-non-empty "$lib/$target_triple/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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use targetConfig below, actually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this also need to be done for later gccs (8, 9) for this PR to apply to them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but as @matthewbauer wrote, this variable should probably be removed replaced with
targetConfig
, which is already defined.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewbauer @lopsided98 I made a branch with this change applied (delete target_triple binding and use targetConfig in the script), and
master
merged: https://github.com/eamsden/nixpkgs/tree/eamsden/gcc-cross-contaminationIt fails with a long list of attempts to
mv
files to the same directory:(command:
nix-build ./. -A pkgsCross.armv7l-hf-multiplatform.buildPackages.gcc-unwrapped
)This same attribute path builds successfully (though of course with all the cross-contamination) on unpatched nixpkgs
master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targetConfig
is empty during native builds, so you need to add-n "${targetConfig}"
to the if statements in builder.shThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively you could just add
target_triple
to GCC 9 if that is easier.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one works: matthewbauer@16951cf