summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2016-01-24 16:14:44 +0000
committerjperkin <jperkin@pkgsrc.org>2016-01-24 16:14:44 +0000
commitfce78c05d2b89e39cbed6550f41cfcb953a79b76 (patch)
treec3c974565ac88eddb790ad36e7b99f06ff190a0a /lang
parentf0e3ed42a48ebe6c8c92d305dc49fb165e9d90cb (diff)
downloadpkgsrc-fce78c05d2b89e39cbed6550f41cfcb953a79b76.tar.gz
Attempt to bring sanity to how ABI and MACHINE_ARCH are set.
Previously there were at least 5 different ways MACHINE_ARCH could be set, some statically and some at run time, and in many cases these settings differed, leading to issues at pkg_add time where there was conflict between the setting encoded into the package and that used by pkg_install. Instead, move to a single source of truth where the correct value based on the host and the chosen (or default) ABI is determined in the bootstrap script. The value can still be overridden in mk.conf if necessary, e.g. for cross-compiling. ABI is now set by default and if unset a default is calculated based on MACHINE_ARCH. This fixes some OS, e.g. Linux, where the wrong default was previously chosen. As a result of the refactoring there is no need for LOWER_ARCH, with references to it replaced by MACHINE_ARCH. SPARC_TARGET_ARCH is also removed.
Diffstat (limited to 'lang')
-rw-r--r--lang/gcc34/Makefile8
-rw-r--r--lang/gcc44/Makefile4
-rw-r--r--lang/gcc45/Makefile4
-rw-r--r--lang/gcc46/Makefile4
-rw-r--r--lang/sbcl/Makefile4
5 files changed, 12 insertions, 12 deletions
diff --git a/lang/gcc34/Makefile b/lang/gcc34/Makefile
index 4a74b862af8..866402596dd 100644
--- a/lang/gcc34/Makefile
+++ b/lang/gcc34/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2013/02/01 22:21:07 wiz Exp $
+# $NetBSD: Makefile,v 1.57 2016/01/24 16:14:44 jperkin Exp $
#
DISTNAME= gcc-${GCC_VERSION}
@@ -89,7 +89,7 @@ CPPFLAGS+= -I${BUILDLINK_DIR}/include
CFLAGS+= -I${BUILDLINK_DIR}/include
.if ${OPSYS} == "NetBSD"
# thread / crtbegin / __cxa_atexit support depend on a "netbsd2" OS name
-GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}${LOWER_OS_VERSION:C/[_a-z].*//}
+GCC_PLATFORM= ${MACHINE_ARCH}--${LOWER_OPSYS}${APPEND_ELF}${LOWER_OS_VERSION:C/[_a-z].*//}
CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
ABI_BASELINE_PAIR= ${GCC_PLATFORM:C/--/-/}
MAKE_ENV+= ABI_BASELINE_PAIR=${ABI_BASELINE_PAIR:Q}
@@ -97,10 +97,10 @@ MAKE_ENV+= ABI_BASELINE_PAIR=${ABI_BASELINE_PAIR:Q}
post-patch:
.if ${OPSYS} == "NetBSD"
-. if exists(${FILESDIR}/${LOWER_ARCH}-baseline_symbols${LOWER_OS_VERSION:C/\..*//}.txt)
+. if exists(${FILESDIR}/${MACHINE_ARCH}-baseline_symbols${LOWER_OS_VERSION:C/\..*//}.txt)
(${TEST} -d ${WRKSRC}/libstdc++-v3/config/abi/${ABI_BASELINE_PAIR} || \
${MKDIR} ${WRKSRC}/libstdc++-v3/config/abi/${ABI_BASELINE_PAIR})
- ${CP} ${FILESDIR}/${LOWER_ARCH}-baseline_symbols${LOWER_OS_VERSION:C/\..*//}.txt \
+ ${CP} ${FILESDIR}/${MACHINE_ARCH}-baseline_symbols${LOWER_OS_VERSION:C/\..*//}.txt \
${WRKSRC}/libstdc++-v3/config/abi/${ABI_BASELINE_PAIR}/baseline_symbols.txt
. endif
.endif
diff --git a/lang/gcc44/Makefile b/lang/gcc44/Makefile
index 5b8080b68b5..61c730396c9 100644
--- a/lang/gcc44/Makefile
+++ b/lang/gcc44/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.44 2015/10/20 10:26:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.45 2016/01/24 16:14:44 jperkin Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc44-${GCC_VERSION}
@@ -92,7 +92,7 @@ CFLAGS+= -I${BUILDLINK_DIR}/include
# Somone should fix this so it will match the NetBSD system compiler
#.if ${OPSYS} == "NetBSD"
-#GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
+#GCC_PLATFORM= ${MACHINE_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
#CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
#MAKE_ENV+= AR=/usr/bin/ar
#.endif # NetBSD
diff --git a/lang/gcc45/Makefile b/lang/gcc45/Makefile
index c9348e0864e..c472d3f78dc 100644
--- a/lang/gcc45/Makefile
+++ b/lang/gcc45/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2015/10/20 10:30:54 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2016/01/24 16:14:44 jperkin Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc45-${GCC_VERSION}
@@ -118,7 +118,7 @@ CFLAGS+= -I${BUILDLINK_DIR}/include
# Somone should fix this so it will match the NetBSD system compiler
#.if ${OPSYS} == "NetBSD"
-#GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
+#GCC_PLATFORM= ${MACHINE_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
#CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
#MAKE_ENV+= AR=/usr/bin/ar
#.endif # NetBSD
diff --git a/lang/gcc46/Makefile b/lang/gcc46/Makefile
index 262c59aea13..46edb2d329c 100644
--- a/lang/gcc46/Makefile
+++ b/lang/gcc46/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2015/01/01 01:29:56 ryoon Exp $
+# $NetBSD: Makefile,v 1.29 2016/01/24 16:14:44 jperkin Exp $
DISTNAME= gcc-${GCC_VERSION}
PKGNAME= gcc46-${GCC_VERSION}
@@ -111,7 +111,7 @@ CFLAGS+= -I${BUILDLINK_DIR}/include
# Someone should fix this so it will match the NetBSD system compiler
#.if ${OPSYS} == "NetBSD"
-#GCC_PLATFORM= ${LOWER_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
+#GCC_PLATFORM= ${MACHINE_ARCH}--${LOWER_OPSYS}${APPEND_ELF}
#CONFIGURE_ARGS+= --host=${GCC_PLATFORM:Q}
#MAKE_ENV+= AR=/usr/bin/ar
#.endif # NetBSD
diff --git a/lang/sbcl/Makefile b/lang/sbcl/Makefile
index 84f3544a734..a4378d77d43 100644
--- a/lang/sbcl/Makefile
+++ b/lang/sbcl/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2015/12/09 22:48:10 asau Exp $
+# $NetBSD: Makefile,v 1.64 2016/01/24 16:14:44 jperkin Exp $
DISTNAME= ${PKGNAME_NOREV}-source
PKGNAME= sbcl-1.3.1
@@ -94,7 +94,7 @@ do-test:
# for f in compiler.pure.lisp interface.pure.lisp compiler.impure.lisp debug.impure.lisp interface.impure.lisp; do mv ${WRKSRC}/tests/$$f ${WRKSRC}/tests/$$f.off || :; done
cd ${WRKSRC}/tests && ${SH} ./run-tests.sh
-.if $(LOWER_ARCH) == "amd64" || $(LOWER_ARCH) == "x86_64"
+.if ${MACHINE_ARCH} == "x86_64"
PLIST_SUBST+= SUFX64=-64
.else
PLIST_SUBST+= SUFX64=