blob: f0c786abf183c7ee191da70aeba43fbc16a0a7fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From 4fb8a9cb2a5410aa565d028bd8deb53d8682da62 Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Fri, 6 Jan 2023 05:39:13 +0000
Subject: [PATCH 1/3] fix-gnustack: respect CFLAGS, LDFLAGS for tests
Needed to correctly run tests with Clang, as Clang doesn't create
executable stacks by default.
Signed-off-by: Sam James <sam@gentoo.org>
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,11 +5,11 @@ noinst_PROGRAMS = bad-gnustack
EXTRA_DIST = gnustacktest.sh
bad-gnustack.s: bad-gnustack.c
- $(CC) -S $<
+ $(CC) $(CPPFLAGS) $(CFLAGS) -S $<
$(SED) -i -e 's/GNU-stack,"",/GNU-stack,"x",/' $@
bad-gnustack$(EXEEXT): bad-gnustack.s
- $(CC) -o $@ $<
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
check_SCRIPTS = gnustacktest
TEST = $(check_SCRIPTS)
--
2.39.0
|