arm64 lib32: enable building of lib32 on arm64
Enable LIB32 option on aarch64, defaulting to YES; it had defaulted to "broken". Add required variables for how to compile lib32 on arm. Use /usr/include/arm for armv7 (32-bit) headers, analogous to /usr/include/i386 on amd64. Omit libomp from lib32; it is not supported on armv7. Reviewed by: jrtc27 Differential Revision: https://reviews.freebsd.org/D40945
This commit is contained in:
@@ -163,6 +163,8 @@ _t= ${TARGET_ARCH}/${TARGET}
|
||||
|
||||
.if ${TARGET_ARCH} == "amd64"
|
||||
LIBCOMPAT_INCLUDE_DIRS+= i386
|
||||
.elif ${TARGET_ARCH} == "aarch64"
|
||||
LIBCOMPAT_INCLUDE_DIRS+= arm
|
||||
.endif
|
||||
|
||||
.if ${.MAKE.OS} != "FreeBSD"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
__<${_this:T}>__:
|
||||
|
||||
# Makefile for the compatibility libraries.
|
||||
# - 32-bit compat libraries on PowerPC, and AMD64.
|
||||
# - 32-bit compat libraries on some 64-bit architectures
|
||||
|
||||
.if defined(_LIBCOMPATS)
|
||||
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ SUBDIR.${MK_PMC}+= libipt
|
||||
SUBDIR.${MK_BHYVE}+= libvmmapi
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} != "powerpc"
|
||||
.if ${MACHINE_ARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm"
|
||||
SUBDIR.${MK_OPENMP}+= libomp
|
||||
.endif
|
||||
.if ${MK_USB} != "no"
|
||||
|
||||
@@ -63,6 +63,25 @@ LIB32_MACHINE= powerpc
|
||||
LIB32_MACHINE_ARCH= powerpc
|
||||
LIB32WMAKEFLAGS= \
|
||||
LD="${XLD} -m elf32ppc_fbsd"
|
||||
|
||||
.elif ${COMPAT_ARCH} == "aarch64"
|
||||
HAS_COMPAT+= 32
|
||||
.if empty(LIB32CPUTYPE)
|
||||
LIB32CPUFLAGS= -march=armv7
|
||||
.else
|
||||
LIB32CPUFLAGS= -mcpu=${LIB32CPUTYPE}
|
||||
.endif
|
||||
|
||||
LIB32CPUFLAGS+= -m32
|
||||
.if ${COMPAT_COMPILER_TYPE} == "gcc"
|
||||
.else
|
||||
LIB32CPUFLAGS+= -target armv7-unknown-freebsd${OS_REVISION}-gnueabihf
|
||||
.endif
|
||||
|
||||
LIB32_MACHINE= arm
|
||||
LIB32_MACHINE_ARCH= armv7
|
||||
LIB32WMAKEFLAGS= \
|
||||
LD="${XLD} -m armelf_fbsd"
|
||||
.endif
|
||||
|
||||
LIB32WMAKEFLAGS+= NM="${XNM}"
|
||||
|
||||
@@ -297,8 +297,8 @@ __DEFAULT_YES_OPTIONS+=LLDB
|
||||
.else
|
||||
__DEFAULT_NO_OPTIONS+=LLDB
|
||||
.endif
|
||||
# LIB32 is supported on amd64 and powerpc64
|
||||
.if (${__T} == "amd64" || ${__T} == "powerpc64")
|
||||
# LIB32 is not supported on all 64-bit architectures.
|
||||
.if (${__T} == "amd64" || ${__T:Maarch64*} != "" || ${__T} == "powerpc64")
|
||||
__DEFAULT_YES_OPTIONS+=LIB32
|
||||
.else
|
||||
BROKEN_OPTIONS+=LIB32
|
||||
|
||||
Reference in New Issue
Block a user