From c25ea03dd6a04f33e1d6f089a0d93658a863235b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 21 Feb 2021 22:15:03 -0500 Subject: sim: set up build-time compiler settings Some sim dirs were already setting up CFLAGS_FOR_BUILD in inconsistent ways. Move it to a common place for reuse. --- sim/frv/configure | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'sim/frv/configure') diff --git a/sim/frv/configure b/sim/frv/configure index 4eff45f..2259c32 100755 --- a/sim/frv/configure +++ b/sim/frv/configure @@ -688,6 +688,7 @@ PACKAGE C_DIALECT RANLIB AR +CFLAGS_FOR_BUILD CC_FOR_BUILD INSTALL_DATA INSTALL_SCRIPT @@ -6780,17 +6781,17 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h -# Put a plausible default for CC_FOR_BUILD in Makefile. -if test -z "$CC_FOR_BUILD"; then - if test "x$cross_compiling" = "xno"; then - CC_FOR_BUILD='$(CC)' - else - CC_FOR_BUILD=gcc - fi +if test "x$cross_compiling" = "xno"; then + : "${CC_FOR_BUILD:=\$(CC)}" + : "${CFLAGS_FOR_BUILD:=\$(CFLAGS)}" +else + : "${CC_FOR_BUILD:=gcc}" + : "${CFLAGS_FOR_BUILD:=-g -O}" fi + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 @@ -11244,7 +11245,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11247 "configure" +#line 11248 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11350,7 +11351,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11353 "configure" +#line 11354 "configure" #include "confdefs.h" #if HAVE_DLFCN_H -- cgit v1.1