From 417b55d96e19aeb7433b6df93af4745bfb01ee25 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 19 Dec 2011 14:06:16 +0000 Subject: [PATCH] Move Clang-warning flags for ah_regdomain.c into sys/conf, they are platform independent. Use the selective -Wno-* flags instead of -Wno-error. --- sys/arch/amd64/conf/Makefile.amd64 | 3 +-- sys/arch/i386/conf/Makefile.i386 | 3 +-- sys/arch/xen/conf/Makefile.xen | 4 +--- sys/conf/Makefile.kern.inc | 5 ++++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64 index 5072b54f0f58..7fe1d9c2d4c5 100644 --- a/sys/arch/amd64/conf/Makefile.amd64 +++ b/sys/arch/amd64/conf/Makefile.amd64 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.amd64,v 1.39 2011/09/14 14:59:29 christos Exp $ +# $NetBSD: Makefile.amd64,v 1.40 2011/12/19 14:06:16 joerg Exp $ # Makefile for NetBSD # @@ -66,7 +66,6 @@ spl.o: ${AMD64}/amd64/spl.S assym.h AFLAGS.locore.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.mptramp.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.spl.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} -CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":?-Wno-error:} ## ## (5) link settings diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386 index 9605b57581db..737e7de399e3 100644 --- a/sys/arch/i386/conf/Makefile.i386 +++ b/sys/arch/i386/conf/Makefile.i386 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.i386,v 1.175 2011/09/14 14:58:08 christos Exp $ +# $NetBSD: Makefile.i386,v 1.176 2011/12/19 14:06:16 joerg Exp $ # Makefile for NetBSD # @@ -37,7 +37,6 @@ CPPFLAGS+= -Di386 CFLAGS+= -mno-sse -mno-sse2 -mno-sse3 AFLAGS.mptramp.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} -CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":?-Wno-error:} AFLAGS.spl.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} AFLAGS.lock_stubs.S= ${${ACTIVE_CC} == "clang":?-no-integrated-as:} diff --git a/sys/arch/xen/conf/Makefile.xen b/sys/arch/xen/conf/Makefile.xen index 99523ef77388..22073c675f46 100644 --- a/sys/arch/xen/conf/Makefile.xen +++ b/sys/arch/xen/conf/Makefile.xen @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.xen,v 1.34 2011/08/17 21:42:16 joerg Exp $ +# $NetBSD: Makefile.xen,v 1.35 2011/12/19 14:06:17 joerg Exp $ # NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp # Makefile for NetBSD @@ -55,8 +55,6 @@ CFLAGS+= -mno-red-zone ## KERN_AS= obj -CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":?-Wno-error:} - ## ## (4) local objects, compile rules, and dependencies ## diff --git a/sys/conf/Makefile.kern.inc b/sys/conf/Makefile.kern.inc index ef7165f246e6..f52d654c6e33 100644 --- a/sys/conf/Makefile.kern.inc +++ b/sys/conf/Makefile.kern.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.149 2011/09/25 22:26:33 joerg Exp $ +# $NetBSD: Makefile.kern.inc,v 1.150 2011/12/19 14:06:17 joerg Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -83,6 +83,9 @@ CWARNFLAGS+= -Wno-sign-compare CWARNFLAGS.clang+= -Wno-unknown-pragmas -Wno-conversion \ -Wno-self-assign +CWARNFLAGS.ah_regdomain.c= ${${ACTIVE_CC} == "clang":? \ + -Wno-shift-count-negative -Wno-shift-count-overflow:} + CFLAGS+= -ffreestanding -fno-zero-initialized-in-bss CFLAGS+= ${DEBUG} ${COPTS} AFLAGS+= -D_LOCORE -Wa,--fatal-warnings