Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Feb 2017 21:56:31 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r434555 - head/emulators/virtualbox-ose
Message-ID:  <201702212156.v1LLuVY9097723@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Tue Feb 21 21:56:31 2017
New Revision: 434555
URL: https://svnweb.freebsd.org/changeset/ports/434555

Log:
  Warn and stop build if the kernel cannot execute a 32-bit binary.
  
  PR:		193946

Modified:
  head/emulators/virtualbox-ose/Makefile

Modified: head/emulators/virtualbox-ose/Makefile
==============================================================================
--- head/emulators/virtualbox-ose/Makefile	Tue Feb 21 20:51:06 2017	(r434554)
+++ head/emulators/virtualbox-ose/Makefile	Tue Feb 21 21:56:31 2017	(r434555)
@@ -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="${O
 
 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}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702212156.v1LLuVY9097723>