From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7896) id 641DA38582BC; Wed, 21 Sep 2022 06:16:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 641DA38582BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663740988; bh=Z6v4EaRG1QweWbUY2ZYiW/yEE4j+CyuP94Gp+VNWfBM=; h=From:To:Subject:Date:From; b=CshgAmo5SZI7Kz8VMEzSEprC2OUUgOT1hNb3AOA9lpNXiawCYm67j4WLJLkp5ujZB imcGAHGOk6ar4gNSxwEQm3K271yjENS4duZKYNzHAHVI9J/CR1MFUtgyKQ3TJoeCdo A+P/3ZWJP88bzrNhajjii7R20OOV984ojZrD07m4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tsukasa OI To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] configure: Pass CPPFLAGS_FOR_BUILD to subdirs X-Act-Checkin: binutils-gdb X-Git-Author: Tsukasa OI X-Git-Refname: refs/heads/master X-Git-Oldrev: 96462b012988d35ebb1137a2ad9fd0a96547d79a X-Git-Newrev: e472ec9fad6d7b0da914da606430e249d1bd99e4 Message-Id: <20220921061628.641DA38582BC@sourceware.org> Date: Wed, 21 Sep 2022 06:16:28 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De472ec9fad6d= 7b0da914da606430e249d1bd99e4 commit e472ec9fad6d7b0da914da606430e249d1bd99e4 Author: Tsukasa OI Date: Wed Sep 14 12:28:02 2022 +0000 configure: Pass CPPFLAGS_FOR_BUILD to subdirs =20 Because CPPFLAGS_FOR_BUILD is used in some subdirectories (through bfd/warning.m4), not AC_SUBSTing the variable causes minor issues. =20 Fortunately, it didn't cause severe errors but error messages related to @CPPFLAGS_FOR_BUILD@ (not AC_SUBSTed CPPFLAGS_FOR_BUILD variable passed to subdirectories through Makefile) remain in config.log. =20 To avoid invalid invocation of preprocessor for build environment, we need to set proper CPPFLAGS_FOR_BUILD (may be empty) and pass it to subdirectories that need it. This is what this commit does. =20 ChangeLog: =20 * configure.ac: Pass CPPFLAGS_FOR_BUILD to subdirectories. * configure: Regenerate. Diff: --- configure | 3 +++ configure.ac | 2 ++ 2 files changed, 5 insertions(+) diff --git a/configure b/configure index 16139e3bfa3..d75f47a1e95 100755 --- a/configure +++ b/configure @@ -651,6 +651,7 @@ GFORTRAN_FOR_BUILD DLLTOOL_FOR_BUILD CXX_FOR_BUILD CXXFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD CFLAGS_FOR_BUILD CC_FOR_BUILD AS_FOR_BUILD @@ -8024,6 +8025,7 @@ esac # our build compiler if desired. if test x"${build}" =3D x"${host}" ; then CFLAGS_FOR_BUILD=3D${CFLAGS_FOR_BUILD-${CFLAGS}} + CPPFLAGS_FOR_BUILD=3D${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} CXXFLAGS_FOR_BUILD=3D${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=3D${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi @@ -8102,6 +8104,7 @@ done =20 =20 =20 + # Generate default definitions for YACC, M4, LEX and other programs that r= un # on the build machine. These are used if the Makefile can't locate these # programs in objdir. diff --git a/configure.ac b/configure.ac index a5555a9c91b..ae18d436aca 100644 --- a/configure.ac +++ b/configure.ac @@ -3326,6 +3326,7 @@ esac # our build compiler if desired. if test x"${build}" =3D x"${host}" ; then CFLAGS_FOR_BUILD=3D${CFLAGS_FOR_BUILD-${CFLAGS}} + CPPFLAGS_FOR_BUILD=3D${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} CXXFLAGS_FOR_BUILD=3D${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=3D${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi @@ -3392,6 +3393,7 @@ AC_SUBST(AR_FOR_BUILD) AC_SUBST(AS_FOR_BUILD) AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(CPPFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS_FOR_BUILD) AC_SUBST(CXX_FOR_BUILD) AC_SUBST(DLLTOOL_FOR_BUILD)