From: Waldemar Brodkorb Date: Tue, 3 Nov 2015 21:04:38 +0000 (+0100) Subject: elfutils: fix sparc64 build, -fPIC required X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc0c66510c1a2290804230c90765bc0d8281dd7e;p=buildroot.git elfutils: fix sparc64 build, -fPIC required Fixes following autobuild errors: http://autobuild.buildroot.net/results/82cc7766d2c805146e94baf82a24d1002f56593d/ http://autobuild.buildroot.net/results/ca4ca362581ee0111cba389d1afbff287692c21b/ Signed-off-by: Waldemar Brodkorb Signed-off-by: Thomas Petazzoni --- diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk index 838c3b881f..d96ef4120e 100644 --- a/package/elfutils/elfutils.mk +++ b/package/elfutils/elfutils.mk @@ -16,9 +16,16 @@ ELFUTILS_PATCH = elfutils-portability-0.161.patch ELFUTILS_AUTORECONF = YES ELFUTILS_CONF_OPTS += --disable-werror +ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) + +# sparc64 needs -fPIC instead of -fpic +ifeq ($(BR2_sparc64),y) +ELFUTILS_CFLAGS += -fPIC +endif + # elfutils gets confused when lfs mode is forced, so don't ELFUTILS_CONF_ENV += \ - CFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))" \ + CFLAGS="$(ELFUTILS_CFLAGS)" \ CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS)