[OE-core] [PATCH] gcc-7.inc: add new warning "Wnot-cross-compiler"
Bystricky, Juro
juro.bystricky at intel.com
Wed Jul 19 21:57:05 UTC 2017
> 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"
More information about the Openembedded-core
mailing list