Source-Changes-HG archive

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

[src/trunk]: src Put GCC/GAS specific options under ACTIVE_CC == "gcc".



details:   https://anonhg.NetBSD.org/src/rev/f0980a4217e7
branches:  trunk
changeset: 331414:f0980a4217e7
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sun Aug 10 17:44:26 2014 +0000

description:
Put GCC/GAS specific options under ACTIVE_CC == "gcc".

diffstat:

 share/mk/bsd.kmodule.mk                   |   4 ++--
 share/mk/bsd.sys.mk                       |   4 ++--
 sys/arch/evbppc/conf/Makefile.mpc85xx.inc |   8 ++++----
 sys/arch/macppc/conf/Makefile.macppc.inc  |   5 ++---
 sys/arch/macppc/stand/bootxx/Makefile     |   5 +++--
 sys/arch/macppc/stand/ofwboot/Makefile    |   5 +++--
 sys/arch/ofppc/stand/Makefile.inc         |   4 ++--
 sys/arch/ofppc/stand/ofwboot/Makefile     |   5 +++--
 sys/arch/powerpc/conf/Makefile.powerpc    |  12 +++++++-----
 sys/arch/powerpc/include/Makefile.inc     |   4 ++--
 10 files changed, 30 insertions(+), 26 deletions(-)

diffs (183 lines):

diff -r c2bbe66eabcc -r f0980a4217e7 share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk   Sun Aug 10 17:39:11 2014 +0000
+++ b/share/mk/bsd.kmodule.mk   Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.kmodule.mk,v 1.43 2014/03/10 12:13:14 nakayama Exp $
+#      $NetBSD: bsd.kmodule.mk,v 1.44 2014/08/10 17:44:26 joerg Exp $
 
 # We are not building this with PIE
 MKPIE=no
@@ -31,7 +31,7 @@
 .elif ${MACHINE_CPU} == "hppa"
 CFLAGS+=       -mlong-calls
 .elif ${MACHINE_CPU} == "powerpc"
-CFLAGS+=       -mlongcall
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -mlongcall :}
 .elif ${MACHINE_CPU} == "vax"
 CFLAGS+=       -fno-pic
 .endif
diff -r c2bbe66eabcc -r f0980a4217e7 share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk       Sun Aug 10 17:39:11 2014 +0000
+++ b/share/mk/bsd.sys.mk       Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.sys.mk,v 1.241 2014/08/10 05:57:31 matt Exp $
+#      $NetBSD: bsd.sys.mk,v 1.242 2014/08/10 17:44:26 joerg Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -125,7 +125,7 @@
 .endif
 
 .if ${MKSOFTFLOAT:Uno} != "no"
-COPTS+=                -msoft-float
+COPTS+=                ${${ACTIVE_CC} == "gcc":? -msoft-float :}
 FOPTS+=                -msoft-float
 .elif ${MACHINE_ARCH} == "coldfire"
 COPTS+=                -mhard-float
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/evbppc/conf/Makefile.mpc85xx.inc
--- a/sys/arch/evbppc/conf/Makefile.mpc85xx.inc Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/evbppc/conf/Makefile.mpc85xx.inc Sun Aug 10 17:44:26 2014 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: Makefile.mpc85xx.inc,v 1.4 2014/08/08 16:56:31 joerg Exp $
+#      $NetBSD: Makefile.mpc85xx.inc,v 1.5 2014/08/10 17:44:26 joerg Exp $
 
-CFLAGS+=               -misel -Wa,-me500
-CFLAGS+=               -fno-inline-functions-called-once
-AFLAGS+=               -Wa,-me500
+CFLAGS+=               ${${ACTIVE_CC} == "gcc":? -misel -Wa,-me500 :}
+CFLAGS+=               ${${ACTIVE_CC} == "gcc":? -fno-inline-functions-called-once :}
+AFLAGS+=               ${${ACTIVE_CC} == "gcc":? -Wa,-me500 :}
 # gcc emits bad code with these options
 #AFLAGS+=              -mcpu=8548 
 #CFLAGS+=              -mcpu=8548 
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/macppc/conf/Makefile.macppc.inc
--- a/sys/arch/macppc/conf/Makefile.macppc.inc  Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/macppc/conf/Makefile.macppc.inc  Sun Aug 10 17:44:26 2014 +0000
@@ -1,8 +1,7 @@
-#      $NetBSD: Makefile.macppc.inc,v 1.1 2011/06/17 05:17:30 matt Exp $
+#      $NetBSD: Makefile.macppc.inc,v 1.2 2014/08/10 17:44:26 joerg Exp $
 
 .if ${PPC_ARCH_MODE} == "ppc64bridge"
-AOPTS+=        -Wa,-mppc64bridge
+AOPTS+=        ${${ACTIVE_CC} == "gcc":? -Wa,-mppc64bridge :}
 .endif
 
-CFLAGS+=       -Wa,-maltivec
 AFLAGS+=       ${AOPTS}
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/macppc/stand/bootxx/Makefile
--- a/sys/arch/macppc/stand/bootxx/Makefile     Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/macppc/stand/bootxx/Makefile     Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.14 2014/08/08 16:56:31 joerg Exp $
+#      $NetBSD: Makefile,v 1.15 2014/08/10 17:44:26 joerg Exp $
 
 S!=    cd ${.CURDIR}/../../../..; pwd
 
