Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/compat/arm MKCOMPAT fixes for aarch64
details: https://anonhg.NetBSD.org/src/rev/62ea12213488
branches: trunk
changeset: 331442:62ea12213488
user: matt <matt%NetBSD.org@localhost>
date: Sun Aug 10 23:26:25 2014 +0000
description:
MKCOMPAT fixes for aarch64
diffstat:
compat/arm/eabi/bsd.eabi.mk | 84 ++++++++++++++++++++++++++++++----------
compat/arm/eabihf/Makefile | 5 ++
compat/arm/eabihf/bsd.eabihf.mk | 70 ++++++++++++++++++++++++++++++++++
compat/arm/oabi/bsd.oabi.mk | 41 ++++++++++++++++---
4 files changed, 172 insertions(+), 28 deletions(-)
diffs (245 lines):
diff -r 5f25079408a6 -r 62ea12213488 compat/arm/eabi/bsd.eabi.mk
--- a/compat/arm/eabi/bsd.eabi.mk Sun Aug 10 23:25:49 2014 +0000
+++ b/compat/arm/eabi/bsd.eabi.mk Sun Aug 10 23:26:25 2014 +0000
@@ -1,28 +1,70 @@
-# $NetBSD: bsd.eabi.mk,v 1.2 2013/04/27 08:44:35 matt Exp $
+# $NetBSD: bsd.eabi.mk,v 1.3 2014/08/10 23:26:25 matt Exp $
+
+.if !defined(MLIBDIR)
MLIBDIR= eabi
-.if ${MACHINE_ARCH:M*eb} != ""
-EARM_MACHINE_ARCH= earmeb
-LD+= -m armelfb_nbsd_eabi
+
+EARM_COMPAT_FLAGS= -mfloat-abi=soft
+EARM_COMPAT_FLAGS+= -mabi=aapcs-linux
+MKSOFTFLOAT=yes
+
+.if ${MACHINE_ARCH} == "aarch64eb"
+EARM_COMPAT_FLAGS+= -target armeb--netbsdelf-gnueabi
+EARM_COMPAT_FLAGS+= -mcpu=cortex-a53
+ARM_MACHINE_ARCH= earmv7eb
+LDFLAGS+= -Wl,--be8
+ARM_LD= -m armelfb_nbsd_eabi --be8
+.elif ${MACHINE_ARCH} == "aarch64"
+EARM_COMPAT_FLAGS+= -target arm--netbsdelf-gnueabi
+EARM_COMPAT_FLAGS+= -mcpu=cortex-a53
+ARM_MACHINE_ARCH= earmv7
+ARM_LD= -m armelf_nbsd_eabi
+.elif !empty(MACHINE_ARCH:M*eb)
+EARM_COMPAT_FLAGS+= -target armeb--netbsdelf-gnueabi
+ARM_MACHINE_ARCH= earmeb
+ARM_LD= -m armelfb_nbsd_eabi
.else
-EARM_MACHINE_ARCH= earm
-LD+= -m armelf_nbsd_eabi
+EARM_COMPAT_FLAGS+= -target arm--netbsdelf-gnueabi
+ARM_MACHINE_ARCH= earm
+ARM_LD= -m armelf_nbsd_eabi
.endif
-LIBC_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-LIBGCC_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-COMMON_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-KVM_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-PTHREAD_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-BFD_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-CSU_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
-CRYPTO_MACHINE_CPU= ${EARM_MACHINE_ARCH}
-LDELFSO_MACHINE_CPU= ${EARM_MACHINE_ARCH}
-GOMP_MACHINE_ARCH= ${EARM_MACHINE_ARCH}
+
+EARM_COMPAT_FLAGS+= -B ${TOOLDIR}/aarch64--netbsd/bin
+
+LIBC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBGCC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBEXECINFO_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+COMMON_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+KVM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+PTHREAD_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+BFD_MACHINE_ARCH= earm
+CSU_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+GOMP_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
-COPTS+= -mabi=aapcs-linux -mfloat-abi=soft -Wa,-meabi=5
-CPUFLAGS+= -mabi=aapcs-linux -mfloat-abi=soft -Wa,-meabi=5
-LDADD+= -mabi=aapcs-linux -mfloat-abi=soft -Wa,-meabi=5
-LDFLAGS+= -mabi=aapcs-linux -mfloat-abi=soft -Wa,-meabi=5
-MKDEPFLAGS+= -mabi=aapcs-linux -mfloat-abi=soft -Wa,-meabi=5
+COMMON_MACHINE_CPU= arm
+COMPAT_MACHINE_CPU= arm
+CRYPTO_MACHINE_CPU= arm
+CSU_MACHINE_CPU= arm
+KVM_MACHINE_CPU= arm
+LDELFSO_MACHINE_CPU= arm
+LIBC_MACHINE_CPU= arm
+PTHREAD_MACHINE_CPU= arm
+
+.if defined(ACTIVE_CC)
+EARM_COMPAT_FLAGS+= ${${ACTIVE_CC} == "gcc":?-Wa,-meabi=5:}
+.endif
+
+COPTS+= ${EARM_COMPAT_FLAGS}
+CPUFLAGS+= ${EARM_COMPAT_FLAGS}
+LDADD+= ${EARM_COMPAT_FLAGS}
+LDFLAGS+= ${EARM_COMPAT_FLAGS}
+MKDEPFLAGS+= ${EARM_COMPAT_FLAGS}
.include "${.PARSEDIR}/../../Makefile.compat"
+
+.endif
+
+.if empty(LD:M-m)
+LD+= ${ARM_LD}
+.endif
diff -r 5f25079408a6 -r 62ea12213488 compat/arm/eabihf/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/arm/eabihf/Makefile Sun Aug 10 23:26:25 2014 +0000
@@ -0,0 +1,5 @@
+# $NetBSD: Makefile,v 1.1 2014/08/10 23:26:25 matt Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.eabihf.mk
+
+.include "../../compatsubdir.mk"
diff -r 5f25079408a6 -r 62ea12213488 compat/arm/eabihf/bsd.eabihf.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/arm/eabihf/bsd.eabihf.mk Sun Aug 10 23:26:25 2014 +0000
@@ -0,0 +1,70 @@
+# $NetBSD: bsd.eabihf.mk,v 1.1 2014/08/10 23:26:25 matt Exp $
+
+.if !defined(MLIBDIR)
+
+MLIBDIR= eabihf
+
+EARM_COMPAT_FLAGS= -mfloat-abi=hard
+EARM_COMPAT_FLAGS+= -mabi=aapcs-linux
+MKSOFTFLOAT=no
+
+.if ${MACHINE_ARCH} == "aarch64eb"
+EARM_COMPAT_FLAGS+= -target armeb--netbsdelf-gnueabi
+EARM_COMPAT_FLAGS+= -mcpu=cortex-a53
+ARM_MACHINE_ARCH= earmv7hfeb
+LDFLAGS+= -Wl,--be8
+ARM_LD= -m armelfb_nbsd_eabihf --be8
+.elif ${MACHINE_ARCH} == "aarch64"
+EARM_COMPAT_FLAGS+= -target arm--netbsdelf-gnueabi
+EARM_COMPAT_FLAGS+= -mcpu=cortex-a53
+ARM_MACHINE_ARCH= earmv7hf
+ARM_LD= -m armelf_nbsd_eabihf
+.elif !empty(MACHINE_ARCH:M*eb)
+EARM_COMPAT_FLAGS+= -target armeb--netbsdelf-gnueabi
+ARM_MACHINE_ARCH= earmhfeb
+ARM_LD= -m armelfb_nbsd_eabihf
+.else
+EARM_COMPAT_FLAGS+= -target arm--netbsdelf-gnueabi
+ARM_MACHINE_ARCH= earmhf
+ARM_LD= -m armelf_nbsd_eabihf
+.endif
+
+EARM_COMPAT_FLAGS+= -B ${TOOLDIR}/aarch64--netbsd/bin
+
+LIBC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBGCC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBEXECINFO_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+COMMON_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+KVM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+PTHREAD_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+BFD_MACHINE_ARCH= earmhf
+CSU_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+GOMP_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+
+COMMON_MACHINE_CPU= arm
+COMPAT_MACHINE_CPU= arm
+CRYPTO_MACHINE_CPU= arm
+CSU_MACHINE_CPU= arm
+KVM_MACHINE_CPU= arm
+LDELFSO_MACHINE_CPU= arm
+LIBC_MACHINE_CPU= arm
+PTHREAD_MACHINE_CPU= arm
+
+.if defined(ACTIVE_CC)
+EARM_COMPAT_FLAGS+= ${${ACTIVE_CC} == "gcc":?-Wa,-meabi=5:}
+.endif
+
+COPTS+= ${EARM_COMPAT_FLAGS}
+CPUFLAGS+= ${EARM_COMPAT_FLAGS}
+LDADD+= ${EARM_COMPAT_FLAGS}
+LDFLAGS+= ${EARM_COMPAT_FLAGS}
+MKDEPFLAGS+= ${EARM_COMPAT_FLAGS}
+
+.include "${.PARSEDIR}/../../Makefile.compat"
+
+.endif
+
+.if empty(LD:M-m)
+LD+= ${ARM_LD}
+.endif
diff -r 5f25079408a6 -r 62ea12213488 compat/arm/oabi/bsd.oabi.mk
--- a/compat/arm/oabi/bsd.oabi.mk Sun Aug 10 23:25:49 2014 +0000
+++ b/compat/arm/oabi/bsd.oabi.mk Sun Aug 10 23:26:25 2014 +0000
@@ -1,29 +1,56 @@
-# $NetBSD: bsd.oabi.mk,v 1.2 2013/12/15 18:08:37 joerg Exp $
+# $NetBSD: bsd.oabi.mk,v 1.3 2014/08/10 23:26:26 matt Exp $
+.if !defined(MLIBDIR)
MLIBDIR= oabi
-.if ${MACHINE_ARCH:M*eb} != ""
+
+.if ${MACHINE_ARCH} == "aarch64eb"
+.error oabi is not supported on big endian AARCH64
+.elif ${MACHINE_ARCH} == "aarch64"
+ARM_MACHINE_ARCH= arm
+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
+.elif !empty(MACHINE_ARCH:M*eb)
ARM_MACHINE_ARCH= armeb
-LD+= -m armelfb
+ARM_LD= -m armelfb_nbsd
+LDFLAGS+= -Wl,-m,armelfb_nbsd
.else
ARM_MACHINE_ARCH= arm
-LD+= -m armelf
+ARM_LD= -m armelf_nbsd
+LDFLAGS+= -Wl,-m,armelf_nbsd
.endif
+
LIBC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
LIBGCC_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
LIBEXECINFO_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+LIBM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
COMMON_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
KVM_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
PTHREAD_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
BFD_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
CSU_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
-CRYPTO_MACHINE_CPU= ${ARM_MACHINE_ARCH}
-LDELFSO_MACHINE_CPU= ${ARM_MACHINE_ARCH}
GOMP_MACHINE_ARCH= ${ARM_MACHINE_ARCH}
+COMMON_MACHINE_CPU= arm
+COMPAT_MACHINE_CPU= arm
+CRYPTO_MACHINE_CPU= arm
+CSU_MACHINE_CPU= arm
+KVM_MACHINE_CPU= arm
+LIBC_MACHINE_CPU= arm
+LDELFSO_MACHINE_CPU= arm
+PTHREAD_MACHINE_CPU= arm
+
+MKSOFTFLOAT= yes
COPTS+= ${ARM_APCS_FLAGS}
CPUFLAGS+= ${ARM_APCS_FLAGS}
-LDADD+= ${ARM_APCS_FLAGS}
LDFLAGS+= ${ARM_APCS_FLAGS}
MKDEPFLAGS+= ${ARM_APCS_FLAGS}
.include "${.PARSEDIR}/../../Makefile.compat"
+
+.endif
+
+.if empty(LD:M-m)
+LD+= ${ARM_LD}
+.endif
Home |
Main Index |
Thread Index |
Old Index