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
cc-wrapper: dont inconditionnally include glibc #44538
Conversation
... headers even when using -nostdinc or -nolibc (clang attribute)
That seems to be it. Swapping the default to true at
|
I'm pretty sure this needs to be rebased against staging in any case. |
libc has disappeared from the include folder so it seems a success in that regard but when using clang, I get a /nix/store/XXX-compiler-rt thing in the include pathsm not sure what it is/if it is LGTM (shouldn't imho) so the fix might not be complete. |
The cc-wrapper change seems fine. Not sure what's going on with the staging change however. BTW check out |
I realized I did not need -nostdinc after all and as this kind of PRs are really time consuming since I don't have my custom hydra, I'll leave it on hold and hope someone picks it up. The call `source add-flags.sh $param1 $param2" is also bash specific (not available in sh). |
Huh, good catch, I am sort of surprised that this hasn't caused problems previously with kernel builds or U-Boot/other firmwarey things. But yes, if there haven't been problems in practice let's have this on hold until 18.09 is out. |
actually I believe this is the 2nd time I experienced this before another fix. Could that make sense to write a test for it (pass -stdinc -v and grep -n for include folders) ? where should it go ? |
Rather than grepping for implementation details, I'd just test behaviour instead. I.e. with This can go under |
Are there any updates on this pull request, please? |
Thank you for your contributions.
|
closing in favor of #91974 |
@@ -61,6 +52,8 @@ while (( "$n" < "$nParams" )); do | |||
isCpp=1 | |||
elif [ "$p" = -nostdlib ]; then | |||
isCpp=-1 | |||
elif [ "$p" = -nolibc ]; then |
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 have not checked this flag yet, but I give it a go in my PR.
... headers even when using -nostdinc or -nolibc (clang attribute)
Motivation for this change
Even with nostdinc/nolibc flags wrapper-cc will look in glibc include directories see #44530
Upon compiling glibcLocales, I have a problem though:
I tried in a nix-shell with the same result
Looking at the log, it seems that glibc compiles with nostdinc
and that my change make it really effective thus calling configure
--without-headers
fail ?My guess is that glibc should always be compiled with
withLinuxHeaders
to prevent this (which is not the case for glibLocales) but I could be wrong.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)