Fix build of 3 perl packages with ld-is-cc-hook#32830
Merged
vcunat merged 3 commits intoNixOS:stagingfrom Dec 19, 2017
Merged
Conversation
for occasional convenience while looking at drv paths, such as in the output of nix-build and nix-diff.
This hook sets LD to CC, for use with software that works as if LD=$CC when LD is unset, and does not work when LD=ld.
after NixOS#29396 removed `-L path/to/dir/of/libstdc++.so` from ld flags See NixOS#29396 (comment) Module::Build build helper works correctly when LD is unset (taking LD from Perl config to be `cc`). However, we can not unset LD because this goes contrary to the cross compilation effort, and we can not make it propagate ld-is-cc-hook because it breaks e.g. the build of `libguestfs`. However, NixOS#29396 makes LD=ld incompatible with just 3 perl packages; they are individually fixed by this commit.
8 tasks
Contributor
Author
|
A setup hook would have been necessary only as a propagated build input, but this PR uses it in non propagated ways. Nevertheless, it is easier to add, more noticeable as a kludge, and easier to remove: #27415 (comment) |
vcunat
approved these changes
Dec 19, 2017
Member
|
I just wonder if there are (many) cases where |
Member
|
There are harmful cases, because |
Member
|
But yes this is a great approach for now, thanks @orivej! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
This is small rebuild targeting
stagingto fix small breakage introduced in #29396.This hook sets LD to CC, for use with software that works as if
LD=$CCwhen LD is unset, and does not work when LD=ld.-L path/to/dir/of/libstdc++.sofrom ld flags. See Bintools Wrapper: Init by refactoring out of cc-wrapper, take 2 #29396 (comment)Module::Build build helper works correctly when LD is unset (taking LD from Perl config to be
cc). However, we can not unset LD because this goes contrary to the cross compilation effort, and we can not make it propagate ld-is-cc-hook because it breaks e.g. the build oflibguestfs. However, Bintools Wrapper: Init by refactoring out of cc-wrapper, take 2 #29396 makes LD=ld incompatible with just 3 perl packages; they are individually fixed by this commit.Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)