gcc: When cross compiling a target gcc, target flags may be used on the host
authorMark Hatle <mark.hatle@windriver.com>
Mon, 24 Jun 2013 14:44:30 +0000 (09:44 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 25 Jun 2013 16:44:58 +0000 (17:44 +0100)
commita47360cb93e608a4aee03a44747f645420ff45c2
treed2ed2348a33a87a02bb424da314d01e9939878af
parent0c7aed08d6867a1850ebcd4ab1ee1e230929c7a5
gcc: When cross compiling a target gcc, target flags may be used on the host

The original fix worked some of the time, but not on all machines.  Fix
this by applying the change in a different way.  Following the example of
the existing BUILD_CFLAGS.

Below is the commit message from the original change to help explain why
this is needed:

Configure identifies a number of warning flags (WARN_CFLAGS and
WARN_CXXFLAGS) from the $CC value.  The cross compiler may be different
from the host compiler and may not support the same set of flags.  This
leads to problems such as:

cc1plus: error: unrecognized command line option "-Wno-narrowing"
cc1plus: error: unrecognized command line option "-Wno-overlength-strings"

Work around this problem by removing the warning flags from the
BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS.

(From OE-Core rev: be21c6e8e4f810e826538337dac6e34ed96e1f6f)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-4.8/gcc-4.8-build-args.patch