Module Name:    src
Committed By:   christos
Date:           Thu Oct 24 18:46:21 UTC 2019

Modified Files:
        src/compat/arm/oabi: bsd.oabi.mk
        src/share/mk: bsd.own.mk
        src/sys/arch/acorn32/stand: Makefile.buildboot
        src/sys/arch/evbarm/stand/boot2440: Makefile
        src/sys/arch/evbarm/stand/bootimx23: Makefile
        src/sys/arch/evbarm/stand/gzboot: Makefile.gzboot
        src/sys/arch/zaurus/stand/zboot: Makefile

Log Message:
1. All Makefiles that use ARM_APCS_FLAGS add -marm unconditionally and
   bsd.own.mk also adds it for gcc only (so we end up with 2 -marm for gcc).
   Just add -marm unconditionally in bsd.own.mk in ARM_APCS_FLAGS and remove
   it from everywhere else.
2. gcc-8 now warns about thumb internetwork in APCS mode. This does not make
   sense because the documentation says that this flag does not make a
   difference in apcs mode, but might produce larger code in non-APCS mode.
   So we just add it to silence the warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/compat/arm/oabi/bsd.oabi.mk
cvs rdiff -u -r1.1157 -r1.1158 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/acorn32/stand/Makefile.buildboot
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbarm/stand/boot2440/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbarm/stand/bootimx23/Makefile
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/zaurus/stand/zboot/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/compat/arm/oabi/bsd.oabi.mk
diff -u src/compat/arm/oabi/bsd.oabi.mk:1.4 src/compat/arm/oabi/bsd.oabi.mk:1.5
--- src/compat/arm/oabi/bsd.oabi.mk:1.4	Wed Jun 24 18:20:24 2015
+++ src/compat/arm/oabi/bsd.oabi.mk	Thu Oct 24 14:46:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.oabi.mk,v 1.4 2015/06/24 22:20:24 matt Exp $
+#	$NetBSD: bsd.oabi.mk,v 1.5 2019/10/24 18:46:20 christos Exp $
 
 .if !defined(MLIBDIR)
 MLIBDIR=		oabi
@@ -11,6 +11,7 @@ ARM_LD=			-m armelf_nbsd
 LDFLAGS+=		-Wl,-m,armelf_nbsd
 COPTS+=			-mcpu=cortex-a53
 ARM_APCS_FLAGS= ${${ACTIVE_CC} == "clang":? -target arm--netbsdelf -B ${TOOLDIR}/aarch64--netbsd/bin :} -mabi=apcs-gnu -mfloat-abi=soft
+ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
 .elif !empty(MACHINE_ARCH:M*eb)
 ARM_MACHINE_ARCH=	armeb
 ARM_LD=			-m armelfb_nbsd

Index: src/share/mk/bsd.own.mk
diff -u src/share/mk/bsd.own.mk:1.1157 src/share/mk/bsd.own.mk:1.1158
--- src/share/mk/bsd.own.mk:1.1157	Tue Oct 22 09:49:30 2019
+++ src/share/mk/bsd.own.mk	Thu Oct 24 14:46:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.1157 2019/10/22 13:49:30 christos Exp $
+#	$NetBSD: bsd.own.mk,v 1.1158 2019/10/24 18:46:20 christos Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -890,8 +890,8 @@ MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH
 
 .if !empty(MACHINE_ARCH:M*arm*)
 # 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} == "gcc":? -marm :}
+ARM_APCS_FLAGS=	-mabi=apcs-gnu -mfloat-abi=soft -marm
+ARM_APCS_FLAGS+= ${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8:? -mno-thumb-interwork :}
 ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
 .endif
 

Index: src/sys/arch/acorn32/stand/Makefile.buildboot
diff -u src/sys/arch/acorn32/stand/Makefile.buildboot:1.24 src/sys/arch/acorn32/stand/Makefile.buildboot:1.25
--- src/sys/arch/acorn32/stand/Makefile.buildboot:1.24	Sun Apr  9 12:29:46 2017
+++ src/sys/arch/acorn32/stand/Makefile.buildboot	Thu Oct 24 14:46:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.buildboot,v 1.24 2017/04/09 16:29:46 christos Exp $
+#	$NetBSD: Makefile.buildboot,v 1.25 2019/10/24 18:46:20 christos Exp $
 
 S?=	${.CURDIR}/../../../..
 
@@ -40,7 +40,6 @@ CPPFLAGS+=	-D_STANDALONE 
 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
 CPPFLAGS+=	-I${.CURDIR}/../lib
 CPPFLAGS+=	${ARM_APCS_FLAGS} -march=armv3m
-CPPFLAGS+=	-marm
 CPUFLAGS=
 CFLAGS=		-O2
 CFLAGS+=	-ffreestanding -fno-unwind-tables

Index: src/sys/arch/evbarm/stand/boot2440/Makefile
diff -u src/sys/arch/evbarm/stand/boot2440/Makefile:1.18 src/sys/arch/evbarm/stand/boot2440/Makefile:1.19
--- src/sys/arch/evbarm/stand/boot2440/Makefile:1.18	Sat Apr  8 15:53:20 2017
+++ src/sys/arch/evbarm/stand/boot2440/Makefile	Thu Oct 24 14:46:20 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18 2017/04/08 19:53:20 christos Exp $
+#	$NetBSD: Makefile,v 1.19 2019/10/24 18:46:20 christos Exp $
 
 S=		${.CURDIR}/../../../..
 
@@ -16,7 +16,6 @@ CPPFLAGS+=	-DDM9000MAC="0x08,0x08,0x11,0
 CPPFLAGS+=	-DDEFAULT_BOOTFILE="ld0a:netbsd;net:"
 CPPFLAGS+=	-nostdinc -I. -I${.OBJDIR} -I${S} -I${S}/arch
 CPPFLAGS+=	-march=armv4 ${ARM_APCS_FLAGS}
-CPPFLAGS+=	-marm
 CPUFLAGS=
 DBG=		-Os
 

Index: src/sys/arch/evbarm/stand/bootimx23/Makefile
diff -u src/sys/arch/evbarm/stand/bootimx23/Makefile:1.15 src/sys/arch/evbarm/stand/bootimx23/Makefile:1.16
--- src/sys/arch/evbarm/stand/bootimx23/Makefile:1.15	Wed Feb 22 08:14:45 2017
+++ src/sys/arch/evbarm/stand/bootimx23/Makefile	Thu Oct 24 14:46:21 2019
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.15 2017/02/22 13:14:45 maya Exp $
+# $Id: Makefile,v 1.16 2019/10/24 18:46:21 christos Exp $
 
 S=		${.CURDIR}/../../../../
 PROG=		bootimx23
@@ -13,7 +13,6 @@ CPPFLAGS+=	-D_STANDALONE -DMEMSIZE=64
 CPPFLAGS+=	-DKERNEL_BOOT_ARGS=\"root=ld0a\"
 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
 CPPFLAGS+=	${ARM_APCS_FLAGS}
-CPPFLAGS+=	-marm
 #CPPFLAGS+=	-DDEBUG
 #CPPFLAGS+=	-DDIAGNOSTIC
 DBG=		-g

Index: src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot
diff -u src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.36 src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.37
--- src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot:1.36	Sat Apr  8 15:53:20 2017
+++ src/sys/arch/evbarm/stand/gzboot/Makefile.gzboot	Thu Oct 24 14:46:21 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.gzboot,v 1.36 2017/04/08 19:53:20 christos Exp $
+#	$NetBSD: Makefile.gzboot,v 1.37 2019/10/24 18:46:21 christos Exp $
 
 NOMAN=  # defined
 
@@ -37,7 +37,6 @@ CPPFLAGS+= -nostdinc -I. -I${EVBARM_STAN
 CPPFLAGS+= -I${S} -I${S}/arch -I${S}/lib/libsa
 CPPFLAGS+= -I${S}/../common/dist/zlib
 CPPFLAGS+= ${ARM_APCS_FLAGS}
-CPPFLAGS+=	-marm
 
 CPPFLAGS+= -D_STANDALONE
 

Index: src/sys/arch/zaurus/stand/zboot/Makefile
diff -u src/sys/arch/zaurus/stand/zboot/Makefile:1.21 src/sys/arch/zaurus/stand/zboot/Makefile:1.22
--- src/sys/arch/zaurus/stand/zboot/Makefile:1.21	Mon Sep 23 09:42:37 2019
+++ src/sys/arch/zaurus/stand/zboot/Makefile	Thu Oct 24 14:46:21 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.21 2019/09/23 13:42:37 christos Exp $
+#	$NetBSD: Makefile,v 1.22 2019/10/24 18:46:21 christos Exp $
 
 PROG=		zboot
 
@@ -22,7 +22,6 @@ CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I
 CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
 CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
 CPPFLAGS+=	${ARM_APCS_FLAGS} -mcpu=xscale
-CPPFLAGS+=	-marm
 CPUFLAGS=
 AFLAGS+=	-D_LOCORE
 LDFLAGS+=	-nostdlib -Bstatic

Reply via email to