gcc: Specify '--with-headers' when building final gcc

The final gcc build process was relying on `CT_CC_SYSROOT_ARG` to
provide the `--with-headers` argument pointing to the libc header
directory.

Since `CT_CC_SYSROOT_ARG` no longer provides `--with-headers`, this adds
one directly to the final gcc build invocation.

Without this, gcc build system will not copy all the required libc
headers into the `sys-include` directory.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit is contained in:
Stephanos Ioannidis 2024-09-24 17:51:37 +09:00 committed by Chris Packham
parent 9884db4c87
commit 246f46c1cb

View File

@ -282,6 +282,7 @@ do_gcc_core_backend() {
gcc_build|gcc_host)
CT_DoLog EXTRA "Configuring final gcc compiler"
extra_config+=( "${CT_CC_SYSROOT_ARG[@]}" )
extra_config+=( "--with-headers=${CT_PREFIX_DIR}/${CT_TARGET}/include" )
extra_user_config=( "${CT_CC_GCC_EXTRA_CONFIG_ARRAY[@]}" )
log_txt="final gcc compiler"
# to inhibit the libiberty and libgcc tricks later on