All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <pkj@axis.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] gcc: Allow -Wno-error=poison-system-directories to take effect
Date: Thu, 13 Oct 2022 15:29:26 +0200	[thread overview]
Message-ID: <20221013132926.2771530-1-pkj@axis.com> (raw)

The change in commit e903b29f (gcc-cross: pass
-Werror=poison-system-directories to compiler stages) made it impossible
to disable the error using -Wno-error=poison-system-directories.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 .../0002-gcc-poison-system-directories.patch  | 36 +++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)

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 bfec4477c1..5aa635b3d4 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
@@ -1,4 +1,4 @@
-From e1dbdcd0ea667bab4b551294354e04c6fe288ab6 Mon Sep 17 00:00:00 2001
+From 99f1e61b2957226254a116fde7fd73bf07034012 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 8 Mar 2021 16:04:20 -0800
 Subject: [PATCH] gcc: poison-system-directories
@@ -20,12 +20,12 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  gcc/configure       | 19 +++++++++++++++++++
  gcc/configure.ac    | 16 ++++++++++++++++
  gcc/doc/invoke.texi |  9 +++++++++
- gcc/gcc.cc          |  9 +++++++--
+ gcc/gcc.cc          | 15 ++++++++++++---
  gcc/incpath.cc      | 21 +++++++++++++++++++++
- 7 files changed, 86 insertions(+), 2 deletions(-)
+ 7 files changed, 91 insertions(+), 3 deletions(-)
 
 diff --git a/gcc/common.opt b/gcc/common.opt
-index 8a0dafc522d..0357868e22c 100644
+index 8a0dafc52..0357868e2 100644
 --- a/gcc/common.opt
 +++ b/gcc/common.opt
 @@ -710,6 +710,10 @@ Wreturn-local-addr
@@ -40,7 +40,7 @@ index 8a0dafc522d..0357868e22c 100644
  Common Var(warn_shadow) Warning
  Warn when one variable shadows another.  Same as -Wshadow=global.
 diff --git a/gcc/config.in b/gcc/config.in
-index 64c27c9cfac..a693cb8a886 100644
+index 64c27c9cf..a693cb8a8 100644
 --- a/gcc/config.in
 +++ b/gcc/config.in
 @@ -230,6 +230,16 @@
@@ -61,7 +61,7 @@ index 64c27c9cfac..a693cb8a886 100644
     optimizer and back end) to be checked for dynamic type safety at runtime.
     This is quite expensive. */
 diff --git a/gcc/configure b/gcc/configure
-index 5ce0557719a..dc2d59701ad 100755
+index 2b83acfb0..8bb97578c 100755
 --- a/gcc/configure
 +++ b/gcc/configure
 @@ -1023,6 +1023,7 @@ enable_maintainer_mode
@@ -81,7 +81,7 @@ index 5ce0557719a..dc2d59701ad 100755
    --enable-plugin         enable plugin support
    --enable-host-shared    build host code as shared libraries
    --disable-libquadmath-support
-@@ -31982,6 +31985,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+@@ -31996,6 +31999,22 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
  fi
  
  
@@ -105,10 +105,10 @@ index 5ce0557719a..dc2d59701ad 100755
  
  
 diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 23bee7010a3..36ce78924de 100644
+index daf2a708c..6155b83a7 100644
 --- a/gcc/configure.ac
 +++ b/gcc/configure.ac
-@@ -7421,6 +7421,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+@@ -7435,6 +7435,22 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
                  [specify that runtime libraries should be
                   installed in a compiler-specific directory])])
  
@@ -132,7 +132,7 @@ index 23bee7010a3..36ce78924de 100644
  AC_SUBST(subdirs)
  AC_SUBST(srcdir)
 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 07b440190c3..b2de464798a 100644
+index ff6c338be..a8ebfa59a 100644
 --- a/gcc/doc/invoke.texi
 +++ b/gcc/doc/invoke.texi
 @@ -379,6 +379,7 @@ Objective-C and Objective-C++ Dialects}.
@@ -159,10 +159,10 @@ index 07b440190c3..b2de464798a 100644
  @opindex Wfloat-equal
  @opindex Wno-float-equal
 diff --git a/gcc/gcc.cc b/gcc/gcc.cc
-index bb07cc244e3..ce161d3c853 100644
+index beefde7f6..4e6557b3c 100644
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -1159,6 +1159,8 @@ proper position among the other output files.  */
+@@ -1162,6 +1162,8 @@ proper position among the other output files.  */
     "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
     "%X %{o*} %{e*} %{N} %{n} %{r}\
      %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -171,7 +171,7 @@ index bb07cc244e3..ce161d3c853 100644
      %{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) " \
      VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
      %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
-@@ -1254,8 +1256,11 @@ static const char *cpp_unique_options =
+@@ -1257,8 +1259,11 @@ static const char *cpp_unique_options =
  static const char *cpp_options =
  "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
   %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
@@ -179,27 +179,27 @@ index bb07cc244e3..ce161d3c853 100644
 - %{undef} %{save-temps*:-fpch-preprocess}";
 + %{!fno-working-directory:-fworking-directory}}} %{O*}"
 +#ifdef POISON_BY_DEFAULT
-+ " -Werror=poison-system-directories"
++ " %{!Wno-error=poison-system-directories:-Werror=poison-system-directories}"
 +#endif
 + " %{undef} %{save-temps*:-fpch-preprocess}";
  
  /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
  
-@@ -1265,7 +1270,11 @@ static const char *cc1_options =
+@@ -1287,7 +1292,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"
++ " %{!Wno-error=poison-system-directories:-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
+index 622204a38..5ac03c086 100644
 --- a/gcc/incpath.cc
 +++ b/gcc/incpath.cc
 @@ -26,6 +26,7 @@


             reply	other threads:[~2022-10-13 13:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 13:29 Peter Kjellerstedt [this message]
2022-10-13 14:05 ` [OE-core] [PATCH] gcc: Allow -Wno-error=poison-system-directories to take effect Ross Burton
2022-10-13 14:38   ` Peter Kjellerstedt
2022-10-13 15:41     ` Khem Raj
2022-10-13 21:21       ` Peter Kjellerstedt
2022-10-13 22:40         ` 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=20221013132926.2771530-1-pkj@axis.com \
    --to=pkj@axis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.