[OE-core] [PATCH] gcc-7.inc: add new warning "Wnot-cross-compiler"
Khem Raj
raj.khem at gmail.com
Wed Jul 19 22:32:10 UTC 2017
On Wed, Jul 19, 2017 at 5:57 PM, Bystricky, Juro
<juro.bystricky at intel.com> wrote:
>> 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"
>
it solves x86 specific issues alone
and we have to carry this patch since
I have less hopes for gcc to accept it.
>
More information about the Openembedded-core
mailing list