aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2017-02-22 05:56:31 +0800
committerjkim <jkim@FreeBSD.org>2017-02-22 05:56:31 +0800
commitbc93589a07f3fb262321b6c1829326b2eca0f457 (patch)
tree100fb4437401df416afd507b31a6f3f206f24f8b
parent40854c9d5bb7dbb546bce6f6786212a17b339d69 (diff)
downloadfreebsd-ports-gnome-bc93589a07f3fb262321b6c1829326b2eca0f457.tar.gz
freebsd-ports-gnome-bc93589a07f3fb262321b6c1829326b2eca0f457.tar.zst
freebsd-ports-gnome-bc93589a07f3fb262321b6c1829326b2eca0f457.zip
Warn and stop build if the kernel cannot execute a 32-bit binary.
PR: 193946
-rw-r--r--emulators/virtualbox-ose/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index 5126ebebfae4..4c8ffbafc754 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -120,6 +120,10 @@ OPTIONS_DEFAULT+= PYTHON
CONFLICTS_INSTALL+= virtualbox-ose-[0-9]*
.endif
+.if ${ARCH} == "amd64"
+_ELF32!= kldstat -q -m elf32 && echo yes || echo no
+.endif
+
.if ${PORT_OPTIONS:MNLS} && empty(PORT_OPTIONS:MQT[45])
BROKEN= NLS support requires QT frontend. Run 'make config' again!
.endif
@@ -241,7 +245,11 @@ CONFIGURE_ARGS+= --with-openssl-dir="${OPENSSLBASE}"
pre-everything::
.if ${ARCH} == "amd64"
-.if !exists(/usr/lib32/libc.so)
+.if ${_ELF32} != yes
+ @${ECHO} 'Requires 32-bit runtime support in kernel.'
+ @${ECHO} 'Rebuild kernel with "options COMPAT_FREEBSD32" and reboot.'
+ @${FALSE}
+.elif !exists(/usr/lib32/libc.so)
@${ECHO} 'Requires 32-bit libraries installed under /usr/lib32.'
@${ECHO} 'Do: cd /usr/src; make build32 install32; /etc/rc.d/ldconfig restart'
@${FALSE}