diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 7625690c..f378b4f1 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -200,7 +200,9 @@ do_binutils_backend() { CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CFLAGS_FOR_BUILD="${CT_CFLAGS_FOR_BUILD}" \ + CXXFLAGS_FOR_BUILD="${CT_CFLAGS_FOR_BUILD}" \ + LDFLAGS_FOR_BUILD="${CT_LDFLAGS_FOR_BUILD}" \ CFLAGS="${cflags}" \ CXXFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh index c45253a4..2ca8e6f3 100644 --- a/scripts/build/cc/100-gcc.sh +++ b/scripts/build/cc/100-gcc.sh @@ -547,7 +547,7 @@ do_gcc_core_backend() { CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # We may need to modify host/build CFLAGS separately below - cflags_for_build="${cflags}" + cflags_for_build="${CT_CFLAGS_FOR_BUILD}" # Clang's default bracket-depth is 256, and building GCC # requires somewhere between 257 and 512. diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 98ef5e5d..52290f1b 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -141,7 +141,8 @@ do_debug_gdb_build() { CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CFLAGS_FOR_BUILD="${CT_CFLAGS_FOR_BUILD}" \ + LDFLAGS_FOR_BUILD="${CT_LDFLAGS_FOR_BUILD}" \ CPP="${CPP_for_gdb}" \ CC="${CC_for_gdb}" \ CXX="${CXX_for_gdb}" \ @@ -261,7 +262,8 @@ do_debug_gdb_build() { CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CFLAGS_FOR_BUILD="${CT_CFLAGS_FOR_BUILD}" \ + LDFLAGS_FOR_BUILD="${CT_LDFLAGS_FOR_BUILD}" \ CPP="${CPP_for_gdb}" \ CC="${CC_for_gdb}" \ CXX="${CXX_for_gdb}" \ @@ -339,7 +341,8 @@ do_debug_gdb_build() { CT_DoExecLog CFG \ CC_FOR_BUILD="${CT_BUILD}-gcc" \ - CFLAGS_FOR_BUILD="${cflags_for_build}" \ + CFLAGS_FOR_BUILD="${CT_CFLAGS_FOR_BUILD}" \ + LDFLAGS_FOR_BUILD="${CT_LDFLAGS_FOR_BUILD}" \ CC="${CT_TARGET}-${CT_CC}" \ CPP="${CT_TARGET}-cpp" \ LD="${CT_TARGET}-ld" \