diff options
author | tnn <tnn@pkgsrc.org> | 2015-04-27 10:33:49 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2015-04-27 10:33:49 +0000 |
commit | a080096879b736e2acd23f91692ea31c0d816303 (patch) | |
tree | 771c99373e13fe9ca49373c9325def548cdcf2db | |
parent | 70a24b8da4d1158d0ae4d5035456399a91eb8216 (diff) | |
download | pkgsrc-a080096879b736e2acd23f91692ea31c0d816303.tar.gz |
correct MACHINE_ARCH and compiler flags for HP-UX 64-bit ABI
-rw-r--r-- | mk/bsd.prefs.mk | 18 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 13 |
2 files changed, 22 insertions, 9 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index 41efbf48fbe..c70f7ce8a9b 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.362 2015/04/19 01:37:55 joerg Exp $ +# $NetBSD: bsd.prefs.mk,v 1.363 2015/04/27 10:33:49 tnn Exp $ # # This file includes the mk.conf file, which contains the user settings. # @@ -281,9 +281,12 @@ LOWER_VENDOR?= dec .elif ${OPSYS} == "HPUX" OS_VERSION:= ${OS_VERSION:C/^B.//} -.if ${MACHINE_ARCH} == "9000" -MACHINE_ARCH= hppa -.endif +. 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 @@ -417,9 +420,12 @@ OBJECT_FMT= XCOFF .elif ${OPSYS} == "OSF1" OBJECT_FMT= ECOFF .elif ${OPSYS} == "HPUX" -. if ${MACHINE_ARCH} == "ia64" || (defined(ABI) && ${ABI} == "64") +. if ${MACHINE_ARCH} == "ia64" OBJECT_FMT= ELF -. else +. elif ${MACHINE_ARCH} == "hppa64" +# it is ELF but for most purposes behaves like SOM (.sl suffix, ...) +OBJECT_FMT= SOM +. else # hppa OBJECT_FMT= SOM . endif .elif ${OPSYS} == "Cygwin" diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 61ad5e6c7e0..4d2592634f2 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,4 +1,4 @@ -# $NetBSD: gcc.mk,v 1.160 2015/04/25 10:33:29 wiz Exp $ +# $NetBSD: gcc.mk,v 1.161 2015/04/27 10:33:49 tnn Exp $ # # This is the compiler definition for the GNU Compiler Collection. # @@ -786,8 +786,15 @@ _COMPILER_STRIP_VARS+= ${_GCC_VARS} IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES .endif -_COMPILER_ABI_FLAG.32= -m32 -_COMPILER_ABI_FLAG.64= -m64 +# On HP-UX the GCC toolchain must be specifically targeted to an ABI, +# -m32 or -m64 are not recognized. +.if ${OPSYS} == "HPUX" +_COMPILER_ABI_FLAG.32= # empty +_COMPILER_ABI_FLAG.64= # empty +.else +_COMPILER_ABI_FLAG.32= -m32 +_COMPILER_ABI_FLAG.64= -m64 +.endif .if !empty(_USE_PKGSRC_GCC:M[yY][eE][sS]) . if exists(${CCPATH}) |