mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-04 01:50:59 +00:00
9884db4c87
When building a non-sysrooted toolchain, `--with-headers` argument is specified in `CT_CC_SYSROOT_ARG` as a hack, supposedly because "final gcc will define disable_glibc while building libgcc, and you'll have no profiling." This, however, leads to `--with-headers` being specified multiple times when building libstdc++ for additional libc variants (e.g. newlib-nano and picolibc) and results in wrong libc headers being used by the libstdc++ build under certain circumstances -- GCC does not use the last specified `--with-headers` when building for macOS and Windows hosts. Since the above hack is intended for glibc only, this commit adds a check to ensure that `--with-headers` is added to `CT_CC_SYSROOT_ARG` only when building glibc. Signed-off-by: Stephanos Ioannidis <root@stephanos.io>