summaryrefslogtreecommitdiffstats
path: root/tools/elfutils/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/elfutils/Makefile')
-rw-r--r--tools/elfutils/Makefile20
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index f9c6272719..2605bc61cb 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -19,16 +19,32 @@ PKG_INSTALL:=1
include $(INCLUDE_DIR)/host-build.mk
+ifeq ($(HOST_OS),Darwin)
+ HOST_CFLAGS += -I/opt/homebrew/include
+endif
+
+HOST_CFLAGS += -Wno-error
+
HOST_CONFIGURE_ARGS += \
+ --without-libintl-prefix \
+ --without-libiconv-prefix \
--disable-debuginfod \
--disable-libdebuginfod \
--disable-nls \
--disable-shared \
+ --enable-static \
--without-lzma \
--without-zstd
-HOST_MAKE_FLAGS += \
- SUBDIRS="lib libelf libcpu backends libebl libdwelf libdwfl libdw"
+ifeq ($(HOST_OS),Darwin)
+ HOST_CONFIGURE_ARGS += --disable-symbol-versioning
+endif
+
+Hooks/HostConfigure/Pre := Host/Gnulib $(Hooks/HostConfigure/Pre)
+define Host/Gnulib
+ cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp obstack fts strchrnul progname tsearch;
+ ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
+endef
define Host/Uninstall
-$(call Host/Compile/Default,uninstall)