Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Move flags for ARM's APCS ABI into a common variable. Add so...
details: https://anonhg.NetBSD.org/src/rev/91e1bdccaa3b
branches: trunk
changeset: 325264:91e1bdccaa3b
user: joerg <joerg%NetBSD.org@localhost>
date: Sun Dec 15 18:08:37 2013 +0000
description:
Move flags for ARM's APCS ABI into a common variable. Add some forces to
deal with limitations in the Clang <-> LLVM backend interaction to pick
the correct ABI and target assembler.
diffstat:
compat/arm/oabi/bsd.oabi.mk | 12 ++++++------
share/mk/bsd.own.mk | 8 +++++++-
sys/arch/acorn26/stand/Makefile.buildboot | 4 ++--
sys/arch/acorn32/stand/Makefile.buildboot | 4 ++--
sys/arch/evbarm/stand/boot2440/Makefile | 4 ++--
sys/arch/evbarm/stand/bootimx23/Makefile | 4 ++--
sys/arch/evbarm/stand/gzboot/Makefile.gzboot | 4 ++--
sys/arch/zaurus/stand/zboot/Makefile | 4 ++--
sys/arch/zaurus/stand/zbsdmod/Makefile | 4 ++--
9 files changed, 27 insertions(+), 21 deletions(-)
diffs (173 lines):
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b compat/arm/oabi/bsd.oabi.mk
--- a/compat/arm/oabi/bsd.oabi.mk Sun Dec 15 17:15:34 2013 +0000
+++ b/compat/arm/oabi/bsd.oabi.mk Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.oabi.mk,v 1.1 2013/04/27 08:44:35 matt Exp $
+# $NetBSD: bsd.oabi.mk,v 1.2 2013/12/15 18:08:37 joerg Exp $
MLIBDIR= oabi
.if ${MACHINE_ARCH:M*eb} != ""
@@ -20,10 +20,10 @@
LDELFSO_MACHINE_CPU= ${ARM_MACHINE_ARCH}
GOMP_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
-COPTS+= -mabi=apcs-gnu -mfloat-abi=soft
-CPUFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft
-LDADD+= -mabi=apcs-gnu -mfloat-abi=soft
-LDFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft
-MKDEPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft
+COPTS+= ${ARM_APCS_FLAGS}
+CPUFLAGS+= ${ARM_APCS_FLAGS}
+LDADD+= ${ARM_APCS_FLAGS}
+LDFLAGS+= ${ARM_APCS_FLAGS}
+MKDEPFLAGS+= ${ARM_APCS_FLAGS}
.include "${.PARSEDIR}/../../Makefile.compat"
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b share/mk/bsd.own.mk
--- a/share/mk/bsd.own.mk Sun Dec 15 17:15:34 2013 +0000
+++ b/share/mk/bsd.own.mk Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.own.mk,v 1.757 2013/12/06 23:14:15 matt Exp $
+# $NetBSD: bsd.own.mk,v 1.758 2013/12/15 18:08:37 joerg Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@@ -756,6 +756,12 @@
MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
.endif
+.if !empty(MACHINE_ARCH:Marm*)
+# Flags to pass to CC for using the old APCS ABI on ARM for compat or stand.
+ARM_APCS_FLAGS= -mabi=apcs-gnu -mfloat-abi=soft
+ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
+.endif
+
#
# Determine if arch uses native kernel modules with rump
#
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/acorn26/stand/Makefile.buildboot
--- a/sys/arch/acorn26/stand/Makefile.buildboot Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/acorn26/stand/Makefile.buildboot Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.buildboot,v 1.19 2013/11/04 21:25:22 christos Exp $
+# $NetBSD: Makefile.buildboot,v 1.20 2013/12/15 18:08:37 joerg Exp $
S?= ${.CURDIR}/../../../..
@@ -33,7 +33,7 @@
CPPFLAGS+= -D_STANDALONE -DHIMEM=0x28000
CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
CPPFLAGS+= -I${.CURDIR}/../lib
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -march=armv2
+CPPFLAGS+= ${ARM_APCS_FLAGS} -march=armv2
.if ${HAVE_GCC} < 48
CPPFLAGS+= -mno-thumb -mno-thumb-interwork
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/acorn32/stand/Makefile.buildboot
--- a/sys/arch/acorn32/stand/Makefile.buildboot Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/acorn32/stand/Makefile.buildboot Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.buildboot,v 1.19 2013/11/04 21:25:22 christos Exp $
+# $NetBSD: Makefile.buildboot,v 1.20 2013/12/15 18:08:37 joerg Exp $
S?= ${.CURDIR}/../../../..
@@ -43,7 +43,7 @@
CPPFLAGS+= -D_STANDALONE
CPPFLAGS+= -I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
CPPFLAGS+= -I${.CURDIR}/../lib
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -march=armv3m
+CPPFLAGS+= ${ARM_APCS_FLAGS} -march=armv3m
.if ${HAVE_GCC} < 48
CPPFLAGS+= -mno-thumb -mno-thumb-interwork
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/evbarm/stand/boot2440/Makefile
--- a/sys/arch/evbarm/stand/boot2440/Makefile Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/evbarm/stand/boot2440/Makefile Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2013/12/05 16:26:04 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2013/12/15 18:08:37 joerg Exp $
S= ${.CURDIR}/../../../..
@@ -15,7 +15,7 @@
CPPFLAGS+= -DDM9000MAC="0x08,0x08,0x11,0x18,0x12,0x27"
CPPFLAGS+= -DDEFAULT_BOOTFILE="ld0a:netbsd;net:"
CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} -I${S}/arch
-CPPFLAGS+= -march=armv4 -mabi=apcs-gnu -mfloat-abi=soft
+CPPFLAGS+= -march=armv4 ${ARM_APCS_FLAGS}
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+= -marm
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/evbarm/stand/bootimx23/Makefile
--- a/sys/arch/evbarm/stand/bootimx23/Makefile Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/evbarm/stand/bootimx23/Makefile Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.11 2013/12/05 16:26:04 joerg Exp $
+# $Id: Makefile,v 1.12 2013/12/15 18:08:37 joerg Exp $
S= ${.CURDIR}/../../../../
PROG= bootimx23
@@ -12,7 +12,7 @@
CPPFLAGS+= -D_STANDALONE -DMEMSIZE=64
CPPFLAGS+= -DKERNEL_BOOT_ARGS=\"root=ld0a\"
CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft
+CPPFLAGS+= ${ARM_APCS_FLAGS}
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+= -marm
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/evbarm/stand/gzboot/Makefile.gzboot
--- a/sys/arch/evbarm/stand/gzboot/Makefile.gzboot Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/evbarm/stand/gzboot/Makefile.gzboot Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.gzboot,v 1.28 2013/12/05 16:26:04 joerg Exp $
+# $NetBSD: Makefile.gzboot,v 1.29 2013/12/15 18:08:37 joerg Exp $
NOMAN= # defined
@@ -36,7 +36,7 @@
CPPFLAGS+= -nostdinc -I. -I${EVBARM_STAND}/gzboot -I${EVBARM_STAND}/board
CPPFLAGS+= -I${S} -I${S}/arch -I${S}/lib/libsa
CPPFLAGS+= -I${S}/../common/dist/zlib
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft
+CPPFLAGS+= ${ARM_APCS_FLAGS}
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+= -marm
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/zaurus/stand/zboot/Makefile
--- a/sys/arch/zaurus/stand/zboot/Makefile Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/zaurus/stand/zboot/Makefile Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2013/12/05 16:26:04 joerg Exp $
+# $NetBSD: Makefile,v 1.15 2013/12/15 18:08:37 joerg Exp $
PROG= zboot
@@ -21,7 +21,7 @@
CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE
CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale
+CPPFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale
.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48
CPPFLAGS+= -marm
.else
diff -r 3fb9f1d01a6f -r 91e1bdccaa3b sys/arch/zaurus/stand/zbsdmod/Makefile
--- a/sys/arch/zaurus/stand/zbsdmod/Makefile Sun Dec 15 17:15:34 2013 +0000
+++ b/sys/arch/zaurus/stand/zbsdmod/Makefile Sun Dec 15 18:08:37 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2013/05/01 22:16:16 matt Exp $
+# $NetBSD: Makefile,v 1.8 2013/12/15 18:08:37 joerg Exp $
WARNS?= 4
@@ -21,7 +21,7 @@
COPTS= -Os
CFLAGS+= -fno-strict-aliasing
CFLAGS+= -DMACHINE=\"${MACHINE}\" -DUTS_RELEASE=\"2.4.20\"
-CPPFLAGS+= -mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale
+CPPFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I${.OBJDIR} -I${S}
Home |
Main Index |
Thread Index |
Old Index