aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-11 07:09:53 +0000
committerSam James <sam@gentoo.org>2023-01-11 07:16:07 +0000
commitc8a1d365ff1349cc438352917863ed98ee34a80f (patch)
tree9c5b12ff707fbffe2ac63484aabd3a89e30184f6
parentinstall-xattr: update copyright year, fix typo (diff)
downloadelfix-c8a1d365ff1349cc438352917863ed98ee34a80f.tar.gz
elfix-c8a1d365ff1349cc438352917863ed98ee34a80f.tar.bz2
elfix-c8a1d365ff1349cc438352917863ed98ee34a80f.zip
fix-gnustack: pass -Wl,-z,execstack for tests with Clang
Clang doesn't create executable stacks by default, so we need to force it for the purposes of the tests. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--misc/fix-gnustack/tests/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/fix-gnustack/tests/Makefile.am b/misc/fix-gnustack/tests/Makefile.am
index ad573a3..17bec0d 100644
--- a/misc/fix-gnustack/tests/Makefile.am
+++ b/misc/fix-gnustack/tests/Makefile.am
@@ -8,8 +8,10 @@ bad-gnustack.s: bad-gnustack.c
$(CC) $(CPPFLAGS) $(CFLAGS) -S $<
$(SED) -i -e 's/GNU-stack,"",/GNU-stack,"x",/' $@
+# Clang doesn't create executable stacks by default, so
+# tests for fix-gnustack fail without this.
bad-gnustack$(EXEEXT): bad-gnustack.s
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,execstack -o $@ $<
check_SCRIPTS = gnustacktest
TEST = $(check_SCRIPTS)