Skip to contentSkip to conversation

gcc-7.inc: add new warning "Wnot-cross-compiler"

PATCH In review Juro Bystricky 5 participants 16 messages Jul 18, 2017 – Jul 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc-7.inc: add new warning "Wnot-cross-compiler"

Suppose we have an autotools project that looks like it is using the cross compiler but is actually reaching out to the host compiler instead. On an x86-64 build, you may not even notice.
To be able to prevent this, this patch implements a new gcc warning "Wnot-cross-compiler". The intention here is to intentionally break a build if we are not using a cross-compiler when one is expected to be used.

Expected usage: " -Wnot-cross-compiler -Werror=not-cross-compiler "

[YOCTO #11587]

---
 meta/recipes-devtools/gcc/gcc-7.1.inc              |  1 +
 .../gcc/gcc-7.1/0051-warn-not-cross-compiler.patch | 39 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch
meta/recipes-devtools/gcc/gcc-7.1.inc +1 -0
index 3f1c06d..e9b1f21 100644
@@ -75,6 +75,7 @@ SRC_URI = "\
            file://0048-gcc-Enable-static-PIE.patch \
            file://0049-libsanitizer-Use-stack_t-instead-of-struct-sigaltsta.patch \
            file://0050-replace-struct-ucontext-with-ucontext_t.patch \
+           file://0051-warn-not-cross-compiler.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file +39 -0
new file mode 100644
index 0000000..78671ed
@@ -0,0 +1,39 @@
+ 
+This patch implements an additional gcc command line option warning 
+"Wnot-cross-compiler". The option (if specified) will simply generate 
+a warning if gcc being used is not a cross-compiler. 
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -801,6 +801,10 @@
+ Common Var(warn_vector_operation_performance) Warning
+ Warn when a vector operation is compiled outside the SIMD.
+ 
++Wnot-cross-compiler
++Common Warning
++Warn when not-cross-compiling.
++
+ Xassembler
+ Driver Separate
+ 
+diff --git a/gcc/opts.c b/gcc/opts.c
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -2334,6 +2334,12 @@
+       opts->x_flag_ipa_icf_variables = value;
+       break;
+ 
++    case OPT_Wnot_cross_compiler:
++#ifndef CROSS_DIRECTORY_STRUCTURE
++      warning (OPT_Wnot_cross_compiler, "Not using cross-compiler!");
++#endif
++      break;
++
+     default:
+       /* If the flag was handled in a standard way, assume the lack of
+ 	 processing here is intentional.  */
Signature · 1 line
2.7.4
#1 lore raw
Quoted 8 lines · Juro Bystricky

Suppose we have an autotools project that looks like it is using the cross compiler but is actually reaching out to the host compiler instead. On an x86-64 build, you may not even notice.
To be able to prevent this, this patch implements a new gcc warning "Wnot-cross-compiler". The intention here is to intentionally break a build if we are not using a cross-compiler when one is expected to be used.

Expected usage: " -Wnot-cross-compiler -Werror=not-cross-compiler "will

Shouldn't this patch get applied to native gcc on build hosts ?

And I would suggest to sent it to gcc mailing lists before we apply it to oe

Quoted 78 lines

[YOCTO #11587]

---
 meta/recipes-devtools/gcc/gcc-7.1.inc              |  1 +
 .../gcc/gcc-7.1/0051-warn-not-cross-compiler.patch | 39
++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch

meta/recipes-devtools/gcc/gcc-7.1.inc +1 -0
index 3f1c06d..e9b1f21 100644
@@ -75,6 +75,7 @@ SRC_URI = "\
            file://0048-gcc-Enable-static-PIE.patch \
 
 file://0049-libsanitizer-Use-stack_t-instead-of-struct-sigaltsta.patch \
            file://0050-replace-struct-ucontext-with-ucontext_t.patch \
+           file://0051-warn-not-cross-compiler.patch \
            ${BACKPORTS} \
 "

BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch b/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file mode 100644
index 0000000..78671ed

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file +39 -1
@@ -0,0 +1,39 @@
+
+This patch implements an additional gcc command line option warning
+"Wnot-cross-compiler". The option (if specified) will simply generate
+a warning if gcc being used is not a cross-compiler.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -801,6 +801,10 @@
+ Common Var(warn_vector_operation_performance) Warning
+ Warn when a vector operation is compiled outside the SIMD.
+
++Wnot-cross-compiler
++Common Warning
++Warn when not-cross-compiling.
++
+ Xassembler
+ Driver Separate
+
+diff --git a/gcc/opts.c b/gcc/opts.c
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -2334,6 +2334,12 @@
+       opts->x_flag_ipa_icf_variables = value;
+       break;
+
++    case OPT_Wnot_cross_compiler:
++#ifndef CROSS_DIRECTORY_STRUCTURE
++      warning (OPT_Wnot_cross_compiler, "Not using cross-compiler!");
++#endif
++      break;
++
+     default:
+       /* If the flag was handled in a standard way, assume the lack of
+        processing here is intentional.  */
--

2.7.4

#2 lore raw
Quoted 12 lines · Khem Raj
Quoted 9 lines · Juro Bystricky

Suppose we have an autotools project that looks like it is using the cross compiler but is actually reaching out to the host compiler instead. On an x86-64 build, you may not even notice.
To be able to prevent this, this patch implements a new gcc warning "Wnot-cross-compiler". The intention here is to intentionally break a build
if we are not using a cross-compiler when one is expected to be used.

Quoted 3 lines
Quoted 1 line

Expected usage: " -Wnot-cross-compiler -Werror=not-cross-compiler "will

Shouldn't this patch get applied to native gcc on build hosts ?

Isn't the intention that native gcc won't recognise the new options and will therefore fail if they're accidentally passed to it?

Quoted 84 lines

And I would suggest to sent it to gcc mailing lists before we apply it to oe

Quoted 74 lines

[YOCTO #11587]

---
 meta/recipes-devtools/gcc/gcc-7.1.inc              |  1 +
 .../gcc/gcc-7.1/0051-warn-not-cross-compiler.patch | 39
++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch

meta/recipes-devtools/gcc/gcc-7.1.inc +1 -0
index 3f1c06d..e9b1f21 100644
@@ -75,6 +75,7 @@ SRC_URI = "\
            file://0048-gcc-Enable-static-PIE.patch \
 
 file://0049-libsanitizer-Use-stack_t-instead-of-struct-sigaltsta.patch \
            file://0050-replace-struct-ucontext-with-ucontext_t.patch \
+           file://0051-warn-not-cross-compiler.patch \
            ${BACKPORTS} \
 "

BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch b/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file mode 100644
index 0000000..78671ed

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file +39 -1
@@ -0,0 +1,39 @@
+
+This patch implements an additional gcc command line option warning
+"Wnot-cross-compiler". The option (if specified) will simply generate
+a warning if gcc being used is not a cross-compiler.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -801,6 +801,10 @@
+ Common Var(warn_vector_operation_performance) Warning
+ Warn when a vector operation is compiled outside the SIMD.
+
++Wnot-cross-compiler
++Common Warning
++Warn when not-cross-compiling.
++
+ Xassembler
+ Driver Separate
+
+diff --git a/gcc/opts.c b/gcc/opts.c
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -2334,6 +2334,12 @@
+       opts->x_flag_ipa_icf_variables = value;
+       break;
+
++    case OPT_Wnot_cross_compiler:
++#ifndef CROSS_DIRECTORY_STRUCTURE
++      warning (OPT_Wnot_cross_compiler, "Not using cross-compiler!");
++#endif
++      break;
++
+     default:
+       /* If the flag was handled in a standard way, assume the lack of
+        processing here is intentional.  */
--
Quoted 2 lines

2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 13 lines · Andre McCurdy
Quoted 12 lines · Khem Raj
Quoted 9 lines · Juro Bystricky

Suppose we have an autotools project that looks like it is using the cross compiler but is actually reaching out to the host compiler instead. On an x86-64 build, you may not even notice.
To be able to prevent this, this patch implements a new gcc warning "Wnot-cross-compiler". The intention here is to intentionally break a build
if we are not using a cross-compiler when one is expected to be used.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

Expected usage: " -Wnot-cross-compiler -Werror=not-cross-compiler "will

Shouldn't this patch get applied to native gcc on build hosts ?

Isn't the intention that native gcc won't recognise the new options and will therefore fail if they're accidentally passed to it?

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Quoted 85 lines
Quoted 85 lines

And I would suggest to sent it to gcc mailing lists before we apply it to oe

Quoted 74 lines

[YOCTO #11587]

---
 meta/recipes-devtools/gcc/gcc-7.1.inc              |  1 +
 .../gcc/gcc-7.1/0051-warn-not-cross-compiler.patch | 39
++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch

meta/recipes-devtools/gcc/gcc-7.1.inc +1 -0
index 3f1c06d..e9b1f21 100644
@@ -75,6 +75,7 @@ SRC_URI = "\
            file://0048-gcc-Enable-static-PIE.patch \
 
 file://0049-libsanitizer-Use-stack_t-instead-of-struct-sigaltsta.patch \
            file://0050-replace-struct-ucontext-with-ucontext_t.patch \
+           file://0051-warn-not-cross-compiler.patch \
            ${BACKPORTS} \
 "

BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch b/meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file mode 100644
index 0000000..78671ed

meta/recipes-devtools/gcc/gcc-7.1/0051-warn-not-cross-compiler.patch new file +39 -1
@@ -0,0 +1,39 @@
+
+This patch implements an additional gcc command line option warning
+"Wnot-cross-compiler". The option (if specified) will simply generate
+a warning if gcc being used is not a cross-compiler.
+
+Upstream-Status: Pending
+Signed-off-by: Juro Bystricky <[email protected]>
+
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -801,6 +801,10 @@
+ Common Var(warn_vector_operation_performance) Warning
+ Warn when a vector operation is compiled outside the SIMD.
+
++Wnot-cross-compiler
++Common Warning
++Warn when not-cross-compiling.
++
+ Xassembler
+ Driver Separate
+
+diff --git a/gcc/opts.c b/gcc/opts.c
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -2334,6 +2334,12 @@
+       opts->x_flag_ipa_icf_variables = value;
+       break;
+
++    case OPT_Wnot_cross_compiler:
++#ifndef CROSS_DIRECTORY_STRUCTURE
++      warning (OPT_Wnot_cross_compiler, "Not using cross-compiler!");
++#endif
++      break;
++
+     default:
+       /* If the flag was handled in a standard way, assume the lack of
+        processing here is intentional.  */
--
Quoted 2 lines

2.7.4

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#4 lore raw
Quoted 4 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option. For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’

As for non-gcc compilers: yes, they may silently ignore unrecognized options (which IMHO is just wrong). In that case the new options does not work as intended, but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler -Werror=not-cross-compiler"

#5 lore raw
Quoted 12 lines · Juro
Quoted 4 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option. For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’
Quoted 7 lines

As for non-gcc compilers: yes, they may silently ignore unrecognized options (which IMHO is just wrong). In that case the new options does not work as intended, but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler -Werror=not-cross-compiler"

it solves x86 specific issues alone
and we have to carry this patch since
I have less hopes for gcc to accept it.

Quoted 1 line
#6 lore raw
Quoted 2 lines · Khem Raj

it solves x86 specific issues alone

It solves host = target issues, so if you're building for ARM on an aarch64 server you can have the same issues.

Ross

#7 lore raw
Quoted 9 lines · Ross
Quoted 2 lines · Khem Raj

it solves x86 specific issues alone

It solves host = target issues, so if you're building for ARM on an aarch64 server you can have the same issues.

In theory I agree in practice it may be not that
Common let's see what gcc community has to say about such a patch

Quoted 2 lines

Ross

#8 lore raw
In reply to Bystricky, Juro
Quoted 11 lines · Juro
Quoted 3 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option. For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’
Quoted 6 lines

As for non-gcc compilers: yes, they may silently ignore unrecognized options (which IMHO is just wrong). In that case the new options does not work as intended, but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler -Werror=not-cross-compiler"

Personally, I think we already try to pass too much via CC or the compiler command line (e.g. -fdebug-prefix-map=XXX). Has there ever been any thought of OE providing a toolchain wrapper, which could pass these kinds of housekeeping options to the underlying toolchain while keeping build logs clean and without the worry that CC, CFLAGS, etc get ignored or clobbered by a custom Makefile somewhere?

#9 lore raw
Quoted 18 lines · Andre McCurdy
Quoted 16 lines · Juro
Quoted 3 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option. For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’

As for non-gcc compilers: yes, they may silently ignore unrecognized options (which IMHO is just wrong). In that case the new options does not work as intended, but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

Quoted 8 lines
Quoted 1 line

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler -Werror=not-cross-compiler"

Personally, I think we already try to pass too much via CC or the compiler command line (e.g. -fdebug-prefix-map=XXX). Has there ever been any thought of OE providing a toolchain wrapper, which could pass these kinds of housekeeping options to the underlying toolchain while keeping build logs clean and without the worry that CC, CFLAGS, etc get ignored or clobbered by a custom Makefile somewhere?

we could do it by providing customized spec file
but this will not be good for external toolchains

#10 lore raw
Quoted 32 lines · Khem Raj
Quoted 6 lines · Andre McCurdy
Quoted 4 lines · Juro
Quoted 3 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Quoted 8 lines
Quoted 8 lines

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option. For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’

As for non-gcc compilers: yes, they may silently ignore unrecognized

options

Quoted 1 line
Quoted 1 line

(which IMHO is just wrong). In that case the new options does not work

as intended,

Quoted 4 lines
Quoted 4 lines

but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler

-Werror=not-cross-compiler"

Quoted 7 lines

Personally, I think we already try to pass too much via CC or the compiler command line (e.g. -fdebug-prefix-map=XXX). Has there ever been any thought of OE providing a toolchain wrapper, which could pass these kinds of housekeeping options to the underlying toolchain while keeping build logs clean and without the worry that CC, CFLAGS, etc get ignored or clobbered by a custom Makefile somewhere?

Quoted 4 lines

we could do it by providing customized spec file
but this will not be good for external toolchains
--

I understand that it will only addresses the case where your target = host, though as Ross points out this can apply to more than x86.

I also get that it will not help if the host compiler just eats the warning rather than erroring.

However, there are actual cases where this is an issue and I only noticed it because I happened to be building on an old gcc version that choked on some new flags.

I think a customized spec file could be an even better approach, but in the meantime, it seems like this would help and could be added to distributions that want it (in an overridable way, so you can turn them off in config if you are using an external toolchain).

Also, it doesn't cause harm unless the distro or recipe decides to turn it on. Very Hippocratic compliant!

-b
an intel employee

trivia - turns out "first, do no harm" isn't actually in the Hippocratic Oath, my mistake! https://en.wikipedia.org/wiki/Hippocratic_Oath

#11 lore raw
Quoted 50 lines · Brian Avery
Quoted 34 lines · Khem Raj
Quoted 24 lines · Andre McCurdy
Quoted 19 lines · Juro
Quoted 3 lines

precisely, the problem is that some host compiler may silently ignore unknown warnings and some host may not be using gcc as default system compiler at all e.g. mageia distro and may be more in future.

Yes, it does not nor it attempts to solve all toolchain issues. The expectation is that a compiler will choke on an unrecognized option.
For example, gcc will do the following:

$ gcc -Wnot-cross-compiler hello_world.c
gcc: error: unrecognized command line option ‘-Wnot-cross-compiler’

As for non-gcc compilers: yes, they may silently ignore unrecognized options
(which IMHO is just wrong). In that case the new options does not work as intended,
but it does no harm either.
Anyway, the intended use was to add something like this a .conf file:

Quoted 2 lines

TARGET_CC_ARCH_append_class-target = " -Wnot-cross-compiler -Werror=not-cross-compiler"

Quoted 6 lines

Personally, I think we already try to pass too much via CC or the compiler command line (e.g. -fdebug-prefix-map=XXX). Has there ever been any thought of OE providing a toolchain wrapper, which could pass these kinds of housekeeping options to the underlying toolchain while keeping build logs clean and without the worry that CC, CFLAGS, etc get ignored or clobbered by a custom Makefile somewhere?

Quoted 3 lines

we could do it by providing customized spec file
but this will not be good for external toolchains
--

I understand that it will only addresses the case where your target = host, though as Ross points out this can apply to more than x86.

I also get that it will not help if the host compiler just eats the warning rather than erroring.

Quoted 8 lines

However, there are actual cases where this is an issue and I only noticed it because I happened to be building on an old gcc version that choked on some new flags.

I think a customized spec file could be an even better approach, but in the meantime, it seems like this would help and could be added to distributions that want it (in an overridable way, so you can turn them off in config if you are using an external toolchain).

I would suggest to run it via gcc mailing lists.

Quoted 3 lines

Also, it doesn't cause harm unless the distro or recipe decides to turn it on. Very Hippocratic compliant!

it does cause harm, by making the behaviour inconsistent and highly dependent upon build host.

#12 lore raw
Quoted 4 lines · Khem Raj

it does cause harm, by making the behaviour inconsistent and highly dependent
upon build host.

It *stops* behaviour being dependent on the build host, surely. The problem is that some recipes use the host compiler when they're not meant to be and this can cause subtle (or not so subtle) breakage.

Ross

#13 lore raw
Quoted 10 lines · Ross
Quoted 4 lines · Khem Raj

it does cause harm, by making the behaviour inconsistent and highly dependent
upon build host.

It *stops* behaviour being dependent on the build host, surely. The problem is that some recipes use the host compiler when they're not meant to be and this can cause subtle (or not so subtle) breakage.

Is there an example of a recipe which doing that which went unnoticed? Doesn't the fact that most recipes do get cross compiled (ie x86 target on an x86 host is the corner case) should mean that bugs like that get flushed out pretty quickly?

#14 lore raw
Quoted 8 lines · Andre McCurdy
Quoted 7 lines · Ross
Quoted 4 lines · Khem Raj

it does cause harm, by making the behaviour inconsistent and highly dependent
upon build host.

Quoted 8 lines
Quoted 3 lines

It *stops* behaviour being dependent on the build host, surely. The problem is that some recipes use the host compiler when they're not meant to be and this can cause subtle (or not so subtle) breakage.

Is there an example of a recipe which doing that which went unnoticed? Doesn't the fact that most recipes do get cross compiled (ie x86 target on an x86 host is the corner case) should mean that bugs like that get flushed out pretty quickly?

in general yes, most of the issues should already be addressed since we do cross compile a lot of host != target cases. Case where this might be not catching are cases where the fall back is cross compiler and first choice is native gcc. I agree though to have qualified data to see how often does this occur.

#15 lore raw
In reply to Burton, Ross
Quoted 12 lines · Ross
Quoted 4 lines · Khem Raj

it does cause harm, by making the behaviour inconsistent and highly dependent
upon build host.

It *stops* behaviour being dependent on the build host, surely. The problem is that some recipes use the host compiler when they're not meant to be and this can cause subtle (or not so subtle) breakage.

I think I do understand what it does, all of you dont have to keep repeating that :), my concern is a bit different as explained. Because such
patches are sticky forever, if they dont get accepted into gcc, look at the cross include poisoning patch. If you run it via gcc ml, its possible
they have better suggestions to get the same thing done.

Quoted 2 lines

Ross