Source-Changes-HG archive

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

[src/trunk]: src Disable new -Wstring-plus-int warning where needed for now.



details:   https://anonhg.NetBSD.org/src/rev/78d867cff8bc
branches:  trunk
changeset: 778556:78d867cff8bc
user:      joerg <joerg%NetBSD.org@localhost>
date:      Wed Apr 04 10:59:44 2012 +0000

description:
Disable new -Wstring-plus-int warning where needed for now.
Adjust various places that add GCC-only options to check for the active
compiler first.

diffstat:

 bin/stty/Makefile                            |   4 +++-
 external/bsd/cron/bin/cron/Makefile          |   4 +++-
 external/gpl2/xcvs/lib/libcvs/Makefile       |   4 +++-
 external/gpl2/xcvs/lib/libdiff/Makefile      |   4 +++-
 external/gpl3/gdb/Makefile.inc               |   5 +++--
 external/mit/xorg/lib/libFS/Makefile         |   4 +++-
 external/mit/xorg/lib/libICE/Makefile        |   4 +++-
 external/mit/xorg/lib/libX11/Makefile.libx11 |   4 +++-
 external/mit/xorg/lib/libXfont/Makefile      |   5 ++---
 gnu/usr.bin/diffutils/diff/Makefile          |   4 ++--
 gnu/usr.bin/rcs/lib/Makefile                 |   4 ++--
 gnu/usr.bin/rcs/rlog/Makefile                |   4 +++-
 lib/libm/Makefile                            |   8 +++-----
 lib/libpthread/Makefile                      |  10 ++++++----
 regress/sys/kern/ras/ras1/Makefile           |   8 +++-----
 regress/sys/kern/ras/ras2/Makefile           |   8 +++-----
 regress/sys/kern/ras/ras3/Makefile           |   8 +++-----
 share/mk/bsd.x11.mk                          |   4 ++--
 tests/lib/libc/ssp/Makefile                  |   7 +++++--
 19 files changed, 58 insertions(+), 45 deletions(-)

diffs (truncated from 367 to 300 lines):

diff -r 14d5ace5d99f -r 78d867cff8bc bin/stty/Makefile
--- a/bin/stty/Makefile Wed Apr 04 10:54:44 2012 +0000
+++ b/bin/stty/Makefile Wed Apr 04 10:59:44 2012 +0000
@@ -1,7 +1,9 @@
-#      $NetBSD: Makefile,v 1.10 1997/07/20 22:38:04 christos Exp $
+#      $NetBSD: Makefile,v 1.11 2012/04/04 10:59:44 joerg Exp $
 #      @(#)Makefile    8.1 (Berkeley) 5/31/93
 
 PROG=  stty
 SRCS=  cchar.c gfmt.c key.c modes.c print.c stty.c
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include <bsd.prog.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc external/bsd/cron/bin/cron/Makefile
--- a/external/bsd/cron/bin/cron/Makefile       Wed Apr 04 10:54:44 2012 +0000
+++ b/external/bsd/cron/bin/cron/Makefile       Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2010/05/06 18:58:45 christos Exp $
+#      $NetBSD: Makefile,v 1.2 2012/04/04 10:59:44 joerg Exp $
 
 BINDIR=        /usr/sbin
 PROG=  cron
@@ -8,4 +8,6 @@
 LDADD+=-lutil
 MAN=   cron.8
 
+CWARNFLAGS+=   -Wno-string-plus-int
+
 .include <bsd.prog.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc external/gpl2/xcvs/lib/libcvs/Makefile
--- a/external/gpl2/xcvs/lib/libcvs/Makefile    Wed Apr 04 10:54:44 2012 +0000
+++ b/external/gpl2/xcvs/lib/libcvs/Makefile    Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2010/12/30 00:46:38 pgoyette Exp $
+#      $NetBSD: Makefile,v 1.11 2012/04/04 10:59:44 joerg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -18,6 +18,8 @@
        stripslash.c vasnprintf.c xalloc-die.c xgetcwd.c xgethostname.c \
        xmalloc.c xreadlink.c yesno.c
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include <bsd.lib.mk>
 # bsd.lib.mk includes bsd.sys.mk which defines the suffix rules, so we
 # need to override after.
