summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pratt2024-09-28 11:06:59 +0000
committerRobert Marko2024-09-30 09:07:04 +0000
commit484f71f4e6781587e613d4133a083db03685baaa (patch)
tree2b99c555dc37680ad3cb14c8c18706afb6040b97
parent3f98f685732223c48667208a595a00e316220492 (diff)
downloadopenwrt-484f71f4e6781587e613d4133a083db03685baaa.tar.gz
tools/elfutils: prevent invalid include of stack binary
In some versions of Xcode, some C++ header has an include of the standard C++ header "stack" while "." is in the include paths which can conflict with the binary "stack" built by elfutils. This leads to a decode error as the binary is interpreted as text. Add an arbitrary dependency between stack and the C++ program. Signed-off-by: Michael Pratt <mcpratt@pm.me>
-rw-r--r--tools/elfutils/patches/100-portability.patch10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index be97f95faa..2cc8a4c56e 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -288,3 +288,13 @@
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -92,6 +92,7 @@ strings_LDADD = $(libelf) $(libeu) $(arg
+ ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
+ unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
+ stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
++EXTRA_stack_DEPENDENCIES = $(if $(findstring srcfiles,$(bin_PROGRAMS)),$(srcfiles_OBJECTS))
+ elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
+ elfclassify_LDADD = $(libelf) $(libdw) $(libeu) $(argp_LDADD)
+ srcfiles_SOURCES = srcfiles.cxx