https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79885
Bug ID: 79885 Summary: fix-includes does not honor the value passed to --with-build-sysroot=, looks for /usr/include instead of looking within the SDK Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: jeremyhu at macports dot org Target Milestone: --- If gcc-6.3.0 is configured with --with-build-sysroot=/Applications/Xcode.app/.../MacOSXXX.sdk, the build will fail unless /usr/include is present on the system as well. The build fails during fix-includes with the message: The directory that should contain system headers does not exist: /usr/include I suspect this is because SYSTEM_HEADER_DIR is set to /usr/include rather than $SDKROOT/usr/include. Perhaps I'm misunderstanding the intention of --with-build-sysroot, but essentially, I want to build gcc against a given macOS SDK, and the system does not contain system headers installed at /. I'm testing a workaround of defining SYSTEM_HEADER_DIR explicitly, but it would be best if this issue were resolved properly upstream.