gcc: always enable inhibit_libc=true for --without-headers builds#182666
Merged
trofi merged 1 commit intoNixOS:stagingfrom Jul 24, 2022
Merged
gcc: always enable inhibit_libc=true for --without-headers builds#182666trofi merged 1 commit intoNixOS:stagingfrom
trofi merged 1 commit intoNixOS:stagingfrom
Conversation
13 tasks
Contributor
Author
|
Will keep in draft until get a few more tests finished. |
136e87b to
9d8f8f7
Compare
It's a follow-up to the breakage caused by 21966e1 ("gcc: pass --with-build-sysroot=/"). It caused `pkgsLLVM` cross-toolchain bootstrap breakage: $ nix build --no-link -f. pkgsLLVM.hello ... failed: /nix/store/...-x86_64-unknown-linux-gnu-stage-static-gcc-13.0.0.drv: ... configure flags: ... --enable-languages=c --disable-multilib \ --disable-shared --enable-plugin ... --disable-libssp --disable-nls \ --without-headers --disable-threads --disable-libgomp --disable-libquadmath \ --disable-shared --disable-libatomic --disable-decimal-float --disable-libmpx \ --disable-bootstrap \ \ --build=x86_64-unknown-linux-gnu \ --host=x86_64-unknown-linux-gnu \ --target=x86_64-unknown-linux-gnu ... The directory that should contain system headers does not exist: /usr/include make[2]: *** [Makefile:3279: stmp-fixinc] Error 1 shuffle=1658621302 rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod make[2]: Leaving directory '/build/build/gcc' Note: it's a no-libc build. It's not expected to use any libc headers. But in this case fixincludes tries to run and uses default /usr/include location. Fixinsludes is not normally expected to run during cross-compilation on --without-headers. gcc/configure.ac: : ${inhibit_libc=false} if { { test x$host != x$target && test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; } && { test "x$with_headers" = xno || test ! -f "$target_header_dir/stdio.h"; } ; then inhibit_libc=true fi The change explicitly passes inhibit_libc=true to configure to disable include fixing on such cases. Fixed `nix build --no-link -f. pkgsLLVM.hello` toolchain bootstrap.
9d8f8f7 to
ea8e124
Compare
Contributor
Author
|
Ready. Fixed: |
Contributor
Author
|
I'll merge it a bit quicker to get |
12 tasks
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.
It's a follow-up to the breakage caused by 21966e1
("gcc: pass --with-build-sysroot=/"). It caused
pkgsLLVMcross-toolchain bootstrap breakage:
Note: it's a no-libc build. It's not expected to use any libc headers.
But in this case fixincludes tries to run and uses default /usr/include
location.
Fixinsludes is not normally expected to run during cross-compilation
on --without-headers. gcc/configure.ac:
The change explicitly passes inhibit_libc=true to configure to disable
include fixing on such cases.
Fixed
nix build --no-link -f. pkgsLLVM.hellotoolchain bootstrap.Description of changes
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes