Blame SOURCES/glibc-rh1505492-prototypes-activate.patch

147e83
commit 8e2f7c68111ba8fae795ee08b6822e21ab8cfa38
147e83
Author: Joseph Myers <joseph@codesourcery.com>
147e83
Date:   Wed Oct 21 15:14:13 2015 +0000
147e83
147e83
    Use -Wold-style-definition.
147e83
    
147e83
    This patch makes glibc build with -Wold-style-definition to avoid
147e83
    old-style function definitions creeping back in by accident.
147e83
    
147e83
    Tested for x86_64 and x86 (testsuite, and that installed shared
147e83
    libraries are unchanged by the patch).  Also tested build for arm,
147e83
    mips64 and powerpc32.  Hopefully there aren't any remaining
147e83
    system-specific files with old-style definitions whose formatting
147e83
    evaded my searches, but if there are, they will be easy to fix.
147e83
    
147e83
            * Makeconfig (+gccwarn-c): Add -Wold-style-definition.
147e83
            * Makefile ($(objpfx)c++-types-check.out): Filter out
147e83
            $(+gccwarn-c) instead of -Wstrict-prototypes.
147e83
147e83
Conflicts:
147e83
	Makefile
147e83
147e83
Resolved conflict due to missing $(evaluate-test) in the tree (commit
147e83
f0881698bf244bcb16c394d2d6258d975a11baef, Generate .test-result files
147e83
for tests with special rules.).
147e83
147e83
diff --git a/Makeconfig b/Makeconfig
147e83
index 3c0d4abc5f5f30df..f8313c9774d47522 100644
147e83
--- a/Makeconfig
147e83
+++ b/Makeconfig
147e83
@@ -647,7 +647,7 @@ endif
147e83
 ifeq ($(enable-werror),yes)
147e83
 +gccwarn += -Werror
147e83
 endif
147e83
-+gccwarn-c = -Wstrict-prototypes
147e83
++gccwarn-c = -Wstrict-prototypes -Wold-style-definition
147e83
 
147e83
 # We do not depend on the address of constants in different files to be
147e83
 # actually different, so allow the compiler to merge them all.
147e83
diff --git a/Makefile b/Makefile
147e83
index bebb0a865a150a3a..f4128c2627dd0bb9 100644
147e83
--- a/Makefile
147e83
+++ b/Makefile
147e83
@@ -279,7 +279,7 @@ ifneq ($(CXX),no)
147e83
 vpath c++-types.data $(+sysdep_dirs)
147e83
 
147e83
 $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh
147e83
-	scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 -Wstrict-prototypes,$(CFLAGS)) $(CPPFLAGS) > $@
147e83
+	scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@
147e83
 endif
147e83
 
147e83
 $(objpfx)check-local-headers.out: scripts/check-local-headers.sh