diff -r 14d5ace5d99f -r 78d867cff8bc external/gpl2/xcvs/lib/libdiff/Makefile
--- a/external/gpl2/xcvs/lib/libdiff/Makefile   Wed Apr 04 10:54:44 2012 +0000
+++ b/external/gpl2/xcvs/lib/libdiff/Makefile   Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.1 2009/04/08 16:27:52 christos Exp $
+#      $NetBSD: Makefile,v 1.2 2012/04/04 10:59:44 joerg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -11,4 +11,6 @@
 
 SRCS !=        (cd ${DIST} && echo *.c)
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include <bsd.lib.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc external/gpl3/gdb/Makefile.inc
--- a/external/gpl3/gdb/Makefile.inc    Wed Apr 04 10:54:44 2012 +0000
+++ b/external/gpl3/gdb/Makefile.inc    Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.4 2012/02/05 17:47:30 matt Exp $
+# $NetBSD: Makefile.inc,v 1.5 2012/04/04 10:59:45 joerg Exp $
 
 USE_LIBEDIT=no
 USE_TUI=yes
@@ -8,7 +8,8 @@
 CWARNFLAGS.clang+=     -Wno-unused-value -Wno-conversion \
                        -Wno-switch-enum -Wno-parentheses -Wno-comment \
                        -Wno-format-security \
-                       -Wno-tautological-compare -Wno-format-extra-args
+                       -Wno-tautological-compare -Wno-format-extra-args \
+                       -Wno-string-plus-int
 
 .if ${MACHINE} == "vax"
 CWARNFLAGS.gcc+=       -Wno-overflow
diff -r 14d5ace5d99f -r 78d867cff8bc external/mit/xorg/lib/libFS/Makefile
--- a/external/mit/xorg/lib/libFS/Makefile      Wed Apr 04 10:54:44 2012 +0000
+++ b/external/mit/xorg/lib/libFS/Makefile      Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2008/09/13 04:32:29 cube Exp $
+#      $NetBSD: Makefile,v 1.3 2012/04/04 10:59:45 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -12,6 +12,8 @@
        FSQuExt.c FSQXExt.c FSQXInfo.c FSServName.c FSSetCats.c FSSync.c \
        FSSynchro.c fs_transport.c
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 INCS=  FSlib.h
 INCSDIR=${X11INCDIR}/X11/fonts
 
diff -r 14d5ace5d99f -r 78d867cff8bc external/mit/xorg/lib/libICE/Makefile
--- a/external/mit/xorg/lib/libICE/Makefile     Wed Apr 04 10:54:44 2012 +0000
+++ b/external/mit/xorg/lib/libICE/Makefile     Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.2 2008/09/13 04:32:30 cube Exp $
+#      $NetBSD: Makefile,v 1.3 2012/04/04 10:59:45 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -20,5 +20,7 @@
 
 PKGDIST=       ${LIB}
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include <bsd.x11.mk>
 .include <bsd.lib.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc external/mit/xorg/lib/libX11/Makefile.libx11
--- a/external/mit/xorg/lib/libX11/Makefile.libx11      Wed Apr 04 10:54:44 2012 +0000
+++ b/external/mit/xorg/lib/libX11/Makefile.libx11      Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.libx11,v 1.8 2011/02/23 07:53:29 mrg Exp $
+#      $NetBSD: Makefile.libx11,v 1.9 2012/04/04 10:59:45 joerg Exp $
 
 LIB=   X11
 .PATH: ${X11SRCDIR.${LIB}}/src
@@ -462,4 +462,6 @@
 COPTS.OpenDis.c+=      -Wno-error      # XXX xf86bigfstr.h
 COPTS.XlibInt.c+=      -Wno-error      # XXX xcmiscstr.h
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys"
diff -r 14d5ace5d99f -r 78d867cff8bc external/mit/xorg/lib/libXfont/Makefile
--- a/external/mit/xorg/lib/libXfont/Makefile   Wed Apr 04 10:54:44 2012 +0000
+++ b/external/mit/xorg/lib/libXfont/Makefile   Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2011/08/11 23:15:39 joerg Exp $
+#      $NetBSD: Makefile,v 1.9 2012/04/04 10:59:45 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -46,7 +46,6 @@
 CPPFLAGS+=     -I${XFONTDIR}/src/stubs
 CPPFLAGS+=     -I${XFONTDIR}/../include
 
-
 LIBDPLIBS=\
        Xt      ${.CURDIR}/../libXt \
        SM      ${.CURDIR}/../libSM \
@@ -65,7 +64,7 @@
 
 PKGDIST=       ${LIB}
 
-CWARNFLAGS.clang+=     -Wno-tautological-compare
+CWARNFLAGS.clang+=     -Wno-tautological-compare -Wno-string-plus-int
 
 .include <bsd.x11.mk>
 .include <bsd.lib.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc gnu/usr.bin/diffutils/diff/Makefile
--- a/gnu/usr.bin/diffutils/diff/Makefile       Wed Apr 04 10:54:44 2012 +0000
+++ b/gnu/usr.bin/diffutils/diff/Makefile       Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.3 2011/05/26 12:56:27 joerg Exp $
+#      $NetBSD: Makefile,v 1.4 2012/04/04 10:59:46 joerg Exp $
 
 .include "${.CURDIR}/../Makefile.inc"
 
@@ -17,7 +17,7 @@
 
 COPTS.ifdef.c = -Wno-stack-protector
 
-CWARNFLAGS.clang+=     -Wno-unused-value
+CWARNFLAGS.clang+=     -Wno-unused-value -Wno-string-plus-int
 
 .include <bsd.info.mk>
 .include <bsd.prog.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc gnu/usr.bin/rcs/lib/Makefile
--- a/gnu/usr.bin/rcs/lib/Makefile      Wed Apr 04 10:54:44 2012 +0000
+++ b/gnu/usr.bin/rcs/lib/Makefile      Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.23 2011/05/26 12:56:29 joerg Exp $
+#      $NetBSD: Makefile,v 1.24 2012/04/04 10:59:46 joerg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -19,6 +19,6 @@
        rcskeep.c rcskeys.c rcslex.c rcsmap.c rcsrev.c rcssyn.c rcstime.c \
        rcsutil.c version.c
 
-CWARNFLAGS.clang+=     -Wno-format-security
+CWARNFLAGS.clang+=     -Wno-format-security -Wno-string-plus-int
 
 .include <bsd.lib.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc gnu/usr.bin/rcs/rlog/Makefile
--- a/gnu/usr.bin/rcs/rlog/Makefile     Wed Apr 04 10:54:44 2012 +0000
+++ b/gnu/usr.bin/rcs/rlog/Makefile     Wed Apr 04 10:59:44 2012 +0000
@@ -1,7 +1,9 @@
-#      $NetBSD: Makefile,v 1.7 1998/04/20 14:16:01 lukem Exp $
+#      $NetBSD: Makefile,v 1.8 2012/04/04 10:59:46 joerg Exp $
 
 PROG=  rlog
 LINKS= ${BINDIR}/rlog ${BINDIR}/rcslog
 MLINKS=        rlog.1 rcslog.1
 
+CWARNFLAGS.clang+=     -Wno-string-plus-int
+
 .include <bsd.prog.mk>
diff -r 14d5ace5d99f -r 78d867cff8bc lib/libm/Makefile
--- a/lib/libm/Makefile Wed Apr 04 10:54:44 2012 +0000
+++ b/lib/libm/Makefile Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.122 2012/03/21 05:37:42 matt Exp $
+#  $NetBSD: Makefile,v 1.123 2012/04/04 10:59:46 joerg Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -165,10 +165,8 @@
 .PATH: ${.CURDIR}/compat
 COMMON_SRCS+= compat_cabs.c compat_cabsf.c
 # XXX our compatibility cabs() is different!
-.if defined(HAVE_GCC)
-COPTS.compat_cabs.c=   -fno-builtin-cabs
-COPTS.compat_cabsf.c=  -fno-builtin-cabsf
-.endif
+COPTS.compat_cabs.c=   ${${ACTIVE_CC} == "gcc":? -fno-builtin-cabs :}
+COPTS.compat_cabsf.c=  ${${ACTIVE_CC} == "gcc":? -fno-builtin-cabsf :}
 
 # math routines for non-IEEE architectures.
 NOIEEE_SRCS = n_asincos.c n_acosh.c n_asinh.c n_atan.c n_atanh.c n_cosh.c \
diff -r 14d5ace5d99f -r 78d867cff8bc lib/libpthread/Makefile
--- a/lib/libpthread/Makefile   Wed Apr 04 10:54:44 2012 +0000
+++ b/lib/libpthread/Makefile   Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.75 2012/03/21 05:37:43 matt Exp $
+#      $NetBSD: Makefile,v 1.76 2012/04/04 10:59:46 joerg Exp $
 #
 
 WARNS?=        5
@@ -69,21 +69,23 @@
 .include "../../common/lib/libc/arch/${ARCHSUBDIR}/atomic/Makefile.inc"
 .endif
 
+ALIGN_FUNCTIONS=       ${${ACTIVE_CC} == "gcc":? -falign-functions=32 :}
+
 # The TSD routines are used in the implementation of profiling, and so
 # can't be profiled themselves.
-COPTS.pthread_specific.c+=     -fomit-frame-pointer -falign-functions=32
+COPTS.pthread_specific.c+=     -fomit-frame-pointer ${ALIGN_FUNCTIONS}
 pthread_specific.po: pthread_specific.o
        ${_MKTARGET_CREATE}
        cp pthread_specific.o pthread_specific.po
 
 # Internal spinlock routines are performance critical.  Don't profile them,
 # it's incompatibile with -fomit-frame-pointer.
-COPTS.pthread_lock.c+= -fomit-frame-pointer -falign-functions=32
+COPTS.pthread_lock.c+= -fomit-frame-pointer ${ALIGN_FUNCTIONS}
 pthread_lock.po: pthread_lock.o
        ${_MKTARGET_CREATE}
        cp pthread_lock.o pthread_lock.po
 
-COPTS.pthread_mutex.c+=        -fomit-frame-pointer -falign-functions=32
+COPTS.pthread_mutex.c+=        -fomit-frame-pointer ${ALIGN_FUNCTIONS}
 pthread_mutex.po: pthread_mutex.o
        ${_MKTARGET_CREATE}
        cp pthread_mutex.o pthread_mutex.po
diff -r 14d5ace5d99f -r 78d867cff8bc regress/sys/kern/ras/ras1/Makefile
--- a/regress/sys/kern/ras/ras1/Makefile        Wed Apr 04 10:54:44 2012 +0000
+++ b/regress/sys/kern/ras/ras1/Makefile        Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2011/06/20 07:43:59 mrg Exp $
+#      $NetBSD: Makefile,v 1.6 2012/04/04 10:59:47 joerg Exp $
 
 NOMAN= #defined
 
@@ -12,9 +12,7 @@
                echo "FAILED";          \
        fi
 
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -fno-reorder-blocks :}
+
 .include <bsd.prog.mk>
 
-.if defined(HAVE_GCC)
-CFLAGS+=       -fno-reorder-blocks
-.endif
-
diff -r 14d5ace5d99f -r 78d867cff8bc regress/sys/kern/ras/ras2/Makefile
--- a/regress/sys/kern/ras/ras2/Makefile        Wed Apr 04 10:54:44 2012 +0000
+++ b/regress/sys/kern/ras/ras2/Makefile        Wed Apr 04 10:59:44 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.5 2011/06/20 07:43:59 mrg Exp $
+#      $NetBSD: Makefile,v 1.6 2012/04/04 10:59:47 joerg Exp $
 
 NOMAN= #defined
 
@@ -12,8 +12,6 @@
                echo "FAILED";          \
        fi



Home | Main Index | Thread Index | Old Index