From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CE0F61381F3 for ; Wed, 10 Apr 2013 21:48:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 171D5E0850; Wed, 10 Apr 2013 21:48:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 94726E0850 for ; Wed, 10 Apr 2013 21:48:37 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id ABA5433BED7 for ; Wed, 10 Apr 2013 21:48:36 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 559) id 761552171D; Wed, 10 Apr 2013 21:48:35 +0000 (UTC) From: "Mike Frysinger (vapier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, vapier@gentoo.org Subject: [gentoo-commits] gentoo-projects commit in pax-utils: Makefile X-VCS-Repository: gentoo-projects X-VCS-Files: Makefile X-VCS-Directories: pax-utils X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130410214835.761552171D@flycatcher.gentoo.org> Date: Wed, 10 Apr 2013 21:48:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 018a9d6f-3c42-4f37-ac75-6f4697b434aa X-Archives-Hash: e6ede2fe9b6c16c9c7bca5f67502436c vapier 13/04/10 21:48:35 Modified: Makefile Log: add a new check_gcc_many to check a bunch of flags at once, and add new asan flag when debugging Revision Changes Path 1.82 pax-utils/Makefile file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?rev=1.82&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?rev=1.82&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/Makefile?r1=1.81&r2=1.82 Index: Makefile =================================================================== RCS file: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- Makefile 10 Apr 2013 21:42:52 -0000 1.81 +++ Makefile 10 Apr 2013 21:48:35 -0000 1.82 @@ -1,22 +1,25 @@ # Copyright 2003-2006 Ned Ludd # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.81 2013/04/10 21:42:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.82 2013/04/10 21:48:35 vapier Exp $ #################################################################### check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \ then echo "$(1)"; else echo "$(2)"; fi) +check_gcc_many = $(foreach flag,$(1),$(call check_gcc,$(flag))) #################################################################### # Avoid CC overhead when installing ifneq ($(MAKECMDGOALS),install) +_WFLAGS := \ + -Wdeclaration-after-statement \ + -Wextra \ + -Wsequence-point \ + -Wstrict-overflow WFLAGS := -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 \ -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings \ -Wbad-function-cast -Wnested-externs -Wcomment -Winline \ -Wchar-subscripts -Wcast-align -Wno-format-nonliteral \ - $(call check_gcc,-Wdeclaration-after-statement) \ - $(call check_gcc,-Wsequence-point) \ - $(call check_gcc,-Wstrict-overflow) \ - $(call check_gcc,-Wextra) + $(call check_gcc_many,$(_WFLAGS)) endif CFLAGS ?= -O2 -pipe @@ -61,10 +64,13 @@ all: $(OBJS) $(TARGETS) @: +DEBUG_FLAGS = \ + -nopie \ + -fsanitize=address debug: clean - $(MAKE) CFLAGS="$(CFLAGS) -g3 -ggdb $(call check_gcc,-nopie)" all - @-/sbin/chpax -permsx $(ELF_TARGETS) - @-/sbin/paxctl -permsx $(ELF_TARGETS) + $(MAKE) CFLAGS="$(CFLAGS) -g3 -ggdb $(call check_gcc_many,$(DEBUG_FLAGS))" all + @-chpax -permsx $(ELF_TARGETS) + @-paxctl -permsx $(ELF_TARGETS) compile.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS-$<) -o $@ -c $<