summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-08-15 21:26:28 +0000
committerjoerg <joerg@pkgsrc.org>2007-08-15 21:26:28 +0000
commit0094e01f2c2c2f7193397fce89edd122a9b85069 (patch)
treef722db0917005d2ba1c38df1e7bdbd0bf3a7308e /mk/compiler
parent8d10733d8dc5957e45c876dc53b005d6352c1a4d (diff)
downloadpkgsrc-0094e01f2c2c2f7193397fce89edd122a9b85069.tar.gz
Provide _COMPILER_RPATH_FLAG and _LINKER_RPATH_FLAG. This should work
at the very least with AIX 5.3 directly and for older, wrapper should take care. Provide some more sane defaults for XLC and bail out explicitly if XLCBASE can't be determined.
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/xlc.mk16
1 files changed, 14 insertions, 2 deletions
diff --git a/mk/compiler/xlc.mk b/mk/compiler/xlc.mk
index db454ba10b4..1b73d41d156 100644
--- a/mk/compiler/xlc.mk
+++ b/mk/compiler/xlc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: xlc.mk,v 1.14 2006/12/15 12:46:24 martti Exp $
+# $NetBSD: xlc.mk,v 1.15 2007/08/15 21:26:28 joerg Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -47,7 +47,17 @@ COMPILER_XLC_MK= defined
.include "../../mk/bsd.prefs.mk"
-XLCBASE?= /opt/ibmcmp/vacpp/6.0
+.if !defined(XLCBASE)
+. if exists(/usr/vacpp/README)
+XLCBASE= /usr/vacpp
+. elif exists(/usr/vac/README)
+XLCBASE= /usr/vac
+. elif exists(/opt/ibmcmp/vacpp/6.0/README)
+XLCBASE= /opt/ibmcmp/vacpp/6.0
+. else
+PKG_FAIL_REASON+= "Cannot determine XLCBASE."
+. endif
+.endif
# LANGUAGES.<compiler> is the list of supported languages by the
# compiler.
@@ -73,6 +83,8 @@ CXXPATH= ${XLCBASE}/bin/xlc++
PKG_CXX:= ${_XLC_CXX}
.endif
_COMPILER_STRIP_VARS+= ${_XLC_VARS}
+_COMPILER_RPATH_FLAG= -Wl,-R
+_LINKER_RPATH_FLAG= -R
.if exists(${CCPATH})
CC_VERSION_STRING!= ${CCPATH} -V 2>&1 | ${GREP} 'IBM XL C.*for' | ${SED} -e 's/^ *//' || ${TRUE}