[OE-core] [PATCH 1/7] elfutils: fix builds with gcc 4.6
Joshua Lock
josh at linux.intel.com
Tue Apr 5 16:46:24 UTC 2011
On Mon, 2011-04-04 at 18:58 -0700, Khem Raj wrote:
> On 4/1/2011 6:51 AM, Joshua Lock wrote:
> > From: Joshua Lock<josh at linux.intel.com>
> >
> > gcc 4.6 (as used in Fedora 15) adds some extra warnings which are
> > included with Werror. The new unused-but-set variable warning causes
> > an error in libasm of elfutils. Work around this by removing
> > unused-but-set from Werror.
> >
> > Signed-off-by: Joshua Lock<josh at linux.intel.com>
> > ---
> > meta/recipes-devtools/elfutils/elfutils_0.148.bb | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
> > index b2f700e..c395be8 100644
> > --- a/meta/recipes-devtools/elfutils/elfutils_0.148.bb
> > +++ b/meta/recipes-devtools/elfutils/elfutils_0.148.bb
> > @@ -40,6 +40,10 @@ SRC_URI += "\
> >
> > inherit autotools
> >
> > +# GCC 4.6.0 raises an unused-but-set warning in libasm, for now remove
> > +# this warning from Werror
> > +CFLAGS_virtclass-native += "-Wno-error=unused-but-set-variable"
> > +
>
> unused-but-set-variable is a new option in gcc 4.6 which means this will
> cause problems with older gcc's as they wont recognize this option and
> not all distros have gcc 4.6
> as base compiler. Have you tried compiling this patchset on a build
> machine which has older gcc ? say 4.5
I had not but thanks for pointing this out. I'll work up a new patch and
make sure to test it on a machine with an older GCC.
Cheers,
Joshua
--
Joshua Lock
Yocto Build System Monkey
Intel Open Source Technology Centre
More information about the Openembedded-core
mailing list