Skip to content
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

gcc/common/configure-flags.nix: fix comment #213909

Merged
merged 1 commit into from Feb 1, 2023
Merged

gcc/common/configure-flags.nix: fix comment #213909

merged 1 commit into from Feb 1, 2023

Conversation

ghost
Copy link

@ghost ghost commented Feb 1, 2023

Description of changes

On a native (host==build==target) build, ${with_build_sysroot} can be omitted. In that case, the line modified by this commit is correct.

However, if --with-build-sysroot= is passed to ./configure, then ${with_build_sysroot} will be used, similar to the cross case, and the headers will be taken from:

  ${with_build_sysroot}${native_system_header_dir}

See:

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/configure.ac;h=62bc908b991ff0b700225aef32743cd3d7c4daaf;hb=HEAD#l2439

This commit adjusts the comment to account for the case where --with-build-sysroot is passed to a native compiler.

Cc: @trofi @wegank

Things done

On a native (host==build==target) build, `${with_build_sysroot}` can
be omitted.  In that case, the line modified by this commit is
correct.

However, if `--with-build-sysroot=` is passed to `./configure`, then
`${with_build_sysroot}` will be used, similar to the cross case, and
the headers will be taken from:

  ${with_build_sysroot}${native_system_header_dir}

See:

  https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/configure.ac;h=62bc908b991ff0b700225aef32743cd3d7c4daaf;hb=HEAD#l2439

This commit adjusts the comment to account for the case where
`--with-build-sysroot` is passed to a native compiler.
@trofi trofi merged commit 8212ae0 into NixOS:master Feb 1, 2023
@ghost ghost deleted the pr/gcc/comment branch February 12, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants