Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/conf Put a band-aid over the cast qualifica...



details:   https://anonhg.NetBSD.org/src/rev/1854afce7105
branches:  trunk
changeset: 581526:1854afce7105
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 02 10:22:20 2005 +0000

description:
Put a band-aid over the cast qualification warnings for oea/pmap.c.
It cannot be compiled with -Wno-cast-qual due to a volatile pointer
being passed to memset(), and there's no easy way other than open-
coding memset() to fix this.  So instead we cheat for now and add
-Wno-cast-qual to CFLAGS for this file.  To be documented in doc/HACKS.

diffstat:

 sys/arch/powerpc/conf/Makefile.powerpc |  4 +++-
 sys/arch/powerpc/conf/files.powerpc    |  4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r d3f163b1b7b8 -r 1854afce7105 sys/arch/powerpc/conf/Makefile.powerpc
--- a/sys/arch/powerpc/conf/Makefile.powerpc    Thu Jun 02 10:16:31 2005 +0000
+++ b/sys/arch/powerpc/conf/Makefile.powerpc    Thu Jun 02 10:22:20 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.powerpc,v 1.33 2005/05/31 04:03:11 christos Exp $
+#      $NetBSD: Makefile.powerpc,v 1.34 2005/06/02 10:22:20 he Exp $
 #
 # Makefile for NetBSD
 #
@@ -45,6 +45,8 @@
 CFLAGS+=       -msoft-float ${CCPUOPTS} -Wa,-maltivec
 AFLAGS+=       ${AOPTS}
 
+CC_NO_CAST_QUAL= CFLAGS="${CFLAGS} -Wno-cast-qual" ${NORMAL_C}
+
 ##
 ## (3) libkern and compat
 ##
diff -r d3f163b1b7b8 -r 1854afce7105 sys/arch/powerpc/conf/files.powerpc
--- a/sys/arch/powerpc/conf/files.powerpc       Thu Jun 02 10:16:31 2005 +0000
+++ b/sys/arch/powerpc/conf/files.powerpc       Thu Jun 02 10:22:20 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.powerpc,v 1.58 2004/07/03 22:17:18 manu Exp $
+#      $NetBSD: files.powerpc,v 1.59 2005/06/02 10:22:20 he Exp $
 
 defflag        opt_altivec.h   ALTIVEC K_ALTIVEC
 defflag        opt_openpic.h   OPENPIC OPENPIC_SERIAL_MODE
@@ -47,7 +47,7 @@
 file   arch/powerpc/oea/altivec.c                      ppc_oea & altivec
 file   arch/powerpc/oea/cpu_subr.c                     ppc_oea
 file   arch/powerpc/oea/oea_machdep.c                  ppc_oea
-file   arch/powerpc/oea/pmap.c                         ppc_oea
+file   arch/powerpc/oea/pmap.c                         ppc_oea compile-with "${CC_NO_CAST_QUAL}"
 file   arch/powerpc/powerpc/fpu.c                      ppc_oea
 file   arch/powerpc/powerpc/trap.c                     ppc_oea
 



Home | Main Index | Thread Index | Old Index