summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2014-05-14 12:27:24 +0000
committerjperkin <jperkin@pkgsrc.org>2014-05-14 12:27:24 +0000
commit0f74b0a3db8fb951fa8eb21aa6eae5d0f721d6a9 (patch)
tree46743d27b97c4b1cf8ec6068688eec3d1ae63400
parente488207ff20a918a01156befba3dd20ebf3aa04a (diff)
downloadpkgsrc-0f74b0a3db8fb951fa8eb21aa6eae5d0f721d6a9.tar.gz
Fix build on SunOS. We can't rely on PATH to find nm as sbcl uses arguments
only supported by the native version, so ensure /usr/bin/nm is called. Also explicitly pass the --arch flag to ensure the correct compiler flags are used.
-rw-r--r--lang/sbcl/Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile
index 90fabd9156c..a7477c43447 100644
--- a/lang/sbcl/Makefile
+++ b/lang/sbcl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.53 2014/05/02 22:58:53 asau Exp $
+# $NetBSD: Makefile,v 1.54 2014/05/14 12:27:24 jperkin Exp $
DISTNAME= ${PKGNAME_NOREV}-source
PKGNAME= sbcl-1.1.18
@@ -53,7 +53,6 @@ UNLIMIT_RESOURCES= datasize
BUILD_DEPENDS+= sbcl-[0-9]*:../../lang/sbcl
.endif
-
SUBST_CLASSES+= fix-paths
SUBST_STAGE.fix-paths= pre-configure
SUBST_MESSAGE.fix-paths= Fixing absolute paths.
@@ -67,14 +66,27 @@ SUBST_MESSAGE.fix-gtar= Fixing GNU tar references.
SUBST_FILES.fix-gtar= contrib/asdf-install/installer.lisp
SUBST_SED.fix-gtar= -e 's,@GTAR@,${GTAR},'
+SUBST_CLASSES+= fix-nm
+SUBST_STAGE.fix-nm= pre-configure
+SUBST_FILES.fix-nm= src/runtime/Config.x86-64-sunos
+SUBST_FILES.fix-nm+= src/runtime/Config.x86-sunos
+SUBST_SED.fix-nm= -e 's,nm ,/usr/bin/nm ,'
+
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
# Missing support for .end
_WRAP_EXTRA_ARGS.CC+= -no-integrated-as
.endif
+.if !empty(MACHINE_PLATFORM:MSunOS-*-i386)
+SBCL_ARCH_ARGS= "--arch=x86"
+.elif !empty(MACHINE_PLATFORM:MSunOS-*-x86_64)
+SBCL_ARCH_ARGS= "--arch=x86-64"
+.endif
+
do-build:
- cd ${WRKSRC} && ${SH} make.sh --prefix=${PREFIX} --xc-host=${SBCL_BOOT_SYSTEM:Q}
+ cd ${WRKSRC} && ${SH} make.sh --prefix=${PREFIX} ${SBCL_ARCH_ARGS} --xc-host=${SBCL_BOOT_SYSTEM:Q}
+
post-build:
cd ${WRKSRC} && ${RM} -f contrib/sb-cover/test-output/*