Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Ignore unused arguments for clang as we pass assemb...
details: https://anonhg.NetBSD.org/src/rev/dfb4ff5951a1
branches: trunk
changeset: 343823:dfb4ff5951a1
user: joerg <joerg%NetBSD.org@localhost>
date: Sat Feb 27 19:26:13 2016 +0000
description:
Ignore unused arguments for clang as we pass assembler flags and the
like to the preprocessor-only mode. Conditionalize GCC flags that are
not known to clang accordingly.
diffstat:
sys/arch/sparc/conf/Makefile.sparc | 6 ++++--
sys/arch/sparc/stand/Makefile.inc | 4 ++--
sys/arch/sparc64/conf/Makefile.sparc64 | 7 +++++--
3 files changed, 11 insertions(+), 6 deletions(-)
diffs (71 lines):
diff -r 3cb155b6ee0b -r dfb4ff5951a1 sys/arch/sparc/conf/Makefile.sparc
--- a/sys/arch/sparc/conf/Makefile.sparc Sat Feb 27 19:25:08 2016 +0000
+++ b/sys/arch/sparc/conf/Makefile.sparc Sat Feb 27 19:26:13 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.sparc,v 1.93 2015/08/24 14:04:25 uebayasi Exp $
+# $NetBSD: Makefile.sparc,v 1.94 2016/02/27 19:26:13 joerg Exp $
# Makefile for NetBSD
#
@@ -33,10 +33,12 @@
##
# work around GCC (egcs-2.91.66) bug which is liable
# to use FPU registers as temporaries:
-CFLAGS+= -mno-fpu
+CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mno-fpu :}
CFLAGS+= -Wa,-Av8
+CFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
AFLAGS+= -x assembler-with-cpp
AFLAGS+= -Wa,-Av8
+AFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
##
## (3) libkern and compat
diff -r 3cb155b6ee0b -r dfb4ff5951a1 sys/arch/sparc/stand/Makefile.inc
--- a/sys/arch/sparc/stand/Makefile.inc Sat Feb 27 19:25:08 2016 +0000
+++ b/sys/arch/sparc/stand/Makefile.inc Sat Feb 27 19:26:13 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.10 2005/12/11 12:19:08 christos Exp $
+# $NetBSD: Makefile.inc,v 1.11 2016/02/27 19:26:14 joerg Exp $
.ifndef __INCLUDED_STAND_MAKEFILE_INC
__INCLUDED_STAND_MAKEFILE_INC=
@@ -6,7 +6,7 @@
BINDIR= /usr/mdec
CPPFLAGS+= -DSTANDALONE -I.
-CFLAGS+= -msoft-float -ffreestanding
+CFLAGS+= -ffreestanding ${${ACTIVE_CC} == "gcc":? -msoft-float :}
.if ${MACHINE} == "sparc64"
CPPFLAGS+= -DSUN4U
diff -r 3cb155b6ee0b -r dfb4ff5951a1 sys/arch/sparc64/conf/Makefile.sparc64
--- a/sys/arch/sparc64/conf/Makefile.sparc64 Sat Feb 27 19:25:08 2016 +0000
+++ b/sys/arch/sparc64/conf/Makefile.sparc64 Sat Feb 27 19:26:13 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.sparc64,v 1.80 2015/08/31 08:00:44 martin Exp $
+# $NetBSD: Makefile.sparc64,v 1.81 2016/02/27 19:26:14 joerg Exp $
#=========================================================================
#
@@ -56,6 +56,7 @@
.if ${LP64} == "yes"
# 64-bit kernels
CPPFLAGS+= -D_LP64 -Wa,-Av9a
+CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
AFLAGS+= -Wa,-Av9a
.if defined(PROF)
# Profiling is only supported in the medium low memory model.
@@ -69,9 +70,11 @@
.else
# 32-bit kernels
CPPFLAGS+= -m32 -Wa,-Av8plusa -mcpu=ultrasparc
+CPPFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
AFLAGS+= -Wa,-Av8plusa
+AFLAGS+= ${${ACTIVE_CC} == "clang":? -Qunused-arguments :}
.endif
-CFLAGS+= -mno-fpu
+CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mno-fpu :}
AFLAGS+= -x assembler-with-cpp
##
Home |
Main Index |
Thread Index |
Old Index