|
|
25845f |
commit 9536661c6e8045f810cd227a7d676eaff19bf1b8
|
|
|
25845f |
Author: Joseph Myers <joseph@codesourcery.com>
|
|
|
25845f |
Date: Wed Aug 19 00:51:07 2015 +0000
|
|
|
25845f |
|
|
|
25845f |
Fix -Wundef warnings in elf/tst-execstack.c.
|
|
|
25845f |
|
|
|
25845f |
To remove -Wno-error=undef, we need to fix the remaining cases where
|
|
|
25845f |
there are -Wundef warnings in the testsuite. One of those places is
|
|
|
25845f |
in elf/tst-execstack.c.
|
|
|
25845f |
|
|
|
25845f |
tst-execstack.c tests USE_PTHREADS with #if. nptl/tst-execstack.c
|
|
|
25845f |
defines USE_PTHREADS to 1 before including ../elf/tst-execstack.c,
|
|
|
25845f |
while elf/tst-execstack.c, when compiled directly, leaves it
|
|
|
25845f |
undefined.
|
|
|
25845f |
|
|
|
25845f |
This patch adds a setting of CPPFLAGS-tst-execstack.c to
|
|
|
25845f |
elf/Makefile. An alternative approach would be to rename
|
|
|
25845f |
tst-execstack.c to tst-execstack-main.c and have two different
|
|
|
25845f |
tst-execstack.c files include it, each with an appropriate
|
|
|
25845f |
USE_PTHREADS #define.
|
|
|
25845f |
|
|
|
25845f |
Tested for x86_64.
|
|
|
25845f |
|
|
|
25845f |
* elf/Makefile [$(have-z-execstack) = yes]
|
|
|
25845f |
(CPPFLAGS-tst-execstack.c): New variable.
|
|
|
25845f |
|
|
|
25845f |
diff --git a/elf/Makefile b/elf/Makefile
|
|
|
25845f |
index 862e04eb484fa3f5..dea66ca1c12e5c29 100644
|
|
|
25845f |
--- a/elf/Makefile
|
|
|
25845f |
+++ b/elf/Makefile
|
|
|
25845f |
@@ -866,6 +866,7 @@ endif
|
|
|
25845f |
ifeq ($(have-z-execstack),yes)
|
|
|
25845f |
$(objpfx)tst-execstack: $(libdl)
|
|
|
25845f |
$(objpfx)tst-execstack.out: $(objpfx)tst-execstack-mod.so
|
|
|
25845f |
+CPPFLAGS-tst-execstack.c = -DUSE_PTHREADS=0
|
|
|
25845f |
LDFLAGS-tst-execstack = -Wl,-z,noexecstack
|
|
|
25845f |
LDFLAGS-tst-execstack-mod = -Wl,-z,execstack
|
|
|
25845f |
|