aboutsummaryrefslogtreecommitdiff
path: root/sim/m4
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-10-31 13:20:13 +0545
committerMike Frysinger <vapier@gentoo.org>2022-11-02 20:59:14 +0545
commitfde7c6bf646146aa342919b413dff07f558d55dc (patch)
tree5b617116d058a48dcd7af66cba9f149759de1afc /sim/m4
parente4f2bc9c05303d399093a8b944ce4b07fa86c513 (diff)
downloadbinutils-fde7c6bf646146aa342919b413dff07f558d55dc.zip
binutils-fde7c6bf646146aa342919b413dff07f558d55dc.tar.gz
binutils-fde7c6bf646146aa342919b413dff07f558d55dc.tar.bz2
sim: split CPPFLAGS between build & host
In order to merge more common/ files into the top-level, we need to add more host flags to CPPFLAGS, and that conflicts with our current use with build-time tools. So split them apart like we do with all other build flags to avoid the issue.
Diffstat (limited to 'sim/m4')
-rw-r--r--sim/m4/sim_ac_toolchain.m43
1 files changed, 3 insertions, 0 deletions
diff --git a/sim/m4/sim_ac_toolchain.m4 b/sim/m4/sim_ac_toolchain.m4
index 7453214..f3bcf46 100644
--- a/sim/m4/sim_ac_toolchain.m4
+++ b/sim/m4/sim_ac_toolchain.m4
@@ -32,18 +32,21 @@ if test "x$cross_compiling" = "xno"; then
: "${CC_FOR_BUILD:=\$(CC)}"
: "${RANLIB_FOR_BUILD:=\$(RANLIB)}"
: "${CFLAGS_FOR_BUILD:=\$(CFLAGS)}"
+ : "${CPPFLAGS_FOR_BUILD:=\$(CPPFLAGS)}"
: "${LDFLAGS_FOR_BUILD:=\$(LDFLAGS)}"
else
: "${AR_FOR_BUILD:=ar}"
: "${CC_FOR_BUILD:=gcc}"
: "${RANLIB_FOR_BUILD:=ranlib}"
: "${CFLAGS_FOR_BUILD:=-g -O}"
+ : "${CPPFLAGS_FOR_BUILD:=}"
: "${LDLFAGS_FOR_BUILD:=}"
fi
AC_SUBST(AR_FOR_BUILD)
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(RANLIB_FOR_BUILD)
AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CPPFLAGS_FOR_BUILD)
AC_SUBST(LDFLAGS_FOR_BUILD)
AC_SUBST(CFLAGS)