Bintools Wrapper: Init by refactoring out of cc-wrapper, take 2#29396
Bintools Wrapper: Init by refactoring out of cc-wrapper, take 2#29396Ericson2314 merged 16 commits intoNixOS:stagingfrom
Conversation
There was a problem hiding this comment.
@edolstra this symlink avoids the incompatibility the old version introduced.
d8c0c7e to
d753d4c
Compare
There was a problem hiding this comment.
It was determined to be valuable not to iterate over params more times than necessary. Could you merge this loop into the next one? (It has already merged two cases, [ "$NIX_@infixSalt@_DONT_SET_RPATH" != 1 ] and [ "$NIX_@infixSalt@_SET_BUILD_ID" = 1 ].)
beb7de1 to
f1a1ac2
Compare
There was a problem hiding this comment.
These cases are not related, so if you enumerate the cases, these should be 1 and 2.
There was a problem hiding this comment.
Where may depOffset be set to 1? I find only places where it is set to -1 or 0.
There was a problem hiding this comment.
Cc-wrapper already has that, I guess I'll leave it as consistent anticipation.
f1a1ac2 to
d9a2380
Compare
3dbb0a3 to
621ae3d
Compare
doc/stdenv.xml
Outdated
doc/stdenv.xml
Outdated
There was a problem hiding this comment.
Probably you're missing the words "be added to" in this sentence.
doc/stdenv.xml
Outdated
There was a problem hiding this comment.
The idomatic wording options would be:
- "may be in use simultaneously", or
- "may be in simultaneous use"
doc/stdenv.xml
Outdated
There was a problem hiding this comment.
"the" should be "that"
doc/stdenv.xml
Outdated
There was a problem hiding this comment.
"actually" is not an adjective, probably you meant "actual".
621ae3d to
49e0ad4
Compare
49e0ad4 to
ce46fed
Compare
This avoids any `NIX_FOOBAR=1 1` not triggering conditions.
It means stdin, and is morally equivalent to passing a file. e.g.
$ echo 'int main(void) { return 0; }' | gcc -x c -
will compile and link a binary.
Factor a bintools (i.e. binutils / cctools) wrapper out of cc-wrapper. While only LD is wrapped, the setup hook defines environment variables on behalf of other utilites.
Shrunk the CC Wrapper documentation so as not to be repetative.
This is more robust for cross-compilation
Also make the code more precise in the process
These will be installed if the wrappers are. The wrappers aren't very good to install, but that's another matter.
Will need to be editted again to work for cross
d816053 to
84fb59e
Compare
|
@edolstra told me he doesn't have time to review this any time soon, so we might as well not hold it up further. Yay, thanks! This has passed nixborg CI many times before. the last change is a mass rebuild, but just from merging with staging. The post-merge change is just an eval fix for a newer package (clang multilib). Merging, but will keep an I on staging just in case. |
|
This broke |
|
This broke |
|
Two perl packages, It seems that |
|
Can't fix this instant, but the crux of the Perl packages' problem is that |
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.
|
Thanks! I'm fixing perl packages in #32830. |
|
Hm. I don't really understand where |
edit see my question in #29396 (comment)
Motivation for this change
This is meant to be reviewed commit by commit.
This is needed so packages that just use binutils get the same setup-hook support. That is, variables like
BUILD_ASorLDshould be defined the same way, along with theLD_FLAGS. This will be necessary to clean up at least the gcc derivation (which must be built with an binutils not associated with any existsing C compiler when target != host), and probably other compilers too.More broadly, having two wrappers will help enforce proper layering between binutils and the C compiler. For languages besides C/C++, it would be neat to use `stdenvNoCC + binutils, avoiding a C compiler dependency. This wrapper makes that change possible.
@edolstra I'm hoping for you to merge this change when you approve of it, to avoid a repeat of last time.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)