@@ -12,7 +12,8 @@
 LIBCRTEND=     # nothing
 LIBC=          # nothing
 
-CFLAGS=                -Os -Wall -msoft-float -ffreestanding
+CFLAGS=                -Os -Wall -ffreestanding
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -msoft-float :}
 CPPFLAGS+=     -D_STANDALONE -DPPC_OEA -I${.OBJDIR} -I${S}
 STRIPFLAG=
 LINKFLAGS=     -x -N -Ttext 4000 -e _start
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/macppc/stand/ofwboot/Makefile
--- a/sys/arch/macppc/stand/ofwboot/Makefile    Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Makefile    Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.53 2014/08/08 16:56:31 joerg Exp $
+#      $NetBSD: Makefile,v 1.54 2014/08/10 17:44:26 joerg Exp $
 
 S=     ${.CURDIR}/../../../..
 
@@ -7,7 +7,8 @@
 SRCS=          Locore.c boot.c ofdev.c hfs.c net.c netif_of.c alloc.c vers.c
 XCOFFXTRA=     Xcoffxtra.c
 XCOFFXTRAOBJ=  Xcoffxtra.o
-CFLAGS+=       -msoft-float -ffreestanding
+CFLAGS+=       -ffreestanding
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -msoft-float :}
 CFLAGS+=       -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
 #CPPFLAGS+=    -DDEBUG -DNETIF_DEBUG
 CPPFLAGS+=     -D_STANDALONE -DSUPPORT_DHCP
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/ofppc/stand/Makefile.inc
--- a/sys/arch/ofppc/stand/Makefile.inc Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/ofppc/stand/Makefile.inc Sun Aug 10 17:44:26 2014 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: Makefile.inc,v 1.3 1998/05/22 12:56:35 drochner Exp $
+#      $NetBSD: Makefile.inc,v 1.4 2014/08/10 17:44:26 joerg Exp $
 
 BINDIR=                /usr/mdec
 
 CPPFLAGS+=     -D_STANDALONE
 
-CFLAGS+=       -msoft-float
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -msoft-float :}
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/ofppc/stand/ofwboot/Makefile
--- a/sys/arch/ofppc/stand/ofwboot/Makefile     Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/ofppc/stand/ofwboot/Makefile     Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.30 2014/08/08 16:56:31 joerg Exp $
+#      $NetBSD: Makefile,v 1.31 2014/08/10 17:44:26 joerg Exp $
 
 S!=    cd ${.CURDIR}/../../../.. ; pwd
 
@@ -6,7 +6,8 @@
 NOMAN=         # defined
 SRCS=          ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c
 SRCS+=         mbr.c rdb.c vers.c
-CFLAGS+=       -msoft-float -Wno-main -ffreestanding
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -msoft-float :}
+CFLAGS+=       -Wno-main -ffreestanding
 CFLAGS+=       -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
 #CPPFLAGS+=    -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG
 #CPPFLAGS+=    -DOFWDUMP
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/powerpc/conf/Makefile.powerpc
--- a/sys/arch/powerpc/conf/Makefile.powerpc    Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/powerpc/conf/Makefile.powerpc    Sun Aug 10 17:44:26 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.powerpc,v 1.56 2014/08/08 16:56:31 joerg Exp $
+#      $NetBSD: Makefile.powerpc,v 1.57 2014/08/10 17:44:26 joerg Exp $
 #
 # Makefile for NetBSD
 #
@@ -40,15 +40,17 @@
 CPPFLAGS+=     -D${MACHINE}=${MACHINE}
 CWARNFLAGS+=   -Wreturn-type
 .if ${PPCDIR} == "oea"
-CFLAGS+=       -mno-strict-align
-CFLAGS+=       -Wa,-maltivec
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -mno-strict-align :}
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -Wa,-maltivec :}
 .endif
 .if ${PPCDIR} == "booke"
 DEFCOPTS=      -O2
 CFLAGS+=       -fstack-protector
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -misel :}
 .endif
-CFLAGS+=       -msdata=none
-CFLAGS+=       -msoft-float ${CCPUOPTS}
+CFLAGS+=       ${${ACTIVE_CC} == "gcc":? -msdata=none -msoft-float :}
+CFLAGS+=       ${${ACTIVE_CC} == "clang":? -mllvm -disable-ppc-float-in-variadic=true :}
+CFLAGS+=       ${CCPUOPTS}
 AFLAGS+=       ${AOPTS} -D_NOREGNAMES
 
 ##
diff -r c2bbe66eabcc -r f0980a4217e7 sys/arch/powerpc/include/Makefile.inc
--- a/sys/arch/powerpc/include/Makefile.inc     Sun Aug 10 17:39:11 2014 +0000
+++ b/sys/arch/powerpc/include/Makefile.inc     Sun Aug 10 17:44:26 2014 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.2 2011/10/26 15:57:26 chs Exp $
+# $NetBSD: Makefile.inc,v 1.3 2014/08/10 17:44:26 joerg Exp $
 
 .if !defined(_POWERPC_MAKEFILE_INC)
 _POWERPC_MAKEFILE_INC= yes
 
 .if !defined(RUMPKERNEL)
-CFLAGS+= -msoft-float
+CFLAGS+= ${${ACTIVE_CC} == "gcc":? -msoft-float :}
 .endif
 
 .endif



Home | Main Index | Thread Index | Old Index