diff options
author | jperkin <jperkin@pkgsrc.org> | 2016-01-24 16:14:44 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2016-01-24 16:14:44 +0000 |
commit | fce78c05d2b89e39cbed6550f41cfcb953a79b76 (patch) | |
tree | c3c974565ac88eddb790ad36e7b99f06ff190a0a | |
parent | f0e3ed42a48ebe6c8c92d305dc49fb165e9d90cb (diff) | |
download | pkgsrc-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.
-rwxr-xr-x | bootstrap/bootstrap | 107 | ||||
-rw-r--r-- | devel/bmake/Makefile | 6 | ||||
-rw-r--r-- | devel/bmake/files/main.c | 14 | ||||
-rw-r--r-- | devel/bmake/files/make-bootstrap.sh.in | 2 | ||||
-rw-r--r-- | graphics/evas/Makefile.common | 4 | ||||
-rw-r--r-- | lang/gcc34/Makefile | 8 | ||||
-rw-r--r-- | lang/gcc44/Makefile | 4 | ||||
-rw-r--r-- | lang/gcc45/Makefile | 4 | ||||
-rw-r--r-- | lang/gcc46/Makefile | 4 | ||||
-rw-r--r-- | lang/sbcl/Makefile | 4 | ||||
-rw-r--r-- | mk/bsd.prefs.mk | 109 | ||||
-rw-r--r-- | mk/defaults/mk.conf | 7 | ||||
-rw-r--r-- | net/traceroute-nanog/Makefile | 4 | ||||
-rw-r--r-- | news/nn/Makefile | 4 | ||||
-rw-r--r-- | security/john/Makefile | 23 | ||||
-rw-r--r-- | security/libbf/Makefile | 4 | ||||
-rw-r--r-- | security/openssl/Makefile | 6 | ||||
-rw-r--r-- | x11/elementary/Makefile | 4 | ||||
-rw-r--r-- | x11/enlightenment/Makefile | 4 |
19 files changed, 110 insertions, 212 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap index 2a56f19f233..a4e91ea2a5a 100755 --- a/bootstrap/bootstrap +++ b/bootstrap/bootstrap @@ -1,6 +1,6 @@ #! /bin/sh -# $NetBSD: bootstrap,v 1.226 2016/01/06 17:59:58 jperkin Exp $ +# $NetBSD: bootstrap,v 1.227 2016/01/24 16:14:44 jperkin Exp $ # # Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> # All rights reserved. @@ -77,10 +77,6 @@ usage="Usage: $0 "' [ --workdir <workdir> ] ' -# this replicates some of the logic in bsd.prefs.mk. until -# bootstrap-pkgsrc is merged into pkgsrc, we need to determine the -# right value for OPSYS and MACHINE_ARCH. - # strip / for BSD/OS, strip - for HP-UX opsys=`uname -s | tr -d /-` @@ -183,15 +179,6 @@ get_abi() fi case "$abi_opsys" in - Darwin) - if [ -z "$abi" ]; then - case `uname -m` in - x86_64) - abi="64" - ;; - esac - fi - ;; IRIX) if [ `uname -r` -ge 6 ]; then abi=`sed -e 's/.*\(abi=\)\([on]*[36][24]\).*/\2/' /etc/compiler.defaults` @@ -226,6 +213,24 @@ get_machine_arch_aix() fi } +get_machine_arch_darwin() +{ + case `uname -p` in + i386) + # Returns "i386" or "x86_64" depending on CPU + echo `uname -m` + ;; + powerpc) + # sysctl mib exists on 64-bit hardware + if [ `sysctl -n hw.optional.64bitops 2>/dev/null` = "1" ]; then + echo "powerpc64" + else + echo "powerpc" + fi + ;; + esac +} + check_prog() { _var="$1"; _name="$2" @@ -503,7 +508,6 @@ overpath="" root_user=root bmakexargs= need_extras=no -set_machine_arch=no use_bsdinstall= case "$opsys" in AIX) @@ -523,10 +527,6 @@ Bitrig) need_sed=no set_opsys=no machine_arch=`arch -s` - if [ "$machine_arch" = "amd64" ]; then - machine_arch=x86_64 - bmakexargs="MACHINE_ARCH=$machine_arch" - fi check_compiler=yes ;; CYGWIN_*) @@ -554,11 +554,7 @@ Darwin) need_awk=no need_sed=no set_opsys=no - get_abi "Darwin" - machine_arch=`uname -p` - if [ "$machine_arch" = "i386" -a "$abi" = "64" ]; then - machine_arch=x86_64 - fi + machine_arch=`get_machine_arch_darwin` CC=${CC:-"cc -isystem /usr/include"}; export CC check_compiler=yes osrev=`uname -r` @@ -590,10 +586,6 @@ DragonFly) set_opsys=no check_prog tarprog tar machine_arch=`uname -p` - if [ "$machine_arch" = "amd64" ]; then - machine_arch=x86_64 - bmakexargs="MACHINE_ARCH=$machine_arch" - fi ;; FreeBSD) root_group=wheel @@ -602,10 +594,6 @@ FreeBSD) need_sed=no set_opsys=no machine_arch=`uname -p` - if [ "$machine_arch" = "amd64" ]; then - machine_arch=x86_64 - bmakexargs="MACHINE_ARCH=$machine_arch" - fi check_compiler=yes ;; FreeMiNT) @@ -705,7 +693,6 @@ IRIX*) need_sed=yes set_opsys=yes machine_arch=mipseb - bmakexargs="MACHINE_ARCH=$machine_arch" check_compiler=yes if [ `uname -r` -lt 6 ]; then # IRIX 5's mkdir bails out with an error when trying to create with the -p @@ -730,12 +717,6 @@ Linux) need_sed=no set_opsys=no machine_arch=`uname -m | sed -e 's/i.86/i386/'` - # Support multiarch systems. - if [ "$machine_arch" = "x86_64" -a "$abi" = "32" ]; then - machine_arch=i386 - set_machine_arch=yes - bmakexargs="MACHINE_ARCH=$machine_arch" - fi ;; Minix) root_group=operator @@ -789,10 +770,6 @@ OpenBSD) need_sed=no set_opsys=no machine_arch=`arch -s` - if [ "$machine_arch" = "amd64" ]; then - machine_arch=x86_64 - bmakexargs="MACHINE_ARCH=$machine_arch" - fi ;; OSF1) root_group=system @@ -871,6 +848,34 @@ UnixWare) ;; esac +# Fixup MACHINE_ARCH to use canonical pkgsrc variants, and support multiarch +# systems via --abi, setting a default $abi based on MACHINE_ARCH if not set. +# +case "$machine_arch/$abi" in +# "amd64" translates to "x86_64", defaults to 64-bit +amd64/32) abi=32 machine_arch=i386 ;; +amd64/*) abi=64 machine_arch=x86_64 ;; +# XXX: hppa untested +hppa/64) abi=64 machine_arch=hppa64 ;; +hppa/*) abi=32 machine_arch=hppa ;; +hppa64/32) abi=32 machine_arch=hppa ;; +hppa64/*) abi=64 machine_arch=hppa64 ;; +# "i386" can support 64-bit, e.g. SunOS, defaults to 32-bit. +i386/64) abi=64 machine_arch=x86_64 ;; +i386/*) abi=32 machine_arch=i386 ;; +# XXX: powerpc untested +powerpc/64) abi=64 machine_arch=powerpc64 ;; +powerpc/*) abi=32 machine_arch=powerpc ;; +powerpc64/32) abi=32 machine_arch=powerpc ;; +powerpc64/*) abi=64 machine_arch=powerpc64 ;; +# "sparc" can support 64-bit, e.g. SunOS, defaults to 32-bit. +sparc/64) abi=64 machine_arch=sparc64 ;; +sparc/*) abi=32 machine_arch=sparc ;; +# x86_64 supports 32-bit/64-bit, defaults to 64-bit. +x86_64/32) abi=32 machine_arch=i386 ;; +x86_64/*) abi=64 machine_arch=x86_64 ;; +esac + # If "--full" is specified, then install all of the platform-independent # bootstrap software. # @@ -898,14 +903,9 @@ if [ $? -ne 0 ]; then die "ERROR: --make-jobs must be a positive integer argument" fi -# export OPSYS and MACHINE_ARCH for pkg_install. we only set -# MACHINE_ARCH on platforms where we override bmake's value. -OPSYS=${opsys} -export OPSYS -if [ "${machine_arch}" != "" ]; then - MACHINE_ARCH=${machine_arch} - export MACHINE_ARCH -fi +# export MACHINE_ARCH and OPSYS for bmake and pkg_install. +MACHINE_ARCH=${machine_arch}; export MACHINE_ARCH +OPSYS=${opsys}; export OPSYS if [ "x$preserve_path" != "xyes" ]; then PATH="$overpath:$PATH" @@ -1021,9 +1021,6 @@ fi if [ -n "$abi" ]; then echo "ABI= $abi" >> ${TARGET_MKCONF} fi -if [ "$set_machine_arch" = "yes" ]; then - echo "MACHINE_ARCH= $machine_arch" >> ${TARGET_MKCONF} -fi if [ "$compiler" != "" ]; then echo "PKGSRC_COMPILER= $compiler" >> ${TARGET_MKCONF} fi @@ -1140,7 +1137,7 @@ $shprog ./bootstrap.sh)" bootstrap_bmake() { echo_msg "Bootstrapping bmake" copy_src $pkgsrcdir/devel/bmake/files bmake - run_cmd "(cd $wrkdir/bmake && $shprog configure $configure_quiet_flags --with-default-sys-path=$wrkdir/share/mk --prefix=$wrkdir $bmakexargs)" + run_cmd "(cd $wrkdir/bmake && $shprog configure $configure_quiet_flags --prefix=$wrkdir --with-default-sys-path=$wrkdir/share/mk --with-machine-arch=${machine_arch} $bmakexargs)" run_cmd "(cd $wrkdir/bmake && $shprog make-bootstrap.sh)" run_cmd "$install_sh -c -o $user -g $group -m 755 $wrkdir/bmake/bmake $wrkdir/bin/bmake" } diff --git a/devel/bmake/Makefile b/devel/bmake/Makefile index 86daf07e9f8..b3b40129b54 100644 --- a/devel/bmake/Makefile +++ b/devel/bmake/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.71 2015/06/17 17:37:50 tron Exp $ +# $NetBSD: Makefile,v 1.72 2016/01/24 16:14:44 jperkin Exp $ DISTNAME= bmake-20150505 CATEGORIES= devel @@ -28,6 +28,7 @@ INSTALLATION_DIRS= bin ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 GNU_CONFIGURE= yes CONFIGURE_ARGS+= --prefix=${PREFIX} CONFIGURE_ARGS+= --with-default-sys-path=${makesyspath} +CONFIGURE_ARGS+= --with-machine_arch=${MACHINE_ARCH} CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} .include "../../mk/bsd.prefs.mk" @@ -41,9 +42,6 @@ CONFIGURE_ARGS+= --with-defshell=${PREFIX}/bin/pdksh .if ${OPSYS} == "Interix" MAKE_ENV+= XDEFS=-DUSE_SELECT .endif -.if ${OPSYS} == "IRIX" -CONFIGURE_ARGS+= --with-machine_arch=${MACHINE_ARCH} -.endif do-extract: ${CP} -R ${FILESDIR} ${WRKSRC} diff --git a/devel/bmake/files/main.c b/devel/bmake/files/main.c index ee83a902eb1..d18037f37be 100644 --- a/devel/bmake/files/main.c +++ b/devel/bmake/files/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.13 2015/05/19 22:01:19 joerg Exp $ */ +/* $NetBSD: main.c,v 1.14 2016/01/24 16:14:44 jperkin Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.13 2015/05/19 22:01:19 joerg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.14 2016/01/24 16:14:44 jperkin Exp $"; #else #include <sys/cdefs.h> #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.13 2015/05/19 22:01:19 joerg Exp $"); +__RCSID("$NetBSD: main.c,v 1.14 2016/01/24 16:14:44 jperkin Exp $"); #endif #endif /* not lint */ #endif @@ -916,6 +916,14 @@ main(int argc, char **argv) #endif } + /* + * Hardcode default pkgsrc MACHINE_ARCH. There is only one legitimate + * way to override the variable, and that is through the environment, + * handled above. We need to use PKGSRC_MACHINE_ARCH as some OS define + * MACHINE_ARCH in their system headers. + */ + machine_arch = PKGSRC_MACHINE_ARCH; + if (!machine_arch) { #if defined(MAKE_NATIVE) && defined(HAVE_SYSCTL) && defined(CTL_HW) && defined(HW_MACHINE_ARCH) static char machine_arch_buf[sizeof(utsname.machine)]; diff --git a/devel/bmake/files/make-bootstrap.sh.in b/devel/bmake/files/make-bootstrap.sh.in index 2bb4c25a705..7a3721f6102 100644 --- a/devel/bmake/files/make-bootstrap.sh.in +++ b/devel/bmake/files/make-bootstrap.sh.in @@ -16,7 +16,7 @@ CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS} -DBMAK MAKE_VERSION=`sed -n '/^MAKE_VERSION=/s,.*=[^0-9]*,,p' $srcdir/Makefile` MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \ --D@force_machine@MACHINE=\"@machine@\" -DMACHINE_ARCH=\"@machine_arch@\" \ +-D@force_machine@MACHINE=\"@machine@\" -DPKGSRC_MACHINE_ARCH=\"@machine_arch@\" \ -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"" diff --git a/graphics/evas/Makefile.common b/graphics/evas/Makefile.common index 40bf4f0d100..f3885ce48d5 100644 --- a/graphics/evas/Makefile.common +++ b/graphics/evas/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.14 2015/03/17 21:30:27 joerg Exp $ +# $NetBSD: Makefile.common,v 1.15 2016/01/24 16:14:44 jperkin Exp $ # used by graphics/evas-buffer/Makefile # used by graphics/evas-edb/Makefile @@ -58,7 +58,7 @@ CONFIGURE_ARGS+= --enable-cpu-altivec .endif # currently it is like it is -MODULE_ARCH= ${LOWER_OPSYS}-${LOWER_ARCH}-${EVAS_VERSION} +MODULE_ARCH= ${LOWER_OPSYS}-${MACHINE_ARCH}-${EVAS_VERSION} PLIST_SUBST= MODULE_ARCH=${MODULE_ARCH} PRINT_PLIST_AWK+= { gsub(/${MODULE_ARCH}/, "$${MODULE_ARCH}") } 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= diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index b3c0d3496bf..9f7ab879f2d 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.375 2016/01/12 19:55:41 rillig Exp $ +# $NetBSD: bsd.prefs.mk,v 1.376 2016/01/24 16:14:44 jperkin Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -128,13 +128,6 @@ MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} LOWER_OPSYS?= netbsd .elif ${OPSYS} == "AIX" -LOWER_ARCH!= _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $$1 }'`; \ - if /usr/sbin/lsattr -El $$_cpuid | grep ' POWER' >/dev/null 2>&1; then \ - echo rs6000; \ - else \ - echo powerpc; \ - fi -MACHINE_ARCH?= ${LOWER_ARCH} . if exists(/usr/bin/oslevel) _OS_VERSION!= /usr/bin/oslevel . else @@ -150,75 +143,30 @@ LOWER_OPSYS?= bsdi .elif ${OPSYS} == "Bitrig" LOWER_OPSYS?= bitrig -LOWER_ARCH!= arch -s -. if ${LOWER_ARCH} == "amd64" -MACHINE_ARCH= x86_64 -. else -MACHINE_ARCH= ${LOWER_ARCH} -. endif -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} -MAKEFLAGS+= MACHINE_ARCH=${MACHINE_ARCH:Q} LOWER_VENDOR?= unknown .elif ${OPSYS} == "Cygwin" LOWER_OPSYS?= cygwin LOWER_VENDOR?= pc -. if !defined(LOWER_ARCH) -LOWER_ARCH!= ${UNAME} -m | sed -e 's/i.86/i386/' -. endif # !defined(LOWER_ARCH) _OS_VERSION!= ${UNAME} -r OS_VERSION= ${_OS_VERSION:C/\(.*\)//} OS_VARIANT!= ${UNAME} -s .elif ${OPSYS} == "Darwin" LOWER_OPSYS?= darwin -.if empty(OS_VERSION:M[1-9].*.*) -# Automatically select the ABI under Mac OS X Snow Leopard. We don't -# use this at the moment because too many third party programs don't -# work with it. -# -# _SYSCTL_HW_OPTIONAL_X86_64!= /usr/sbin/sysctl -n hw.optional.x86_64 -# . if ${_SYSCTL_HW_OPTIONAL_X86_64} == "1" -# ABI= 64 -# .else -# ABI= 32 -#. endif -ABI= 32 -LOWER_ARCH.32= i386 -LOWER_ARCH.64= x86_64 -LOWER_ARCH= ${LOWER_ARCH.${ABI}} -.else -LOWER_ARCH!= ${UNAME} -p -.endif -MACHINE_ARCH= ${LOWER_ARCH} -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} LOWER_VENDOR?= apple .elif ${OPSYS} == "DragonFly" OS_VERSION:= ${OS_VERSION:C/-.*$//} LOWER_OPSYS?= dragonfly -LOWER_ARCH!= ${UNAME} -p -. if ${LOWER_ARCH} == "amd64" -MACHINE_ARCH= x86_64 -. else -MACHINE_ARCH= ${LOWER_ARCH} -. endif -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} LOWER_VENDOR?= pc .elif ${OPSYS} == "FreeBSD" OS_VERSION:= ${OS_VERSION:C/-.*$//} LOWER_OPSYS?= freebsd -LOWER_ARCH!= ${UNAME} -p -. if ${LOWER_ARCH} == "amd64" -MACHINE_ARCH= x86_64 -. else -MACHINE_ARCH= ${LOWER_ARCH} -. endif -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} -. if ${LOWER_ARCH} == "i386" +. if ${MACHINE_ARCH} == "i386" LOWER_VENDOR?= pc . endif LOWER_VENDOR?= unknown @@ -249,13 +197,9 @@ OS_VERSION= 3.0 LOWER_OPSYS?= mirbsd LOWER_OS_VERSION= ${OS_VERSION} LOWER_OPSYS_VERSUFFIX= ${OS_VERSION} -LOWER_ARCH!= arch -s LOWER_VENDOR?= unknown -MACHINE_ARCH= ${LOWER_ARCH} -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} .elif !empty(OPSYS:MIRIX*) -LOWER_ARCH!= ${UNAME} -p LOWER_OPSYS?= irix LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} LOWER_VENDOR?= sgi @@ -263,11 +207,6 @@ LOWER_VENDOR?= sgi .elif ${OPSYS} == "Linux" OS_VERSION:= ${OS_VERSION:C/-.*$//} LOWER_OPSYS?= linux -. if !defined(LOWER_ARCH) -LOWER_ARCH!= ${UNAME} -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/' -. endif # !defined(LOWER_ARCH) -MACHINE_ARCH= ${LOWER_ARCH} -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} . if exists(/etc/debian_version) LOWER_VENDOR?= debian . elif exists(/etc/mandrake-release) @@ -278,26 +217,15 @@ LOWER_VENDOR?= redhat LOWER_VENDOR?= slackware . elif exists(/etc/ssdlinux_version) LOWER_VENDOR?= ssd -. elif ${LOWER_ARCH} == "i386" +. elif ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" LOWER_VENDOR?= pc . endif LOWER_VENDOR?= unknown .elif ${OPSYS} == "OpenBSD" LOWER_OPSYS?= openbsd -LOWER_ARCH!= arch -s -. if ${LOWER_ARCH} == "amd64" -MACHINE_ARCH= x86_64 -. else -MACHINE_ARCH= ${LOWER_ARCH} -. endif -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} -MAKEFLAGS+= MACHINE_ARCH=${MACHINE_ARCH:Q} .elif ${OPSYS} == "OSF1" -LOWER_ARCH!= ${UNAME} -p -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} -MACHINE_ARCH?= ${LOWER_ARCH} OS_VERSION:= ${OS_VERSION:C/^V//} LOWER_OPSYS?= osf1 LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} @@ -305,34 +233,11 @@ LOWER_VENDOR?= dec .elif ${OPSYS} == "HPUX" OS_VERSION:= ${OS_VERSION:C/^B.//} -. if ${MACHINE_ARCH} == "9000" -ABI?= 32 -MACHINE_ARCH.32= hppa -MACHINE_ARCH.64= hppa64 -MACHINE_ARCH= ${MACHINE_ARCH.${ABI}} -. endif LOWER_OPSYS?= hpux LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} LOWER_VENDOR?= hp .elif ${OPSYS} == "SunOS" -ABI?= 32 -. if ${MACHINE_ARCH} == "sparc" -SPARC_TARGET_ARCH?= sparcv7 -. elif ${MACHINE_ARCH} == "sun4" -MACHINE_ARCH= sparc -SPARC_TARGET_ARCH?= sparcv7 -. elif ${MACHINE_ARCH} == "i86pc" || ${MACHINE_ARCH} == "i86xpv" || ${MACHINE_ARCH} == "i386" -LOWER_ARCH.32= i386 -LOWER_ARCH.64= x86_64 -LOWER_ARCH= ${LOWER_ARCH.${ABI}} -MACHINE_ARCH= ${LOWER_ARCH} -. elif ${MACHINE_ARCH} == "unknown" -. if !defined(LOWER_ARCH) -LOWER_ARCH!= ${UNAME} -p -. endif # !defined(LOWER_ARCH) -MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} -. endif LOWER_VENDOR?= sun LOWER_OPSYS?= solaris LOWER_OPSYS_VERSUFFIX= 2.${OS_VERSION:C/5.//} @@ -342,7 +247,7 @@ OS_VARIANT= SmartOS LOWER_VARIANT_VERSION= ${_UNAME_V:C/joyent_//} . elif !empty(_UNAME_V:Momnios-*) OS_VARIANT= OmniOS -LOWER_VARIANT_VERSION!= /usr/bin/awk '{ if (!seen) { print $$3; seen=1 } }' /etc/release +LOWER_VARIANT_VERSION!= /usr/bin/awk '{ if (!seen) { print $$3; seen=1 } }' /etc/release . endif .elif ${OPSYS} == "SCO_SV" @@ -374,12 +279,8 @@ LOWER_OS_VERSION:= ${OS_VERSION:tl} MAKEFLAGS+= LOWER_OPSYS=${LOWER_OPSYS:Q} LOWER_VENDOR?= # empty ("arch--opsys") -LOWER_ARCH?= ${MACHINE_GNU_ARCH} -# Expand now as MACHINE_ARCH can be overriden in mk.conf and -# LOWER_ARCH is typically derived from it. -NATIVE_LOWER_ARCH:= ${LOWER_ARCH} -NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH} +NATIVE_MACHINE_ARCH:= ${MACHINE_ARCH} NATIVE_MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${NATIVE_MACHINE_ARCH} MACHINE_PLATFORM?= ${OPSYS}-${OS_VERSION}-${MACHINE_ARCH} NATIVE_MACHINE_GNU_PLATFORM?= ${NATIVE_MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${NATIVE_APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${NATIVE_APPEND_ABI} diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf index d2a6493d1df..4d6e883bc91 100644 --- a/mk/defaults/mk.conf +++ b/mk/defaults/mk.conf @@ -1,4 +1,4 @@ -# $NetBSD: mk.conf,v 1.261 2016/01/20 13:29:29 khorben Exp $ +# $NetBSD: mk.conf,v 1.262 2016/01/24 16:14:44 jperkin Exp $ # # This file provides default values for variables that may be overridden @@ -1593,11 +1593,6 @@ SILC_CLIENT_WITH_PERL?= YES # Possible: YES, NO # Default: YES -#SPARC_TARGET_ARCH= sparcv7 -# Select SPARC target architecture under Solaris. -# Possible: sparcv7, sparcv8 or sparcv9. -# Default: sparcv7 - SSH_SUID?= NO # Used in ssh to enable setuid installation of "ssh" binary. # Possible: YES, or NO. diff --git a/net/traceroute-nanog/Makefile b/net/traceroute-nanog/Makefile index 29c9e933e7c..8f353bca99a 100644 --- a/net/traceroute-nanog/Makefile +++ b/net/traceroute-nanog/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2013/01/11 00:04:22 joerg Exp $ +# $NetBSD: Makefile,v 1.7 2016/01/24 16:14:45 jperkin Exp $ DISTNAME= traceroute-nanog_6.4.2.orig PKGNAME= ${DISTNAME:S/.orig//:S/_/-/} @@ -26,7 +26,7 @@ USE_FEATURES+= snprintf CPPFLAGS+= -DSOLARIS LIBS+= -lresolv -lsocket -lnsl .endif -.if ${LOWER_ARCH} == "i386" +.if ${MACHINE_ARCH} == "i386" CPPFLAGS+= -DBYTESWAP_IP_LEN .endif .endif diff --git a/news/nn/Makefile b/news/nn/Makefile index 0453ab3c3e3..e13c60f433b 100644 --- a/news/nn/Makefile +++ b/news/nn/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.46 2015/08/18 07:31:16 wiz Exp $ +# $NetBSD: Makefile,v 1.47 2016/01/24 16:14:45 jperkin Exp $ DISTNAME= nn-6.7.3 PKGREVISION= 4 @@ -30,7 +30,7 @@ MFILE= m-i80386.h .elif ${MACHINE_ARCH} == "mipseb" MFILE= m-mipsel.h .else -MFILE= m-${LOWER_ARCH}.h +MFILE= m-${MACHINE_ARCH}.h .endif .if ${OPSYS} == "IRIX" diff --git a/security/john/Makefile b/security/john/Makefile index 7577148f922..53567bdfa9a 100644 --- a/security/john/Makefile +++ b/security/john/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2014/09/14 13:20:08 shattered Exp $ +# $NetBSD: Makefile,v 1.23 2016/01/24 16:14:45 jperkin Exp $ # DISTNAME= john-1.8.0 @@ -18,18 +18,15 @@ TEST_TARGET= check .include "../../mk/compiler.mk" .include "../../mk/bsd.prefs.mk" -.if ${OPSYS} == "SunOS" && ${MACHINE_ARCH} == "sparc" -. if !empty(CC_VERSION:MSun) -. if defined(SPARC_TARGET_ARCH) && ${SPARC_TARGET_ARCH} == "sparcv9" -BUILD_TARGET= solaris-sparc-v9-cc -. else -BUILD_TARGET= solaris-sparc-v8-cc -. endif -. else -BUILD_TARGET= solaris-sparc-gcc -. endif -.elif ${OPSYS} == "SunOS" && ${MACHINE_ARCH} == "i386" -BUILD_TARGET= solaris-x86-any +.if ${OPSYS} == "SunOS" +. if ${MACHINE_ARCH} == "sparc" +BUILD_TARGET= solaris-sparc-${${PKGSRC_COMPILER}==gcc:?gcc:cc} +. elif ${MACHINE_ARCH} == "sparc64" +BUILD_TARGET= solaris-sparcv9-${${PKGSRC_COMPILER}==gcc:?gcc:cc} +. elif ${MACHINE_ARCH} == "i386" +BUILD_TARGET= solaris-x86-any-${${PKGSRC_COMPILER}==gcc:?gcc:cc} +. elif ${MACHINE_ARCH} == "x86_64" +BUILD_TARGET= solaris-x86_64-${${PKGSRC_COMPILER}==gcc:?gcc:cc} .elif ${OPSYS} == "NetBSD" . if ${MACHINE_ARCH} == "i386" BUILD_TARGET= openbsd-x86-any diff --git a/security/libbf/Makefile b/security/libbf/Makefile index f5b6ab3b3e7..b7d73a53c27 100644 --- a/security/libbf/Makefile +++ b/security/libbf/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2013/04/08 11:17:21 rodent Exp $ +# $NetBSD: Makefile,v 1.17 2016/01/24 16:14:45 jperkin Exp $ # DISTNAME= libbf-0.8.2b @@ -14,7 +14,7 @@ CRYPTO= YES .include "../../mk/bsd.prefs.mk" -.if ${LOWER_ARCH} == "i386" && ${OBJECT_FMT} == "ELF" +.if ${MACHINE_ARCH} == "i386" && ${OBJECT_FMT} == "ELF" BF_ENC=asm/bx86-elf.o .else BF_ENC=bf_enc.o diff --git a/security/openssl/Makefile b/security/openssl/Makefile index 0d159280efb..17d2cb0b597 100644 --- a/security/openssl/Makefile +++ b/security/openssl/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.218 2015/12/11 10:20:13 jperkin Exp $ +# $NetBSD: Makefile,v 1.219 2016/01/24 16:14:45 jperkin Exp $ DISTNAME= openssl-1.0.2e CATEGORIES= security @@ -40,7 +40,9 @@ CC= gcc .if ${OPSYS} == "SunOS" . if ${MACHINE_ARCH} == "sparc" -OPENSSL_MACHINE_ARCH= ${SPARC_TARGET_ARCH} +OPENSSL_MACHINE_ARCH= sparcv7 +. elif ${MACHINE_ARCH} == "sparc64" +OPENSSL_MACHINE_ARCH= sparcv9 . elif ${MACHINE_ARCH} == "i386" OPENSSL_MACHINE_ARCH= x86 . elif ${MACHINE_ARCH} == "x86_64" diff --git a/x11/elementary/Makefile b/x11/elementary/Makefile index 97fe61adf51..40789609a67 100644 --- a/x11/elementary/Makefile +++ b/x11/elementary/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.7 2015/12/29 04:54:38 dholland Exp $ +# $NetBSD: Makefile,v 1.8 2016/01/24 16:14:45 jperkin Exp $ DISTNAME= elementary-1.7.7 PKGREVISION= 4 @@ -26,7 +26,7 @@ MAKEFLAGS+= AUTOMAKE="automake -af" PKGCONFIG_OVERRIDE= elementary # currently it is like it is -MODULE_ARCH= ${LOWER_OPSYS}-${LOWER_ARCH}-1.7.7 +MODULE_ARCH= ${LOWER_OPSYS}-${MACHINE_ARCH}-1.7.7 PLIST_SUBST= MODULE_ARCH=${MODULE_ARCH} PRINT_PLIST_AWK+= { gsub(/${MODULE_ARCH}/, "$${MODULE_ARCH}") } diff --git a/x11/enlightenment/Makefile b/x11/enlightenment/Makefile index 909528882b7..f771eae36df 100644 --- a/x11/enlightenment/Makefile +++ b/x11/enlightenment/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2015/12/29 04:54:38 dholland Exp $ +# $NetBSD: Makefile,v 1.37 2016/01/24 16:14:45 jperkin Exp $ # DISTNAME= enlightenment-0.17.3 @@ -54,7 +54,7 @@ pre-install: PKGCONFIG_OVERRIDE= enlightenment.pc.in -MODULE_ARCH= ${LOWER_OPSYS}-${LOWER_ARCH}-${PKGVERSION_NOREV} +MODULE_ARCH= ${LOWER_OPSYS}-${MACHINE_ARCH}-${PKGVERSION_NOREV} PLIST_SUBST= MODULE_ARCH=${MODULE_ARCH} PRINT_PLIST_AWK+= { gsub(/${MODULE_ARCH}/, "$${MODULE_ARCH}") } |