From patchwork Fri Jan 25 05:24:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [[iputils] 6/6] fix handling of CFLAGS Date: Thu, 24 Jan 2013 19:24:15 -0000 From: Mike Frysinger X-Patchwork-Id: 215551 Message-Id: <1359091455-25380-6-git-send-email-vapier@gentoo.org> To: YOSHIFUJI Hideaki Cc: netdev@vger.kernel.org This defaults CFLAGS to -O3 without clobbering settings people have set up in the environment already. Signed-off-by: Mike Frysinger --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2c49940..dc317b1 100644 --- a/Makefile +++ b/Makefile @@ -48,11 +48,10 @@ ENABLE_RDISC_SERVER=no # ------------------------------------- # What a pity, all new gccs are buggy and -Werror does not work. Sigh. -# CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g -CCOPT=-fno-strict-aliasing -Wstrict-prototypes -Wall -g -CCOPTOPT=-O3 -GLIBCFIX=-D_GNU_SOURCE -DEFINES= +# CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall -Werror -g +CFLAGS?=-O3 -g +CFLAGS+=-fno-strict-aliasing -Wstrict-prototypes -Wall +CPPFLAGS+=-D_GNU_SOURCE LDLIB= FUNC_LIB = $(if $(filter static,$(1)),$(LDFLAG_STATIC) $(2) $(LDFLAG_DYNAMIC),$(2)) @@ -113,7 +112,6 @@ IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd IPV6_TARGETS=tracepath6 traceroute6 ping6 TARGETS=$(IPV4_TARGETS) $(IPV6_TARGETS) -CFLAGS=$(CCOPTOPT) $(CCOPT) $(GLIBCFIX) $(DEFINES) LDLIBS=$(LDLIB) $(ADDLIB) UNAME_N:=$(shell uname -n)