Source-Changes-HG archive

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

[src/trunk]: src Deal with optional HAVE_GCC.



details:   https://anonhg.NetBSD.org/src/rev/af62af65a67e
branches:  trunk
changeset: 780887:af62af65a67e
user:      joerg <joerg%NetBSD.org@localhost>
date:      Fri Aug 10 16:05:26 2012 +0000

description:
Deal with optional HAVE_GCC.

diffstat:

 external/gpl3/Makefile                 |  4 +++-
 external/historical/nawk/bin/Makefile  |  4 +---
 external/lgpl3/gmp/lib/libgmp/Makefile |  4 +---
 sys/conf/Makefile.kern.inc             |  8 ++------
 sys/lib/libkern/Makefile.inc           |  4 +++-
 sys/lib/libsa/Makefile                 |  4 +---
 sys/rump/Makefile.rump                 |  4 ++--
 7 files changed, 13 insertions(+), 19 deletions(-)

diffs (161 lines):

diff -r 4c68143a6d5e -r af62af65a67e external/gpl3/Makefile
--- a/external/gpl3/Makefile    Fri Aug 10 16:04:28 2012 +0000
+++ b/external/gpl3/Makefile    Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.6 2011/10/31 08:14:44 mrg Exp $
+#      $NetBSD: Makefile,v 1.7 2012/08/10 16:05:26 joerg Exp $
 
 .include <bsd.own.mk>
 
@@ -6,11 +6,13 @@
 SUBDIR+=       binutils
 .endif
 
+.if ${MKGCC} != "no"
 .if ${HAVE_GCC} == 45
 .if ${MKGCCCMDS} != "no"
 SUBDIR+=       gcc
 .endif
 .endif
+.endif
 
 .if ${MKGDB} != "no"
 .if ${HAVE_GDB} == "7"
diff -r 4c68143a6d5e -r af62af65a67e external/historical/nawk/bin/Makefile
--- a/external/historical/nawk/bin/Makefile     Fri Aug 10 16:04:28 2012 +0000
+++ b/external/historical/nawk/bin/Makefile     Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.8 2011/08/16 10:45:37 christos Exp $
+#      $NetBSD: Makefile,v 1.9 2012/08/10 16:05:26 joerg Exp $
 
 WARNS?= 4
 CWARNFLAGS.clang+=     -Wno-self-assign
@@ -17,9 +17,7 @@
 DPADD+=        ${LIBM}
 .endif
 YHEADER=       yes
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
 COPTS+=        -Wno-pointer-sign
-.endif
 COPTS.run.c += -Wno-format-nonliteral
 COPTS.tran.c += -Wno-format-nonliteral
 
diff -r 4c68143a6d5e -r af62af65a67e external/lgpl3/gmp/lib/libgmp/Makefile
--- a/external/lgpl3/gmp/lib/libgmp/Makefile    Fri Aug 10 16:04:28 2012 +0000
+++ b/external/lgpl3/gmp/lib/libgmp/Makefile    Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.12 2011/09/21 02:06:42 mrg Exp $
+#      $NetBSD: Makefile,v 1.13 2012/08/10 16:05:26 joerg Exp $
 
 .include <bsd.init.mk>
 
@@ -191,8 +191,6 @@
 
 # Don't warn about functions which cannot be stack smash protected as
 # there are a lot of them.
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
 COPTS += -Wno-stack-protector
-.endif
 
 CWARNFLAGS.clang+=     -Wno-unused-value -Wno-tautological-compare
diff -r 4c68143a6d5e -r af62af65a67e sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Fri Aug 10 16:04:28 2012 +0000
+++ b/sys/conf/Makefile.kern.inc        Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.157 2012/07/27 05:40:51 matt Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.158 2012/08/10 16:05:26 joerg Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -70,7 +70,6 @@
 CWARNFLAGS+=   -Wswitch -Wshadow
 CWARNFLAGS+=   -Wcast-qual -Wwrite-strings
 CWARNFLAGS+=   -Wno-unreachable-code
-. if defined(HAVE_GCC) || defined(HAVE_PCC)
 CWARNFLAGS+=   -Wno-pointer-sign -Wno-attributes
 .  if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
        ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
@@ -79,7 +78,6 @@
 .  if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64"
 CWARNFLAGS+=   -Wold-style-definition
 .  endif
-. endif
 # Add -Wno-sign-compare.  -Wsign-compare is included in -Wall as of GCC 3.3,
 # but our sources aren't up for it yet.
 CWARNFLAGS+=   -Wno-sign-compare
@@ -96,7 +94,7 @@
 AFLAGS+=       -D_LOCORE -Wa,--fatal-warnings
 
 # XXX
-.if defined(HAVE_GCC)
+.if defined(HAVE_GCC) || defined(HAVE_LLVM)
 CFLAGS+=       -fno-strict-aliasing
 CFLAGS+=       -fno-common
 .endif
@@ -566,11 +564,9 @@
     uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \
     dev/ofw/ofw_subr.c
 
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
 .for __varstack in ${VARSTACK}
 COPTS.${__varstack:T} += -Wno-stack-protector
 .endfor
-.endif
 
 AFLAGS+=       ${AOPTS.${.IMPSRC:T}}
 CFLAGS+=       ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}}
diff -r 4c68143a6d5e -r af62af65a67e sys/lib/libkern/Makefile.inc
--- a/sys/lib/libkern/Makefile.inc      Fri Aug 10 16:04:28 2012 +0000
+++ b/sys/lib/libkern/Makefile.inc      Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.40 2005/12/20 19:35:26 christos Exp $
+#      $NetBSD: Makefile.inc,v 1.41 2012/08/10 16:05:27 joerg Exp $
 #
 #      Configuration variables (default values are below):
 #
@@ -47,6 +47,8 @@
            KERNCPPFLAGS=${CPPFLAGS:S@^-I.@-I${KERNDOTDIR}@g:Q} \
            KERNMISCCPPFLAGS=${KERNMISCCPPFLAGS:Q} \
            LINTFLAGS=${KERNLINTFLAGS:Q} \
+           LIBKERN_ARCH=${LIBKERN_ARCH:Q} \
+           COMMON_MACHINE_ARCH=${COMMON_MACHINE_ARCH:Q} \
            ${KERNMISCMAKEFLAGS}
 
 ${KERNLIB}:            .NOTMAIN .MAKE __always_make_kernlib
diff -r 4c68143a6d5e -r af62af65a67e sys/lib/libsa/Makefile
--- a/sys/lib/libsa/Makefile    Fri Aug 10 16:04:28 2012 +0000
+++ b/sys/lib/libsa/Makefile    Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.77 2012/01/16 18:44:13 christos Exp $
+#      $NetBSD: Makefile,v 1.78 2012/08/10 16:05:27 joerg Exp $
 
 LIB=   sa
 NOPIC= # defined
@@ -91,9 +91,7 @@
        @rm -f lib${LIB}.o
        @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
 
-.if defined(HAVE_GCC) || defined(HAVE_PCC)
 CPPFLAGS+=     -Wno-pointer-sign
-.endif
 
 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax"
 COPTS.bootp.c+=        -O0
diff -r 4c68143a6d5e -r af62af65a67e sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump    Fri Aug 10 16:04:28 2012 +0000
+++ b/sys/rump/Makefile.rump    Fri Aug 10 16:05:26 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.rump,v 1.62 2012/08/05 15:37:39 pooka Exp $
+#      $NetBSD: Makefile.rump,v 1.63 2012/08/10 16:05:27 joerg Exp $
 #
 
 WARNS?=                3       # XXX: src/sys won't compile with -Wsign-compare yet
@@ -16,7 +16,7 @@
 .endif
 
 CFLAGS+=       -ffreestanding -fno-strict-aliasing
-.if defined(HAVE_GCC) && ${HAVE_GCC} >= 3
+.if (defined(HAVE_GCC) && ${HAVE_GCC} >= 3) || defined(HAVE_LLVM)
 CFLAGS+=       -Wsign-compare
 CFLAGS+=       -Wno-pointer-sign -Wno-attributes
 CFLAGS+=       -std=gnu99



Home | Main Index | Thread Index | Old Index