summaryrefslogtreecommitdiff
path: root/scripts/build/cc/gcc.sh
diff options
context:
space:
mode:
authorRaphael Catolino <raphael.catolino@gmail.com>2021-07-06 15:05:25 (GMT)
committerRaphael Catolino <raphael.catolino@gmail.com>2021-07-06 15:19:17 (GMT)
commitc3b13ffdda50f81779bc1587d46571b1f110e97c (patch)
treec1c97a7c1775cf19e9dbbc00e464590e73457a19 /scripts/build/cc/gcc.sh
parent62e9db247be34f8a4fa3bc116e60a1b15db62a97 (diff)
Add EXTRA_CXXFLAGS_FOR_BUILD option
Signed-off-by: Raphael Catolino <raphael.catolino@gmail.com>
Diffstat (limited to 'scripts/build/cc/gcc.sh')
-rw-r--r--scripts/build/cc/gcc.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index e39029d..4e0def0 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -295,7 +295,7 @@ do_gcc_core_backend() {
local enable_optspace
local complibs
local lang_list
- local cflags cflags_for_build cflags_for_target cxxflags_for_target
+ local cflags cflags_for_build cxxflags_for_build cflags_for_target cxxflags_for_target
local extra_cxxflags_for_target
local ldflags
local build_step
@@ -587,6 +587,7 @@ do_gcc_core_backend() {
# that ${cflags} may refer either to build or host CFLAGS; they are provided
# by the caller.
cflags_for_build="${CT_CFLAGS_FOR_BUILD}"
+ cxxflags_for_build="${CT_CXXFLAGS_FOR_BUILD}"
cflags_for_target="${CT_TARGET_CFLAGS}"
# Clang's default bracket-depth is 256, and building GCC
@@ -637,8 +638,8 @@ do_gcc_core_backend() {
CC_FOR_BUILD="${CT_BUILD}-gcc" \
CFLAGS="${cflags}" \
CFLAGS_FOR_BUILD="${cflags_for_build}" \
- CXXFLAGS="${cflags}" \
- CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
+ CXXFLAGS="${cflags} ${cxxflags_for_build}" \
+ CXXFLAGS_FOR_BUILD="${cflags_for_build} ${cxxflags_for_build}" \
LDFLAGS="${core_LDFLAGS[*]}" \
CFLAGS_FOR_TARGET="${cflags_for_target}" \
CXXFLAGS_FOR_TARGET="${cxxflags_for_target}" \
@@ -956,6 +957,7 @@ do_gcc_backend() {
local lang_list
local cflags
local cflags_for_build
+ local cxxflags_for_build
local cflags_for_target
local cxxflags_for_target
local extra_cxxflags_for_target
@@ -1231,6 +1233,7 @@ do_gcc_backend() {
# We may need to modify host/build/target CFLAGS separately below
cflags_for_build="${cflags}"
+ cxxflags_for_build="${CT_CXXFLAGS_FOR_BUILD}"
cflags_for_target="${CT_TARGET_CFLAGS}"
# Clang's default bracket-depth is 256, and building GCC
@@ -1266,8 +1269,8 @@ do_gcc_backend() {
CC_FOR_BUILD="${CT_BUILD}-gcc" \
CFLAGS="${cflags}" \
CFLAGS_FOR_BUILD="${cflags_for_build}" \
- CXXFLAGS="${cflags}" \
- CXXFLAGS_FOR_BUILD="${cflags_for_build}" \
+ CXXFLAGS="${cflags} ${cxxflags_for_build}" \
+ CXXFLAGS_FOR_BUILD="${cflags_for_build} ${cxxflags_for_build}" \
LDFLAGS="${final_LDFLAGS[*]}" \
CFLAGS_FOR_TARGET="${cflags_for_target}" \
CXXFLAGS_FOR_TARGET="${cxxflags_for_target}" \