From: Tobias Burnus Date: Tue, 18 May 2021 09:56:05 +0000 (+0200) Subject: gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598] X-Git-Tag: upstream/12.2.0~7825 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5116b54e4644cb0d7b99891c76f8f015097f6530;p=platform%2Fupstream%2Fgcc.git gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598] BUILD_CFLAGS is set by configure; by default, BUILD_CFLAGS = $(ALL_CFLAGS) is used. The latter contains (see gcc/Makefile.in) $(CFLAGS-$@), which is used to pass .o-file specific flags to the compiler. For cross builds, BUILD_CFLAGS is constructed in configure{,.ac} and missed the $(CFLAGS-$@) - despite the comment above ALL_CFLAGS that configure.ac might have to kept in sync. gcc/ChangeLog: PR other/100598 * configure: Regenerate. * configure.ac (BUILD_CFLAG, BUILD_CXXFLAGS): Add $(CFLAGS-$@). --- diff --git a/gcc/configure b/gcc/configure index 039a86d..4a9e4fa 100755 --- a/gcc/configure +++ b/gcc/configure @@ -911,7 +911,6 @@ infodir docdir oldincludedir includedir -runstatedir localstatedir sharedstatedir sysconfdir @@ -1086,7 +1085,6 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1339,15 +1337,6 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; - -runstatedir | --runstatedir | --runstatedi | --runstated \ - | --runstate | --runstat | --runsta | --runst | --runs \ - | --run | --ru | --r) - ac_prev=runstatedir ;; - -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ - | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ - | --run=* | --ru=* | --r=*) - runstatedir=$ac_optarg ;; - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1485,7 +1474,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir runstatedir + libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1638,7 +1627,6 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -13309,8 +13297,8 @@ BUILD_NO_PIE_FLAG='$(NO_PIE_FLAG)' # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CXXFLAGS_FOR_BUILD)' + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CFLAGS_FOR_BUILD)' + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' NO_PIE_CFLAGS_FOR_BUILD=${NO_PIE_CFLAGS_FOR_BUILD-${NO_PIE_CFLAGS}} @@ -19447,7 +19435,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19450 "configure" +#line 19438 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19553,7 +19541,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 19556 "configure" +#line 19544 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 4e78801..d9fc3c2 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2448,8 +2448,8 @@ BUILD_NO_PIE_FLAG='$(NO_PIE_FLAG)' AC_SUBST(BUILD_NO_PIE_FLAG) # And these apply if build != host, or we are generating coverage data if test x$build != x$host || test "x$coverage_flags" != x then - BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD)' - BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CXXFLAGS_FOR_BUILD)' + BUILD_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CFLAGS_FOR_BUILD)' + BUILD_CXXFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) $(CXXFLAGS_FOR_BUILD)' BUILD_LDFLAGS='$(LDFLAGS_FOR_BUILD)' NO_PIE_CFLAGS_FOR_BUILD=${NO_PIE_CFLAGS_FOR_BUILD-${NO_PIE_CFLAGS}}