ELFUTILS_AUTORECONF = YES
ELFUTILS_CONF_OPTS += --disable-werror
+# elfutils gets confused when lfs mode is forced, so don't
+ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
+ELFUTILS_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
+
# 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_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS))
-ELFUTILS_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))
-
ELFUTILS_CONF_ENV += \
CFLAGS="$(ELFUTILS_CFLAGS)" \
CPPFLAGS="$(ELFUTILS_CPPFLAGS)"