This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
PR libgomp/41418: fix libgomp without fortran enabled
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 11 Oct 2009 13:09:06 +0200
- Subject: PR libgomp/41418: fix libgomp without fortran enabled
OK for trunk? DaveK tested this on Cygwin without
--enable-languages=fortran, see
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41418#c19>
and I tested it on i686-pc-linux-gnu, with fortran enabled.
A cleaner fix might be to change toplevel to set GFORTRAN to "no" or
"false" or something like that, but I'd only go that way when doing
similar for all toplevel compiler variables, and that would require
more work (and can still be done later).
Thanks,
Ralf
Fix libgomp without --enable-languages=fortran.
libgomp/ChangeLog:
2009-10-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR libgomp/41418
* configure.ac: Set FC to "no" if $GFORTRAN starts with "no"
or a hyphen (happens with fortran language disabled).
* configure: Regenerate.
diff --git a/libgomp/configure.ac b/libgomp/configure.ac
index e0bdf2b..792c9f5 100644
--- a/libgomp/configure.ac
+++ b/libgomp/configure.ac
@@ -142,7 +142,12 @@ AM_MAINTAINER_MODE
# We need gfortran to compile parts of the library
# We can't use AC_PROG_FC because it expects a fully working gfortran.
#AC_PROG_FC(gfortran)
-FC="$GFORTRAN"
+case `echo $GFORTRAN` in
+ -* | no* )
+ FC=no ;;
+ *)
+ FC="$GFORTRAN" ;;
+esac
AC_PROG_FC(gfortran)
FCFLAGS="$FCFLAGS -Wall"