Blame SOURCES/glibc-rh1505492-undef-55.patch

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