aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/Makefile b/elf/Makefile
index b0420f5..bba6493 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -899,8 +899,14 @@ $(objpfx)check-textrel: check-textrel.c
$(native-compile)
check-execstack-CFLAGS = -O -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -std=gnu99
+# Perform the same operation as $(native-compile) but add the sysdeps
+# directories as header search locations.
$(objpfx)check-execstack: check-execstack.c
- $(native-compile)
+ $(make-target-directory)
+ $(patsubst %/,cd % &&,$(objpfx)) \
+ $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
+ $(addprefix -I$(shell pwd)/,$(sysdirs)) -I$(shell pwd) \
+ $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
check-localplt-CFLAGS = -O -Wall -D_GNU_SOURCE -std=gnu99
$(objpfx)check-localplt: check-localplt.c