From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Cc: nd@arm.com
Subject: [PATCH 2/3] gcc-cross: pass -Werror=poison-system-directories to compiler stages
Date: Wed, 7 Sep 2022 14:02:06 +0100 [thread overview]
Message-ID: <20220907130207.2258074-2-ross.burton@arm.com> (raw)
In-Reply-To: <20220907130207.2258074-1-ross.burton@arm.com>
The -Werror=poison-system-directories argument was being passed to runs
where _just_ CPP was being invoked, so it wasn't passed to runs which
also compile. Add the options to cc1_options so that compile runs also
have fatal poisoning errors.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../gcc/0002-gcc-poison-system-directories.patch | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
index 5a51ae7d960..bfec4477c1e 100644
--- a/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ b/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
@@ -185,6 +185,19 @@ index bb07cc244e3..ce161d3c853 100644
/* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
+@@ -1265,7 +1270,11 @@ static const char *cc1_options =
+ %{coverage:-fprofile-arcs -ftest-coverage}\
+ %{fprofile-arcs|fprofile-generate*|coverage:\
+ %{!fprofile-update=single:\
+- %{pthread:-fprofile-update=prefer-atomic}}}";
++ %{pthread:-fprofile-update=prefer-atomic}}}"
++#ifdef POISON_BY_DEFAULT
++ " -Werror=poison-system-directories"
++#endif
++ ;
+
+ static const char *asm_options =
+ "%{-target-help:%:print-asm-header()} "
diff --git a/gcc/incpath.cc b/gcc/incpath.cc
index bd2a97938eb..c80f100f476 100644
--- a/gcc/incpath.cc
--
2.34.1
next prev parent reply other threads:[~2022-09-07 13:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-07 13:02 [PATCH 1/3] meta-selftest/poison: improve sysroot poisoning test case Ross Burton
2022-09-07 13:02 ` Ross Burton [this message]
2022-09-07 13:02 ` [PATCH 3/3] gcc: remove obsolete 0012-export-CPP.patch Ross Burton
2022-09-07 14:02 ` [OE-core] " Richard Purdie
2022-09-07 16:56 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220907130207.2258074-2-ross.burton@arm.com \
--to=ross.burton@arm.com \
--cc=nd@arm.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox