Subject: Re: need a C++ compiler? (was: CVS commit: pkgsrc)
To: Johnny C. Lam <jlam@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/02/2004 12:19:32
May I commit this?
Index: mk/compiler/gcc.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.13
diff -b -u -r1.13 gcc.mk
--- mk/compiler/gcc.mk 2004/02/02 12:45:08 1.13
+++ mk/compiler/gcc.mk 2004/02/02 20:18:31
@@ -24,7 +24,7 @@
# version ...", so we can't just grep for "^gcc".
#
_IS_BUILTIN_GCC!= \
- gccpath="`${TYPE} ${CC} | ${AWK} '{ print $$NF }'`"; \
+ gccpath="`${TYPE} ${CC:C/-.*$//} | ${AWK} '{ print $$NF }'`";
\
case $$gccpath in \
${LOCALBASE}/*) \
${ECHO} "NO"; \
@@ -174,7 +174,7 @@
${GREP} "File:.*bin/gcc" | \
${SED} -e "s/.*File: *//;s/bin\/gcc.*//;q"; \
else \
- gccpath="`${TYPE} ${CC} | ${AWK} '{ print $$NF }'`"; \
+ gccpath="`${TYPE} ${CC:C/-.*$//} | ${AWK} '{ print $$NF
}'`"; \
case $$gccpath in \
${LOCALBASE}/*) \
${ECHO} "`${BASENAME} $$gccpath`/"; \
@@ -182,7 +182,7 @@
*) \
${ECHO} "not_found/"; \
;; \
- esac
+ esac \
fi
_GCC_PREFIX= ${LOCALBASE}/${_GCC_SUBPREFIX}
_GCC_ARCHDIR!= \
@@ -257,7 +257,7 @@
. endif
.else
. if !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
-_GCC_PATH!= ${TYPE} ${CC} | ${AWK} '{ print $$NF }'
+_GCC_PATH!= ${TYPE} ${CC:C/-.*$//} | ${AWK} '{ print $$NF }'
PATH:= ${_GCC_PATH:H}:${PATH}
. endif
.endif
> $ cc -pipe -V
> cc: `-V' must come at the start of the command line
That still needs to be fixed in mk/compiler/sunpro.mk and
mk/compiler/mipspro.mk too. I'll change if that is okay?
Jeremy C. Reed
http://www.reedmedia.net/