From 4b164edfcacb542944bb0f326ea0747890f44e1f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 5 May 2006 17:11:19 +0000 Subject: [PATCH] sim/: * configure.ac (CFLAGS_FOR_BUILD): Set and substitute. * configure: Regenerate. * Makefile.in (CFLAGS_FOR_BUILD): Define. (CC_FOR_BUILD): Don't override. (FLAGS_TO_PASS): Pass CFLAGS_FOR_BUILD. sim/ppc/: * configure.ac (CFLAGS_FOR_BUILD): Set and substitute. * configure: Regenerate. * Makefile.in (CFLAGS_FOR_BUILD): Define. (BUILD_CFLAGS): Use it instead of hardcoding "-g -O". (gentmap): Fix typo BUILD_FLAGS -> BUILD_CFLAGS. --- sim/ChangeLog | 9 +++++++++ sim/Makefile.in | 6 ++---- sim/configure | 5 ++++- sim/configure.ac | 2 ++ sim/ppc/ChangeLog | 9 +++++++++ sim/ppc/Makefile.in | 5 +++-- sim/ppc/configure | 5 ++++- sim/ppc/configure.ac | 2 ++ 8 files changed, 35 insertions(+), 8 deletions(-) diff --git a/sim/ChangeLog b/sim/ChangeLog index fc3848e1e93..d7d51b0af94 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,12 @@ +2006-05-05 Andreas Schwab + + * configure.ac (CFLAGS_FOR_BUILD): Set and substitute. + * configure: Regenerate. + + * Makefile.in (CFLAGS_FOR_BUILD): Define. + (CC_FOR_BUILD): Don't override. + (FLAGS_TO_PASS): Pass CFLAGS_FOR_BUILD. + 2006-05-04 Daniel Jacobowitz * MAINTAINERS: Add an "Authorized committers" section, and list diff --git a/sim/Makefile.in b/sim/Makefile.in index fdbcdedeb7b..396062069c0 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -56,6 +56,7 @@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ MAKEINFO = makeinfo RANLIB = @RANLIB@ @@ -65,10 +66,6 @@ INCDIR = $(srcdir)/../include CSEARCH = -I. -I$(srcdir) -I$(INCDIR) DEP = mkdep -# compilers to use to create programs which must be run in the build -# environment. -CC_FOR_BUILD = $(CC) - #### Makefile fragments come in here. # @target_makefile_frag@ ### @@ -93,6 +90,7 @@ FLAGS_TO_PASS = \ "CC=$(CC)" \ "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ "CFLAGS=$(CFLAGS)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ "RANLIB=$(RANLIB)" \ "MAKEINFO=$(MAKEINFO)" \ "INSTALL=$(INSTALL)" \ diff --git a/sim/configure b/sim/configure index 37086283423..8346c59d470 100755 --- a/sim/configure +++ b/sim/configure @@ -291,7 +291,7 @@ ac_subdirs_all="$ac_subdirs_all v850" ac_subdirs_all="$ac_subdirs_all testsuite" ac_subdirs_all="$ac_subdirs_all common" ac_subdirs_all="$ac_subdirs_all igen" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR ac_ct_AR RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os HDEFINES CC_FOR_BUILD subdirs LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR ac_ct_AR RANLIB ac_ct_RANLIB build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os HDEFINES CC_FOR_BUILD CFLAGS_FOR_BUILD subdirs LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -3387,6 +3387,8 @@ else CC_FOR_BUILD=gcc fi +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} + # If a cpu ever has more than one simulator to choose from, use # --enable-sim=... to choose. @@ -4223,6 +4225,7 @@ s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@HDEFINES@,$HDEFINES,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t +s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t s,@subdirs@,$subdirs,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t diff --git a/sim/configure.ac b/sim/configure.ac index fc1ac57c58f..205482bcc90 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -23,6 +23,8 @@ else CC_FOR_BUILD=gcc fi AC_SUBST(CC_FOR_BUILD) +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} +AC_SUBST(CFLAGS_FOR_BUILD) # If a cpu ever has more than one simulator to choose from, use # --enable-sim=... to choose. diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 6be4b7e7168..572015972b7 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,12 @@ +2006-05-05 Andreas Schwab + + * configure.ac (CFLAGS_FOR_BUILD): Set and substitute. + * configure: Regenerate. + + * Makefile.in (CFLAGS_FOR_BUILD): Define. + (BUILD_CFLAGS): Use it instead of hardcoding "-g -O". + (gentmap): Fix typo BUILD_FLAGS -> BUILD_CFLAGS. + 2006-04-23 Andreas Schwab * Makefile.in (tmp-ld-decode): Fix dependencies. diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index ff9efee2be6..410d9934629 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -63,6 +63,7 @@ AR_FLAGS = rc CC = @CC@ CFLAGS = @CFLAGS@ CC_FOR_BUILD = @CC_FOR_BUILD@ +CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ BISON = bison MAKEINFO = makeinfo RANLIB = @RANLIB@ @@ -116,7 +117,7 @@ SIM_FPU_CFLAGS = @sim_fpu_cflags@ STD_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(WARNING_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(INTL_CFLAGS) $(SIM_FPU_CFLAGS) NOWARN_CFLAGS = $(CFLAGS) $(INLINE_CFLAGS) $(CONFIG_CFLAGS) $(SIM_CFLAGS) $(HDEFINES) $(TDEFINES) $(INCLUDES) $(SIM_FPU_CFLAGS) -BUILD_CFLAGS = -g -O $(INCLUDES) $(WARNING_CFLAGS) +BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS) BUILD_LDFLAGS = @@ -627,7 +628,7 @@ mon.o: mon.c $(BASICS_H) $(CPU_H) $(MON_H) # GDB after 4.16 expects the default_callback structure to be setup. # As a kludge, build the common stuff here for now. gentmap: ../common/gentmap.c Makefile targ-vals.def - $(CC_FOR_BUILD) $(BUILD_FLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS) + $(CC_FOR_BUILD) $(BUILD_CFLAGS) -I. -I../common -I$(srcdir)/../common -o gentmap $< $(BUILD_LIBS) targ-vals.def: $(srcdir)/../common/nltvals.def rm -f targ-vals.def tmp-def diff --git a/sim/ppc/configure b/sim/ppc/configure index 9e592fa05fd..7bb5fd894af 100755 --- a/sim/ppc/configure +++ b/sim/ppc/configure @@ -309,7 +309,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBOBJS CC_FOR_BUILD HDEFINES AR sim_cflags sim_warnings sim_line_nr sim_config sim_opcode sim_switch sim_dup sim_decode_mechanism sim_jump sim_filter sim_icache sim_hw_src sim_hw_obj sim_pk_src sim_pk_obj sim_bswap sim_igen_smp sim_hostbitsize sim_env sim_timebase sim_trace sim_reserved sim_monitor sim_model sim_model_issue sim_stdio sim_termio sim_devzero sim_callback sim_targ_vals sim_fpu_cflags sim_fpu LTLIBOBJS' +ac_subst_vars='sim_environment sim_alignment sim_assert sim_bitsize sim_endian sim_hostendian sim_float sim_scache sim_default_model sim_hw_cflags sim_hw_objs sim_hw sim_inline sim_packages sim_regparm sim_reserved_bits sim_smp sim_stdcall sim_xor_endian WARN_CFLAGS WERROR_CFLAGS SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SET_MAKE RANLIB ac_ct_RANLIB CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os LIBOBJS CC_FOR_BUILD CFLAGS_FOR_BUILD HDEFINES AR sim_cflags sim_warnings sim_line_nr sim_config sim_opcode sim_switch sim_dup sim_decode_mechanism sim_jump sim_filter sim_icache sim_hw_src sim_hw_obj sim_pk_src sim_pk_obj sim_bswap sim_igen_smp sim_hostbitsize sim_env sim_timebase sim_trace sim_reserved sim_monitor sim_model sim_model_issue sim_stdio sim_termio sim_devzero sim_callback sim_targ_vals sim_fpu_cflags sim_fpu LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -2381,6 +2381,7 @@ if test "x$cross_compiling" = "xno"; then else CC_FOR_BUILD=gcc fi +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} ALL_LINGUAS= echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 @@ -8992,6 +8993,7 @@ fi + AR=${AR-ar} if test -n "$ac_tool_prefix"; then @@ -9808,6 +9810,7 @@ s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t +s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t s,@HDEFINES@,$HDEFINES,;t t s,@AR@,$AR,;t t s,@sim_cflags@,$sim_cflags,;t t diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index c51553f93d0..83a12fb01fb 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -12,6 +12,7 @@ if test "x$cross_compiling" = "xno"; then else CC_FOR_BUILD=gcc fi +CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} dnl We don't use gettext, but bfd does. So we do the appropriate checks dnl to see if there are intl libraries we should link against. @@ -747,6 +748,7 @@ dnl Check for exe extension AC_EXEEXT AC_SUBST(CC_FOR_BUILD) +AC_SUBST(CFLAGS_FOR_BUILD) AC_SUBST(CFLAGS) AC_SUBST(HDEFINES) AR=${AR-ar} -- 2.30.2