Page MenuHomeFreeBSD

D40945.diff
No OneTemporary

D40945.diff

diff --git a/Makefile.inc1 b/Makefile.inc1
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -163,6 +163,8 @@
.if ${TARGET_ARCH} == "amd64"
LIBCOMPAT_INCLUDE_DIRS+= i386
+.elif ${TARGET_ARCH} == "aarch64"
+LIBCOMPAT_INCLUDE_DIRS+= arm
.endif
.if ${.MAKE.OS} != "FreeBSD"
diff --git a/Makefile.libcompat b/Makefile.libcompat
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -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)
diff --git a/lib/Makefile b/lib/Makefile
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -203,7 +203,7 @@
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"
diff --git a/share/mk/bsd.compat.mk b/share/mk/bsd.compat.mk
--- a/share/mk/bsd.compat.mk
+++ b/share/mk/bsd.compat.mk
@@ -63,6 +63,25 @@
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}"
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -297,8 +297,8 @@
.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

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 6:24 PM (21 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14646761
Default Alt Text
D40945.diff (1 KB)

Event Timeline