summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-03 22:35:05 +0000
committerjlam <jlam>2004-02-03 22:35:05 +0000
commitd45c7f81ba3ec8807aa08e7b0d30874a61672898 (patch)
tree624ec98fc58bd6cd81efc0bbc70142b61b9f1836
parent9f98b817d366f27bc9840932a8802ad57705dd14 (diff)
downloadpkgsrc-d45c7f81ba3ec8807aa08e7b0d30874a61672898.tar.gz
Reorder checks when setting _GCC_SUBPREFIX so that we always search for
the installed package first if _USE_PKGSRC_GCC is "yes".
-rw-r--r--mk/compiler/gcc.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 1cb0f5cf73b..867bd1e7988 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.23 2004/02/03 22:32:22 jlam Exp $
+# $NetBSD: gcc.mk,v 1.24 2004/02/03 22:35:05 jlam Exp $
.if !defined(COMPILER_GCC_MK)
COMPILER_GCC_MK= defined
@@ -199,18 +199,21 @@ PKG_SKIP_REASON= "Unable to satisfy dependency: ${_GCC_DEPENDS}"
# Ensure that the correct rpath is passed to the linker if we need to
# link against gcc shared libs.
#
-. if !empty(_CC:M${LOCALBASE}/*)
-_GCC_SUBPREFIX= ${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/
-. else
_GCC_SUBPREFIX!= \
if ${PKG_INFO} -qe ${_GCC_PKGBASE}; then \
${PKG_INFO} -f ${_GCC_PKGBASE} | \
${GREP} "File:.*bin/gcc" | \
${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \
else \
- ${ECHO} "not_found/"; \
+ case ${_CC} in \
+ ${LOCALBASE}/*) \
+ ${ECHO} "${_CC:H:S/\/bin$//:S/${LOCALBASE}\///:S/${LOCALBASE}//}/" ; \
+ ;; \
+ *) \
+ ${ECHO} "not_found/"; \
+ ;; \
+ esac; \
fi
-. endif
_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX}
_GCC_ARCHDIR!= \
if [ -x ${_GCC_PREFIX}bin/gcc ]; then \