From 557b9d4f8dbf41a587508a16df853d4a7677d04b Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Sun, 26 Sep 2021 22:08:36 +1300 Subject: gcc: Build static libgcc in core_pass1 Per https://github.com/crosstool-ng/crosstool-ng/issues/808 build static libgcc in the first pass which lets us skip the second one. Building mingw-w64 requires header files in order to build C++ support so mingw builds core pass 2. This could probably be cleaned up by splitting libc_start_files into a separate libc_header step. But for now having core 2 for mingw-w64 and core 1 for the other libcs will have to do. Anything that previously selected CC_CORE_PASSES_NEEDED now selects CC_CORE_PASS_1_NEEDED. The same goes for CC_CORE_PASS_2_NEEDED with the exception of mingw-w64. Fixes #808 Fixes #217 Signed-off-by: Chris Packham --- scripts/build/cc/gcc.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/build') diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index b076be50..0b41c29e 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -202,6 +202,8 @@ do_cc_core_pass_1() { core_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) core_opts+=( "lang_list=c" ) core_opts+=( "build_step=core1" ) + core_opts+=( "mode=static" ) + core_opts+=( "build_libgcc=yes" ) CT_DoStep INFO "Installing pass-1 core C gcc compiler" CT_mkdir_pushd "${CT_BUILD_DIR}/build-cc-gcc-core-pass-1" -- cgit v1.2.3