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