[apparmor] [PATCH 01/20] Update CFLAGS to enable warnings, profiling when in debug and warnings

Steve Beattie steve at nxnw.org
Fri Nov 5 16:22:44 GMT 2010


On Fri, Nov 05, 2010 at 01:50:57AM -0400, John Johansen wrote:
> Signed-off-by: John Johansen <john.johansen at canonical.com>
> ---
>  parser/Makefile                |    4 ++--
>  parser/libapparmor_re/Makefile |    2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/parser/Makefile b/parser/Makefile
> index bfbcef3..709ae30 100644
> --- a/parser/Makefile
> +++ b/parser/Makefile
> @@ -46,10 +46,10 @@ WARNINGS += $(shell for warning in ${EXTRA_WARNINGS} ; do \
>  			fi ; \
>  		done)
>  ifndef CFLAGS
> -CFLAGS	= -g -O2 -pipe
> +CFLAGS	= -g -Wall -O2 -pipe

If you're going to move -Wall to CFLAGS, then remove it from the
WARNINGS definition, which gets added to EXTRA_CFLAGS.

Oh, and I expect any compiler that we compile against these days will support all
the flags in EXTRA_WARNINGS, so we can just remove all the tests around
those.

>  ifdef DEBUG
> -CFLAGS = -g
> +CFLAGS += -pg
>  endif
>  endif #CFLAGS
>  
> diff --git a/parser/libapparmor_re/Makefile b/parser/libapparmor_re/Makefile
> index 4de254c..50367d0 100644
> --- a/parser/libapparmor_re/Makefile
> +++ b/parser/libapparmor_re/Makefile
> @@ -3,7 +3,7 @@
>  
>  TARGET=libapparmor_re.a
>  
> -CFLAGS = -g -Wall -O2 ${EXTRA_CFLAGS}
> +CFLAGS ?= -g -Wall -O2 ${EXTRA_CFLAGS}
>  CXXFLAGS := ${CFLAGS}
>  
>  ARFLAGS=-rcs

Otherwise, ACK.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/apparmor/attachments/20101105/f7dc2183/attachment.pgp 


More information about the AppArmor mailing list