diff options
author | jlam <jlam@pkgsrc.org> | 2004-03-13 19:08:37 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-03-13 19:08:37 +0000 |
commit | b7736f0576c5f70afc82b0978c465f390d5bfc0f (patch) | |
tree | 383c675c6b6bbd0b2a46abf71fc5313525c745df /mk | |
parent | c51a44c031fda85b0053778bf9a59b8766671c58 (diff) | |
download | pkgsrc-b7736f0576c5f70afc82b0978c465f390d5bfc0f.tar.gz |
Provide a way to forcibly use the native GCC by setting USE_NATIVE_GCC in
a package Makefile. Also modify pkg_admin checks to drop stderr so that
errors aren't so verbose.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/compiler/gcc.mk | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index 59b5f4da3d8..0232cb7d9a5 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -1,10 +1,12 @@ -# $NetBSD: gcc.mk,v 1.59 2004/03/13 17:52:24 jlam Exp $ +# $NetBSD: gcc.mk,v 1.60 2004/03/13 19:08:37 jlam Exp $ .if !defined(COMPILER_GCC_MK) COMPILER_GCC_MK= defined .include "../../mk/bsd.prefs.mk" +USE_NATIVE_GCC?= no + GCC_REQD+= 2.8.0 # _GCC_DIST_VERSION is the highest version of GCC installed by the pkgsrc @@ -76,7 +78,7 @@ _GCC_PKG_SATISFIES_DEP= YES . for _vers_ in ${GCC_REQD} . if !empty(_GCC_PKG_SATISFIES_DEP:M[yY][eE][sS]) _GCC_PKG_SATISFIES_DEP!= \ - if ${PKG_ADMIN} pmatch 'gcc>=${_vers_}' ${_pkg_}; then \ + if ${PKG_ADMIN} pmatch 'gcc>=${_vers_}' ${_pkg_} 2>/dev/null; then \ ${ECHO} "YES"; \ else \ ${ECHO} "NO"; \ @@ -184,6 +186,10 @@ USE_GCC_SHLIB?= yes . endif .endif +.if !empty(USE_NATIVE_GCC:M[yY][eE][sS]) +_USE_PKGSRC_GCC= no +.endif + .if defined(_IGNORE_GCC) _USE_PKGSRC_GCC= NO .endif @@ -193,7 +199,7 @@ _USE_PKGSRC_GCC= YES . if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS]) _GCC_TEST_DEPENDS= gcc>=${_GCC_REQD} _USE_PKGSRC_GCC!= \ - if ${PKG_ADMIN} pmatch '${_GCC_TEST_DEPENDS}' ${_GCC_PKG}; then \ + if ${PKG_ADMIN} pmatch '${_GCC_TEST_DEPENDS}' ${_GCC_PKG} 2>/dev/null; then \ ${ECHO} "NO"; \ else \ ${ECHO} "YES"; \ @@ -207,7 +213,7 @@ _USE_PKGSRC_GCC!= \ .if !defined(_NEED_NEWER_GCC) _PKGSRC_GCC_VERSION= ${_GCC_PKGBASE}-${_GCC_DIST_VERSION} _NEED_NEWER_GCC!= \ - if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION}; then \ + if ${PKG_ADMIN} pmatch '${_GCC_DEPENDS}' ${_PKGSRC_GCC_VERSION} 2>/dev/null; then \ ${ECHO} "NO"; \ else \ ${ECHO} "YES"; \ |