From de633ed60fca535f51a4f6af24c8899321a3d69c Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 23 Aug 2016 05:47:00 +0200 Subject: delete dead code, use -Wdeclaration-after-statement by default Add -Wdeclaration-after-statement when EXTRA_WARNINGS is enabled. --- Rules.mak | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Rules.mak b/Rules.mak index 8d0e66a49..e616e3952 100644 --- a/Rules.mak +++ b/Rules.mak @@ -1,4 +1,4 @@ -# Rules.make for uClibc +# Rules.mak for uClibc # # Copyright (C) 2000-2008 Erik Andersen # @@ -170,7 +170,6 @@ headers_dep := $(top_builddir)include/bits/sysnum.h \ $(top_builddir)include/bits/uClibc_config.h sub_headers := $(headers_dep) -#LIBS :=$(interp) -L$(top_builddir)lib -lc LIBS := $(interp) -L$(top_builddir)lib $(libc:.$(ABI_VERSION)=) # Make sure DESTDIR and PREFIX can be used to install @@ -593,10 +592,9 @@ WARNING_FLAGS += \ -Wnonnull \ -Wold-style-declaration \ -Wold-style-definition \ + -Wdeclaration-after-statement \ -Wshadow \ -Wundef -# Works only w/ gcc-3.4 and up, can't be checked for gcc-3.x w/ check_gcc() -#WARNING_FLAGS-gcc-4 += -Wdeclaration-after-statement endif WARNING_FLAGS += $(WARNING_FLAGS-gcc-$(GCC_MAJOR_VER)) $(foreach w,$(WARNING_FLAGS),$(eval $(call check-gcc-var,$(w)))) @@ -638,9 +636,6 @@ $(eval $(call check-ld-var,--sort-common)) $(eval $(call check-ld-var,--discard-all)) LDFLAGS_NOSTRIP:=$(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) -shared \ -Wl,--warn-common $(CFLAG_-Wl--warn-once) -Wl,-z,combreloc -# binutils-2.16.1 warns about ignored sections, 2.16.91.0.3 and newer are ok -#$(eval $(call check-ld-var,--gc-sections)) -#LDFLAGS_NOSTRIP += $(LDFLAG_--gc-sections) ifeq ($(UCLIBC_BUILD_RELRO),y) LDFLAGS_NOSTRIP+=-Wl,-z,relro -- cgit v1.2.3