Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/arm/atomic Rework to allow thumb armv7 ...
details: https://anonhg.NetBSD.org/src/rev/547c8499b4e3
branches: trunk
changeset: 789449:547c8499b4e3
user: matt <matt%NetBSD.org@localhost>
date: Mon Aug 19 03:55:12 2013 +0000
description:
Rework to allow thumb armv7 compilation.
Add atomic_simplelock.c for thumb
diffstat:
common/lib/libc/arch/arm/atomic/Makefile.inc | 32 +++++++++++++++++++++-------
1 files changed, 24 insertions(+), 8 deletions(-)
diffs (65 lines):
diff -r 035f8f7ae192 -r 547c8499b4e3 common/lib/libc/arch/arm/atomic/Makefile.inc
--- a/common/lib/libc/arch/arm/atomic/Makefile.inc Mon Aug 19 03:54:15 2013 +0000
+++ b/common/lib/libc/arch/arm/atomic/Makefile.inc Mon Aug 19 03:55:12 2013 +0000
@@ -1,22 +1,23 @@
-# $NetBSD: Makefile.inc,v 1.12 2013/08/06 20:49:15 matt Exp $
+# $NetBSD: Makefile.inc,v 1.13 2013/08/19 03:55:12 matt Exp $
-ARMV6= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*}
-ARMV6+= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
-ARMV6+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*}
+ARMV6= ${CPUFLAGS:M-march=armv6*} ${CPUFLAGS:M-mcpu=arm11*}
ARMV6+= ${CFLAGS:M-march=armv6*:} ${CFLAGS:M-mcpu=arm11*}
-ARMV6+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*}
ARMV6+= ${CPPFLAGS:M-march=armv6*:} ${CPPFLAGS:M-mcpu=arm11*}
+ARMV7= ${CPUFLAGS:M-march=armv7*} ${CPUFLAGS:M-mcpu=cortex*}
+ARMV7+= ${CFLAGS:M-march=armv7*:} ${CFLAGS:M-mcpu=cortex*}
+ARMV7+= ${CPPFLAGS:M-march=armv7*:} ${CPPFLAGS:M-mcpu=cortex*}
.if empty(CPPFLAGS:M-D_STANDALONE) \
&& empty(CFLAGS:M-march=*) && empty(CFLAGS:M-mcpu=*) \
&& empty(CPPFLAGS:M-march=*) && empty(CPPFLAGS:M-mcpu=*) \
&& empty(CPUFLAGS:M-march=*) && empty(CPUFLAGS:M-mcpu=*)
-ARMV6+= ${MACHINE_ARCH:Mearmv[67]*}
+ARMV6+= ${MACHINE_ARCH:Mearmv6*}
+ARMV7+= ${MACHINE_ARCH:Mearmv7*}
.endif
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread" \
|| ${LIB} == "rump")
-.if empty(ARMV6)
+.if empty(ARMV6) && empty(ARMV7)
SRCS.atomic+= atomic_add_32_cas.c atomic_add_32_nv_cas.c \
atomic_and_32_cas.c atomic_and_32_nv_cas.c \
atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@@ -34,9 +35,18 @@
.endif
+.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread" || ${LIB} == "rump")
+
+SRCS.atomic+= atomic_simplelock.c
+.if empty(ARMV7)
+CPUFLAGS.atomic_simplelock.c+= -marm
+.endif
+
+.endif
+
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
-.if empty(ARMV6)
+.if empty(ARMV6) && empty(ARMV7)
SRCS.atomic+= atomic_init_testset.c
SRCS.atomic+= atomic_cas_up.S
CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP
@@ -46,4 +56,10 @@
.endif
+.if !empty(ARMV6)
+.for f in ${SRCS.atomic:M*.S}
+CPUFLAGS.$f+= -marm
+.endfor
+.endif
+
SRCS+= ${SRCS.atomic}
Home |
Main Index |
Thread Index |
Old Index