From b02da45b3c0a665e2f5234d1ac60363bfb3c30f7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Tue, 31 Jan 2023 21:35:12 -0800 Subject: [PATCH] gcc/common/configure-flags.nix: fix comment 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. --- pkgs/development/compilers/gcc/common/configure-flags.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index c9e9b00f60ed1..25e59148440a0 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -119,7 +119,7 @@ let # or ${with_sysroot}${native_system_header_dir} # While native build (build == host == target) uses passed headers # path as is: - # ${native_system_header_dir} + # ${with_build_sysroot}${native_system_header_dir} # # Nixpkgs uses flat directory structure for both native and cross # cases. As a result libc headers don't get found for cross case