diff options
author | dmcmahill <dmcmahill@pkgsrc.org> | 2008-04-30 21:38:15 +0000 |
---|---|---|
committer | dmcmahill <dmcmahill@pkgsrc.org> | 2008-04-30 21:38:15 +0000 |
commit | 2454a41eaa3fce173761870d4e986bc644da1b1d (patch) | |
tree | 243e37c2f4eebe0d6b91022f8d83963d0cd88c7d /lang/f2c | |
parent | f92d054b950579c60351cd0ee785c733083dff24 (diff) | |
download | pkgsrc-2454a41eaa3fce173761870d4e986bc644da1b1d.tar.gz |
When calling 'cc -c' use a stripped down version of CFLAGS that
removes all -Wl,* entries. Otherwise some versions of gcc will
give a warning which in turn breaks the autoconf check for fortran
libraries. This fixes at least cad/tnt-mmtl and probably any
other package that uses the AC_F77_LIBRARY_LDFLAGS autoconf macro.
Bump rev to f2c-20001205nb10.
Diffstat (limited to 'lang/f2c')
-rw-r--r-- | lang/f2c/Makefile | 4 | ||||
-rw-r--r-- | lang/f2c/files/f2c-f77.in | 19 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index 44c5990dd79..edfeeeb8ad7 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.43 2007/12/16 15:47:55 gdt Exp $ +# $NetBSD: Makefile,v 1.44 2008/04/30 21:38:15 dmcmahill Exp $ DISTNAME= f2c-20001205 -PKGREVISION= 9 +PKGREVISION= 10 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_LOCAL} diff --git a/lang/f2c/files/f2c-f77.in b/lang/f2c/files/f2c-f77.in index 968b8a46cd3..4fe8b470747 100644 --- a/lang/f2c/files/f2c-f77.in +++ b/lang/f2c/files/f2c-f77.in @@ -303,12 +303,23 @@ F2CFLAGS="$F2CFLAGS $S2DBLFLAGS" eval "set -- $ARGS" +# strip off lines which just are for the linker in cases where +# we are not linkng. Otherwise we produce gcc warnings +# like: +# +# cc: -R/usr/pkg/lib: linker input file unused because linking not done +# +# which messes up the autoconf tests for fortran libraries. + +CFLAGS_NOLINK=`echo $CFLAGS | sed -e 's; '\''-Wl,[^ ]*; ;g' -e 's; -Wl,[^ ]*; ;g'` + if test $VERBOSE = "yes"; then F2CVER=`$F2C < /dev/null | awk '/.*version/ {print $6" "$7}'` echo "f2c-f77:" echo "F2C= $F2C, $F2CVER" echo "CC= $CC" echo "CFLAGS= $CFLAGS" + echo "CFLAGS_NOLINK= $CFLAGS_NOLINK" echo "CPPFLAGS= $CPPFLAGS" echo "FLIBS= $FLIBS" echo "LD_RUN_PATH= @PREFIX@/lib" @@ -343,7 +354,7 @@ do ;; esac case $rc in 0);; *) exit;; esac - eval "\$CC -c $CFLAGS \$b.c" 2>$s + eval "\$CC -c $CFLAGS_NOLINK \$b.c" 2>$s rc=$? sed '/parameter .* is not referenced/d;/warning: too many parameters/d' $s 1>&2 case $rc in 0);; *) exit;; esac @@ -358,7 +369,7 @@ do case $? in 0);; *) rc=$?; exit;; esac eval "\$F2C $F2CFLAGS \$b.f" case $? in 0);; *) rc=$?; exit;; esac - eval "\$CC -c $CFLAGS \$b.c" + eval "\$CC -c $CFLAGS_NOLINK \$b.c" case $? in 0);; *) rc=$?; exit;; esac OFILES="$OFILES $b.o" rm $b.[cf] @@ -371,7 +382,7 @@ do case $? in 0);; *) rc=$?; exit;; esac eval "\$F2C $F2CFLAGS \$b.f" case $? in 0);; *) rc=$?; exit;; esac - eval "\$CC -c $CFLAGS \$b.c" + eval "\$CC -c $CFLAGS_NOLINK \$b.c" case $? in 0);; *) rc=$?; exit;; esac OFILES="$OFILES $b.o" rm $b.[cf] @@ -390,7 +401,7 @@ do *.c) echo $1: 1>&2 OFILE=`basename $1 .c`.o - eval "\$CC -c $CPPFLAGS $CFLAGS \$1" + eval "\$CC -c $CPPFLAGS $CFLAGS_NOLINK \$1" rc=$?; case $rc in 0);; *) rc=$?; exit;; esac OFILES="$OFILES $OFILE" case $cOPT in 1) cOPT=2;; esac |