diff options
| author | Felix Fietkau <nbd@nbd.name> | 2023-01-11 18:41:22 +0100 |
|---|---|---|
| committer | Felix Fietkau <nbd@nbd.name> | 2023-10-29 15:56:46 +0100 |
| commit | 5331e85d96346be4200ce206b2f4373e23af0f6f (patch) | |
| tree | e1a4287a6e836c11b13be8fbbd739561be3929c1 /tools/elfutils/Makefile | |
| parent | 169757c7fd483787fb910c9d7b366fcd91ead49f (diff) | |
| download | upstream-5331e85d96346be4200ce206b2f4373e23af0f6f.tar.gz upstream-5331e85d96346be4200ce206b2f4373e23af0f6f.tar.bz2 upstream-5331e85d96346be4200ce206b2f4373e23af0f6f.zip | |
elfutils: fix build and enable on non-linux systems
Use gnulib for compatibility
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools/elfutils/Makefile')
| -rw-r--r-- | tools/elfutils/Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile index f9c6272719c..2605bc61cb7 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) |
