summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjschauma <jschauma@pkgsrc.org>2004-05-17 03:12:46 +0000
committerjschauma <jschauma@pkgsrc.org>2004-05-17 03:12:46 +0000
commit6f7a52cca09aac3d784848ef865cbe1ef52f521c (patch)
treeda6a4fe72ba319deb7f95e2a32c1c82ece52ab0f /mk/compiler
parent062c7487894c6c0d7f6eb83a243166645a235369 (diff)
downloadpkgsrc-6f7a52cca09aac3d784848ef865cbe1ef52f521c.tar.gz
Allow use of 32bit gcc compiled from pkgsrc on 64bit Irix for a default
ABI of 64.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk14
1 files changed, 10 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 2ae5fb5ea0f..7222717ed85 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.65 2004/05/12 21:31:50 jschauma Exp $
+# $NetBSD: gcc.mk,v 1.66 2004/05/17 03:12:46 jschauma Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -136,8 +136,9 @@ CFLAGS+= -Wno-import
# accordingly.
.if defined(ABI)
-CFLAGS+= -mabi=${ABI:C/^32$/n&/}
-LDFLAGS+= -mabi=${ABI:C/^32$/n&/}
+MABIFLAG= -mabi=${ABI:C/^32$/n&/}
+CFLAGS+= ${MABIFLAG}
+LDFLAGS+= ${MABIFLAG}
.endif
.if !empty(_NEED_GCC2:M[yY][eE][sS])
@@ -270,13 +271,18 @@ _GCC_SUBPREFIX!= \
_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX}
_GCC_ARCHDIR!= \
if [ -x ${_GCC_PREFIX}bin/gcc ]; then \
- ${DIRNAME} `${_GCC_PREFIX}bin/gcc --print-libgcc-file-name`; \
+ ${DIRNAME} `${_GCC_PREFIX}bin/gcc ${MABIFLAG} --print-libgcc-file-name`; \
else \
${ECHO} "_GCC_ARCHDIR_not_found"; \
fi
. if empty(_GCC_ARCHDIR:M*not_found*)
+. if !empty(MABIFLAG)
+_GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H}/
+_GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:H:T}/
+. else
_GCC_PREFIX:= ${_GCC_ARCHDIR:H:H:H:H}/
_GCC_SUBPREFIX:= ${_GCC_ARCHDIR:H:H:H:H:T}/
+. endif
. endif
_GCC_LIBDIRS= ${_GCC_ARCHDIR} ${_GCC_PREFIX}lib
_GCC_LDFLAGS= # empty