[OE-core] [PATCH 1/7] elfutils: fix builds with gcc 4.6

Khem Raj raj.khem at gmail.com
Tue Apr 5 01:58:04 UTC 2011


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

>   EXTRA_OECONF = "--program-prefix=eu-"
>
>   do_configure_prepend() {





More information about the Openembedded-core mailing list