From patchwork Wed Oct 27 20:05:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46719 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D5BC3858C27 for ; Wed, 27 Oct 2021 20:10:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D5BC3858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365421; bh=ot8iNPyle6M0o22DO/g54brmTQarbpujC+dQ9UvE6Is=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SpB9BmgKZOGG5PyiF6OYtInHRn2b4nRzAkaErtJean5LNJIo7s0/DVZYf2IhmeCKG ej/+QN3ERS9yHVUZV1tcA9JmF+mJh+y/mZOPcqGWuYvJHGkRWjtJiT49fLszApREcT fX+0NAL7b5hYfg3I92xK5Z8io4zsZNrczumWU0dc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id D30933858C27 for ; Wed, 27 Oct 2021 20:05:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D30933858C27 Received: by mail-wr1-x436.google.com with SMTP id z14so6102885wrg.6 for ; Wed, 27 Oct 2021 13:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ot8iNPyle6M0o22DO/g54brmTQarbpujC+dQ9UvE6Is=; b=Zvu+QLlhMnXHVp8yQDeIUdYGZCJJhK6b1hjrG7mKtowGdO6GhswxoVMDdTRsVmSS3J mnMOvE9HR7vlUtIgffbA7yUntoyLVpihUIV9EjASrndwWTC+0T71mMi5tvG+Iu+o6NHK yEpsm4FdZqy/gBVwlZX8hmdxGxCqbtwwR9lkOWhIm5V+3GS9/p7VyJMkTMvaPxk0yF34 PxrlDRJ4LXzpmQwOQ1LW1/NZANH56QPt3S442WowY6G2ejxKmkeWG+hcGqh/9G+UBSpu jFoPrF/sJMXDwpJR493wqvgClR5wtx0Dd+z7Q6RaCxvOVlZY6tSaSOTJlhjxQxUuDzhO CJ4A== X-Gm-Message-State: AOAM531plJaFZ3KuubIKlsbR9P9nUICHg2ul5vGYzY5cJvewP1NuPMg3 vbjm+cdp0MO+VcDWWXLViMJ1uYA3/e2Odg== X-Google-Smtp-Source: ABdhPJzKyHlqPmses+Ea09LGPgdZpWke9ABhDYKQF+RuNQPjWKZSxQEa9trGm1vUFMmVOKIxwnwk/A== X-Received: by 2002:adf:f80e:: with SMTP id s14mr893250wrp.288.1635365107624; Wed, 27 Oct 2021 13:05:07 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:07 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets Date: Wed, 27 Oct 2021 21:05:01 +0100 Message-Id: <20211027200505.3340725-2-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" During cross compiling, CPP is being set to the target compiler even for build targets. As an example, when building a cross compiler targetting mingw, the config.log for libiberty in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log shows: configure:3786: checking how to run the C preprocessor configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=[sysroot]/x86_64-nativesdk-mingw32-pokysdk-mingw32 configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=[sysroot]/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c configure:3876: $? = 0 This is libiberty being built for the build environment, not the target one (i.e. in build-x86_64-linux). As such it should be using the build environment's gcc and not the target one. In the mingw case the system headers are quite different leading to build failures related to not being able to include a process.h file for pem-unix.c. Further analysis shows the same issue occuring for CPPFLAGS too. Fix this by adding support for CPP_FOR_BUILD and CPPFLAGS_FOR_BUILD which for example, avoids mixing the mingw headers for host binaries on linux systems. 2021-10-27 Richard Purdie ChangeLog: * Makefile.tpl: Add CPP_FOR_BUILD and CPPFLAGS_FOR_BUILD support * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Add CPP_FOR_BUILD and CPPFLAGS_FOR_BUILD support gcc/ChangeLog: * configure: Regenerate. * configure.ac: Use CPPFLAGS_FOR_BUILD for GMPINC Signed-off-by: Richard Purdie --- Makefile.in | 6 ++++++ Makefile.tpl | 6 ++++++ configure | 4 ++++ configure.ac | 4 ++++ gcc/configure | 2 +- gcc/configure.ac | 2 +- 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 34b2d89660d..d13f6c353ee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -154,6 +154,8 @@ BUILD_EXPORTS = \ CC="$(CC_FOR_BUILD)"; export CC; \ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPP="$(CPP_FOR_BUILD)"; export CPP; \ + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ CXX="$(CXX_FOR_BUILD)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ @@ -202,6 +204,8 @@ HOST_EXPORTS = \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ + CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ @@ -360,6 +364,8 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ diff --git a/Makefile.tpl b/Makefile.tpl index 08e68e83ea8..213052f8226 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -157,6 +157,8 @@ BUILD_EXPORTS = \ CC="$(CC_FOR_BUILD)"; export CC; \ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ + CPP="$(CPP_FOR_BUILD)"; export CPP; \ + CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \ CXX="$(CXX_FOR_BUILD)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ @@ -205,6 +207,8 @@ HOST_EXPORTS = \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ + CPP_FOR_BUILD="$(CPP_FOR_BUILD)"; export CPP_FOR_BUILD; \ + CPPFLAGS_FOR_BUILD="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS_FOR_BUILD; \ CXX_FOR_BUILD="$(CXX_FOR_BUILD)"; export CXX_FOR_BUILD; \ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \ DSYMUTIL="$(DSYMUTIL)"; export DSYMUTIL; \ @@ -363,6 +367,8 @@ AR_FOR_BUILD = @AR_FOR_BUILD@ AS_FOR_BUILD = @AS_FOR_BUILD@ CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ diff --git a/configure b/configure index 785498efff5..58979d6e3b1 100755 --- a/configure +++ b/configure @@ -655,6 +655,8 @@ DSYMUTIL_FOR_BUILD DLLTOOL_FOR_BUILD CXX_FOR_BUILD CXXFLAGS_FOR_BUILD +CPPFLAGS_FOR_BUILD +CPP_FOR_BUILD CFLAGS_FOR_BUILD CC_FOR_BUILD AS_FOR_BUILD @@ -4090,6 +4092,7 @@ if test "${build}" != "${host}" ; then AR_FOR_BUILD=${AR_FOR_BUILD-ar} AS_FOR_BUILD=${AS_FOR_BUILD-as} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} + CPP_FOR_BUILD="${CPP_FOR_BUILD-\$(CPP)}" CXX_FOR_BUILD=${CXX_FOR_BUILD-g++} DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil} GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} @@ -9999,6 +10002,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi diff --git a/configure.ac b/configure.ac index c523083c346..550e6993b59 100644 --- a/configure.ac +++ b/configure.ac @@ -1334,6 +1334,7 @@ if test "${build}" != "${host}" ; then AR_FOR_BUILD=${AR_FOR_BUILD-ar} AS_FOR_BUILD=${AS_FOR_BUILD-as} CC_FOR_BUILD=${CC_FOR_BUILD-gcc} + CPP_FOR_BUILD="${CPP_FOR_BUILD-\$(CPP)}" CXX_FOR_BUILD=${CXX_FOR_BUILD-g++} DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil} GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} @@ -3323,6 +3324,7 @@ esac # our build compiler if desired. if test x"${build}" = x"${host}" ; then CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}} + CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}} CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} fi @@ -3389,6 +3391,8 @@ AC_SUBST(AR_FOR_BUILD) AC_SUBST(AS_FOR_BUILD) AC_SUBST(CC_FOR_BUILD) AC_SUBST(CFLAGS_FOR_BUILD) +AC_SUBST(CPP_FOR_BUILD) +AC_SUBST(CPPFLAGS_FOR_BUILD) AC_SUBST(CXXFLAGS_FOR_BUILD) AC_SUBST(CXX_FOR_BUILD) AC_SUBST(DLLTOOL_FOR_BUILD) diff --git a/gcc/configure b/gcc/configure index eeb42657da2..920868bcd33 100755 --- a/gcc/configure +++ b/gcc/configure @@ -12769,7 +12769,7 @@ else CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ - GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ ${realsrcdir}/configure \ --enable-languages=${enable_languages-all} \ ${enable_obsolete+--enable-obsolete="$enable_obsolete"} \ diff --git a/gcc/configure.ac b/gcc/configure.ac index 8c60c0f5e46..065080a4b39 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2065,7 +2065,7 @@ else CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \ CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \ LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \ - GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \ + GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \ ${realsrcdir}/configure \ --enable-languages=${enable_languages-all} \ ${enable_obsolete+--enable-obsolete="$enable_obsolete"} \ From patchwork Wed Oct 27 20:05:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46714 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3ED983858018 for ; Wed, 27 Oct 2021 20:05:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3ED983858018 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365139; bh=D6yvOI6AT7Gigt+7GYWQknGG3zQjRwc18eQ6jVCZt1Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RzDVdS+uvayWxXPKxHb0VjCy5zxO7g+8fhX4EF4PLn0Oh/gHIRZ1ykZRCmInNoHu4 Es3GhOql2kTz+4Nhv5toW2mBn9lCUaUX2XQM8wjZzRm35UGT4VoYjHfk79KxJqpAoJ 7GezBTqYjpz6UyORiayIc3OWSBbiIyfAJz+Y7t2o= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id D61193858404 for ; Wed, 27 Oct 2021 20:05:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D61193858404 Received: by mail-wr1-x42c.google.com with SMTP id v17so6066550wrv.9 for ; Wed, 27 Oct 2021 13:05:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D6yvOI6AT7Gigt+7GYWQknGG3zQjRwc18eQ6jVCZt1Q=; b=dIWf/EThD36TqZGy8LvSvu8FAciUjDK/0CBz9oZG2YoRqmt0BJIZ2wYaZ9kK0DXlHP 8p+TigeNGEfjJPPrQZNPcSfC7QWzvtkjdnEAAjP08EG3zHzQMoamBBltCnlzHoDAxWHJ 69WBkFramPJjc+Ko1Lhstczd45/C8kkS0cm5F1/9iiOXn9MxH2d1gXTox/3w2zP+Iwsu 5ipO9/7aNXZmhBl+UYg+psgt7qFTa0k7TjsugrPt5JDvZl0QZR2lyeuR5QQ0ub+lYGEj KBqzISzLjK+9up+uloQEjr+Ny99PSN/DWp6ycWEbhR2APBPk5dejyqK5uxrxRgF77yoe HBIg== X-Gm-Message-State: AOAM531dWHkauX36IJDDPNeLyziS2ykt8Vq4JdD3PxjUh2ZxDDERUK+J z1vKOk/dQ99vJrrbUeQubrF3ltvyF92FdA== X-Google-Smtp-Source: ABdhPJzeBe93YGrtqUpTCBhRo8ibs9CLKxzLit47CtObE9kLKhdyFCZvYt90e+WH4K9Dl0ZtAQ/3bA== X-Received: by 2002:a05:6000:15c6:: with SMTP id y6mr43083659wry.210.1635365108299; Wed, 27 Oct 2021 13:05:08 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:07 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/5] gcc: Fix "argument list too long" from install-plugins Date: Wed, 27 Oct 2021 21:05:02 +0100 Message-Id: <20211027200505.3340725-3-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" When building in longer build paths (200+ characters), the "echo $(PLUGIN_HEADERS)" from the install-plugins target would cause an "argument list too long error" on some systems. Avoid this by calling make's sort function on the list which removes duplicates and stops the overflow from reaching the echo command. The original sort is left to handle the the .h and .def files. 2021-10-26 Richard Purdie gcc/ChangeLog: * Makefile.in: Fix "argument list too long" from install-plugins Signed-off-by: Richard Purdie --- gcc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 658093c11c0..89482c6dd4e 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -3685,7 +3685,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype # We keep the directory structure for files in config, common/config or # c-family and .def files. All other files are flattened to a single directory. $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) - headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ + headers=`echo $(sort $(PLUGIN_HEADERS)) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ for file in $$headers; do \ if [ -f $$file ] ; then \ From patchwork Wed Oct 27 20:05:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46716 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 03438385842F for ; Wed, 27 Oct 2021 20:07:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 03438385842F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365252; bh=+xO585lbf/qoCJQ8oli7LnCcKDR+MX2HFeRVMx0BZ6k=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fLLC/0E/H0rZoWnNQUwbs2+6vyAbnzIodo2ITUdT6Vyu3oL4lsf1fOXZJR6d0uSNC YZGAihnFqXC6/Cm6CNqc5gFxEb/a8XVkD79gBzM7Gcke9wLqzcz9UhT2P9EjbCR8I3 G2avcgBs29x2m1w1ExjiiEIET0dSDpqNfvfnZYAg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 456C03858405 for ; Wed, 27 Oct 2021 20:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 456C03858405 Received: by mail-wm1-x336.google.com with SMTP id z81-20020a1c7e54000000b0032cc97975e4so3270047wmc.4 for ; Wed, 27 Oct 2021 13:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+xO585lbf/qoCJQ8oli7LnCcKDR+MX2HFeRVMx0BZ6k=; b=HpF79zRSOT0mrWKDS4STk53VefavEShEsSEut3hOKXJ8o9PO3bRQhh6li9DE8rUdf1 FmJ21RGWbbZfYCL2yIOrXq2QWojRbpOTPSFEZvFqMLurudedlW4ZvhMqQO/Qg9tkxLR9 YAkLST10fOzWbfGVTR8I3cyoeedr3oKQD1OOYnB08jzTSgFGAeJ1d+uEGxbgF5IaIUAd l6+7fm4YDne80odPx5tNSNEHqLu0VoGK7wIDdwG/EqsF9h1sX1SSp1MuJyWV8zJ8sQVl 1eeST+QG5bg4LMyaS3KGNY1kh8UC/0MS9wnn2a1Zlzx5S+F1GoVUu/h9Pziwv0QfPnzL Itbg== X-Gm-Message-State: AOAM530PogEr6+IEjdP/qNVb0v+XhALL3+jp7HAi2WAvW0rrhy7L5nch I9PxxV0jowg/+egSecK6UNzDuUSZpfcYZg== X-Google-Smtp-Source: ABdhPJzYjlBY451cPSmpTWUaPiwKaaOeNLHpCbEX1/I1HwGhdvD3uX1X79lUKqylVwEneMtthoCpUg== X-Received: by 2002:a05:600c:4f43:: with SMTP id m3mr7569927wmq.151.1635365108823; Wed, 27 Oct 2021 13:05:08 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:08 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/5] gcc: Add --nostdlib++ option Date: Wed, 27 Oct 2021 21:05:03 +0100 Message-Id: <20211027200505.3340725-4-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries separately from the compiler and slightly differently to the standard gcc build. In general this works well but in trying to build them separately we run into an issue since we're using our gcc, not xgcc and there is no way to tell configure to use libgcc but not look for libstdc++. This adds such an option allowing such configurations to work. 2021-10-26 Richard Purdie gcc/c-family/ChangeLog: * c.opt: Add --nostdlib++ option gcc/cp/ChangeLog: * g++spec.c (lang_specific_driver): Add --nostdlib++ option gcc/ChangeLog: * doc/invoke.texi: Document --nostdlib++ option * gcc.c: Add --nostdlib++ option Signed-off-by: Richard Purdie --- gcc/c-family/c.opt | 4 ++++ gcc/cp/g++spec.c | 1 + gcc/doc/invoke.texi | 8 +++++++- gcc/gcc.c | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index 06457ac739e..ee742c831fd 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -2190,6 +2190,10 @@ nostdinc++ C++ ObjC++ Do not search standard system include directories for C++. +nostdlib++ +Driver +Do not link standard C++ runtime library + o C ObjC C++ ObjC++ Joined Separate ; Documented in common.opt diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c index 3c9bd1490b4..818beb61cee 100644 --- a/gcc/cp/g++spec.c +++ b/gcc/cp/g++spec.c @@ -159,6 +159,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, switch (decoded_options[i].opt_index) { case OPT_nostdlib: + case OPT_nostdlib__: case OPT_nodefaultlibs: library = -1; break; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 71992b8c597..d89b08b3080 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -239,6 +239,7 @@ in the following sections. -fno-weak -nostdinc++ @gol -fvisibility-inlines-hidden @gol -fvisibility-ms-compat @gol +-nostdlib++ @gol -fext-numeric-literals @gol -flang-info-include-translate@r{[}=@var{header}@r{]} @gol -flang-info-include-translate-not @gol @@ -638,7 +639,7 @@ Objective-C and Objective-C++ Dialects}. -pie -pthread -r -rdynamic @gol -s -static -static-pie -static-libgcc -static-libstdc++ @gol -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol --shared -shared-libgcc -symbolic @gol +-shared -shared-libgcc -symbolic -nostdlib++ @gol -T @var{script} -Wl,@var{option} -Xlinker @var{option} @gol -u @var{symbol} -z @var{keyword}} @@ -16134,6 +16135,11 @@ Specify that the program entry point is @var{entry}. The argument is interpreted by the linker; the GNU linker accepts either a symbol name or an address. +@item -nostdlib++ +@opindex nostdlib++ +Do not use the standard system C++ runtime libraries when linking. +Only the libraries you specify will be passed to the linker. + @item -pie @opindex pie Produce a dynamically linked position independent executable on targets diff --git a/gcc/gcc.c b/gcc/gcc.c index 506c2acc282..abb900a4247 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1167,6 +1167,7 @@ proper position among the other output files. */ %(mflib) " STACK_SPLIT_SPEC "\ %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \ %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}}\ + %{!nostdlib++:}\ %{!nostdlib:%{!r:%{!nostartfiles:%E}}} %{T*} \n%(post_link) }}}}}}" #endif From patchwork Wed Oct 27 20:05:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46715 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 455303858402 for ; Wed, 27 Oct 2021 20:06:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 455303858402 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365195; bh=jW3YaoFG65tEUASaXUZ0ElGrog3svjr4WFUjS+4hYBs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=RQaw8wC8rOQsVbCFoiUDjYyydD6Cbj3BnA9fMkjyATaVFAnm1aQi8YQf6nk9A8goU wTSdMYkkn4W9rzRpnQKLv6roRBEUdixa70NFn7zl1N+upXu32DXQGOj+c5ijs0E0BB svEB4BD6QvbEBd5zadem2IbRhcYabfLDJ3fjFmc0= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 94CA1385840D for ; Wed, 27 Oct 2021 20:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 94CA1385840D Received: by mail-wr1-x434.google.com with SMTP id k7so6042172wrd.13 for ; Wed, 27 Oct 2021 13:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jW3YaoFG65tEUASaXUZ0ElGrog3svjr4WFUjS+4hYBs=; b=3LUmacB7EYFo1hBMmqb1PC1o8KQh410Aa1VdbaZ+v0irjcZ8iidRjsh4cjdTtyadTA RKJcW8hPTze7+cOd8qIR+xXcmx/nX1odMjQDDkJ2i8HiEapGQyW5oxW9ahBm1ieLxhrx MFoPn8e22zaKLPUlofWILgUTPi874uwGgKLoUoKNu7FXASbk3v/i4883bFSJObdH3Fn8 zyl3lYSeULpu0aV33Hwo5s/LhlzPHOSUdTupqUfycGbAvt48m3xx2X59n5J/Js6RMkRy itLehgttXlJFFRYjheC7uMjxdztXByeHuiQ9FWZ9/VwIXH102yYeH7cqX5eLiLGmc6KP bUew== X-Gm-Message-State: AOAM532sKu2KK90Qsr1xzq3Ddynkb3vGdT330/YKdKZSPXuheL/xc/5K Rdx8dO0qCXHEr0XK2MXbr6p1V1xwWwLPnQ== X-Google-Smtp-Source: ABdhPJyAyTV3MRVkUITWhIRUWr4Se2u4pogihO8RBtdr3nXKlEfm6wjxJuXBp98noZhauTFRcVVUEw== X-Received: by 2002:adf:e709:: with SMTP id c9mr7646558wrm.78.1635365109213; Wed, 27 Oct 2021 13:05:09 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:08 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/5] gcc/nios2: Define the musl linker Date: Wed, 27 Oct 2021 21:05:04 +0100 Message-Id: <20211027200505.3340725-5-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Add a definition of the musl linker used on the nios2 platform. 2021-10-26 Richard Purdie gcc/ChangeLog: * config/nios2/linux.h (MUSL_DYNAMIC_LINKER): Add musl linker Signed-off-by: Richard Purdie --- gcc/config/nios2/linux.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h index 08edf1521f6..15696d86241 100644 --- a/gcc/config/nios2/linux.h +++ b/gcc/config/nios2/linux.h @@ -30,6 +30,7 @@ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" #undef LINK_SPEC #define LINK_SPEC LINK_SPEC_ENDIAN \ From patchwork Wed Oct 27 20:05:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Purdie X-Patchwork-Id: 46717 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53F8D385842D for ; Wed, 27 Oct 2021 20:08:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 53F8D385842D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1635365308; bh=G7DgvujSidMdo4W4ha9dwcYsgpycIzWU3VGuTDH2+SU=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=YaSD3SncxfIa5sRxyUb4UtdNCV3ozFatuyIKSSXXmB1EWNWaAKOQJ3GQUQh+gcl3m 8qcuJiEjI1OnYHvjIlasNHYXjoapLIiVqYyUtayq/JS17Vm+d46FH8Z+aartFBnDn2 4x0XGLPw20nvD14gW75WQNabNYjVgV4Kb2oFDGt8= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id A26103858410 for ; Wed, 27 Oct 2021 20:05:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A26103858410 Received: by mail-wm1-x32a.google.com with SMTP id g205-20020a1c20d6000000b0032cc6bbd505so6694531wmg.5 for ; Wed, 27 Oct 2021 13:05:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G7DgvujSidMdo4W4ha9dwcYsgpycIzWU3VGuTDH2+SU=; b=eFmcrSjXF/nGKhaeAqZ9ZAht1mGQP9JANcEQqXwp75yImB4wBs4lGtxaVfmoj5EcuO kdvcVKhCJD9FN6zxVSjlOPvCFu/zJP11TvjFEqfCo5yKZ4hzAF3uUwqPOhlJSBE3W+qS l6TkZxjCwrNPvu4Cau3ohy7XHtwU620+L/Dq4SxPCdaulupafkJLcaIiYPRvyUlx0Tev j4jDW2ZUYdorPHhxbgwtxFvyui9Ay8AWGGdSO1t6RUmiIg9DUi0ra4GrqAm5facqpR1L 5o9xK9NZJSr6xB3XpyFRaf0gjiyIxREjx+jT6Erx+JmRMX5koIII9WMQCvQJdBn4+nfa 0ibA== X-Gm-Message-State: AOAM531TkbvPk0BvjULK8ufl51mIPVCl75b7b6icYeg0V+uSvRmSYG2N 4aTALHhEJNm6S/4yeNM93s78zRySPoWi3g== X-Google-Smtp-Source: ABdhPJwa/iBe5XC8/rgsHMAsFn1HJcJevp6wAaW0gvF5+XOju+JloknH2GYCtoj0tOydW6ZClYzOng== X-Received: by 2002:a05:600c:35cb:: with SMTP id r11mr7940304wmq.76.1635365109614; Wed, 27 Oct 2021 13:05:09 -0700 (PDT) Received: from hex.int.rpsys.net ([2001:8b0:aba:5f3c:9748:b7d4:9e30:95e]) by smtp.gmail.com with ESMTPSA id c17sm847914wrv.22.2021.10.27.13.05.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 13:05:09 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 5/5] gcc: Pass sysroot options to cpp for preprocessed source Date: Wed, 27 Oct 2021 21:05:05 +0100 Message-Id: <20211027200505.3340725-6-richard.purdie@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> References: <20211027200505.3340725-1-richard.purdie@linuxfoundation.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Richard Purdie via Gcc-patches From: Richard Purdie Reply-To: Richard Purdie Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" OpenEmbedded/Yocto Project extensively uses the --sysroot support within gcc. We discovered that when compiling preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location rather than the --sysroot option specified on the commandline. If access to that directory is permission denied (unreadable), gcc will error. This is particularly problematic when ccache is involved. This patch adds %I to the cpp-output spec macro so the default substitutions for -iprefix, -isystem, -isysroot happen and the correct sysroot is used. 2021-10-27 Richard Purdie gcc/cp/ChangeLog: * lang-specs.h: Pass sysroot options to cpp for preprocessed source gcc/ChangeLog: * gcc.c: Pass sysroot options to cpp for preprocessed source Signed-off-by: Richard Purdie --- gcc/cp/lang-specs.h | 2 +- gcc/gcc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index 8902ae1d2ed..e99e2fcd6ad 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -116,7 +116,7 @@ along with GCC; see the file COPYING3. If not see {".ii", "@c++-cpp-output", 0, 0, 0}, {"@c++-cpp-output", "%{!E:%{!M:%{!MM:" - " cc1plus -fpreprocessed %i %(cc1_options) %2" + " cc1plus -fpreprocessed %i %I %(cc1_options) %2" " %{!fsyntax-only:" " %{fmodule-only:%{!S:-o %g.s%V}}" " %{!fmodule-only:%{!fmodule-header*:%(invoke_as)}}}" diff --git a/gcc/gcc.c b/gcc/gcc.c index abb900a4247..51176becb86 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1472,7 +1472,7 @@ static const struct compiler default_compilers[] = %W{o*:--output-pch=%*}}%V}}}}}}}", 0, 0, 0}, {".i", "@cpp-output", 0, 0, 0}, {"@cpp-output", - "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, {".s", "@assembler", 0, 0, 0}, {"@assembler", "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},