On Thu, 12 Oct 2006, DJ Delorie wrote: > > > Okay for stage1? > > Ok, assuming everyone agrees to those versions ;-)
Great, thanks. I haven't heard anyone disagree with those versions, so unless someone objects before stage1 starts I'll use those. By the way, here is a more complete patch which adds the documentation updates I promised. It also eliminates $need_gmp and $(F95_LIBS) as followup cleanups. Tested on sparc-sun-solaris2.10 via "make" with C & fortran enabled. I'll do more extensive testing (full bootstrap, regtest and "make info") shortly. Ironically given the nature of this patch, configure is saying I need to get a more recent makeinfo in order to build the docs. :-) Thanks, --Kaveh 2006-10-13 Kaveh R. Ghazi <[EMAIL PROTECTED]> * configure.in: Require GMP-4.1+ and MPFR-2.2+. Don't check need_gmp anymore. * configure: Regenerate. gcc: * Makefile.in (LIBS): Add $(GMPLIBS). * doc/install.texi: Update GMP and MPFR requirements. * doc/sourcebuild.texi (need_gmp): Delete. gcc/fortran: * Make-lang.in (F95_LIBS): Delete. * f951$(exeext): Use $(LIBS) instead of $(F95_LIBS). * config-lang.in (need_gmp): Delete. diff -rup orig/egcc-SVN20061011/configure.in egcc-SVN20061011/configure.in --- orig/egcc-SVN20061011/configure.in 2006-09-27 20:01:59.000000000 -0400 +++ egcc-SVN20061011/configure.in 2006-10-13 03:05:01.309928436 -0400 @@ -1103,24 +1103,24 @@ choke me ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) if test x"$have_gmp" = xyes; then + saved_LIBS="$LIBS" + LIBS="$LIBS $gmplibs" AC_MSG_CHECKING([for correct version of mpfr.h]) - AC_TRY_COMPILE([#include "gmp.h" + AC_TRY_LINK([#include <gmp.h> #include <mpfr.h>],[ #if MPFR_VERSION_MAJOR < 2 || (MPFR_VERSION_MAJOR == 2 && MPFR_VERSION_MINOR < 2) choke me #endif -], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy version of MPFR detected])]) - - saved_LIBS="$LIBS" - LIBS="$LIBS $gmplibs" - AC_MSG_CHECKING([for any version of mpfr.h]) - AC_TRY_LINK([#include <gmp.h> -#include <mpfr.h>], [mpfr_t n; mpfr_init(n);], - [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) + mpfr_t n; mpfr_init(n); +], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no]) LIBS="$saved_LIBS" fi CFLAGS="$saved_CFLAGS" +if test x$have_gmp != xyes; then + AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2+. Try the --with-gmp and/or --with-mpfr options.]) +fi + # Flags needed for both GMP and/or MPFR AC_SUBST(gmplibs) AC_SUBST(gmpinc) @@ -1208,7 +1208,6 @@ if test -d ${srcdir}/gcc; then subdir_requires= boot_language= build_by_default= - need_gmp= . ${lang_frag} potential_languages="${potential_languages},${language}" # This is quite sensitive to the ordering of the case statement arms. @@ -1254,18 +1253,6 @@ if test -d ${srcdir}/gcc; then esac done - # Disable languages that need GMP if it isn't available. - case ,${enable_languages},:${have_gmp}:${need_gmp} in - *,${language},*:no:yes) - # Specifically requested language; tell them. - AC_MSG_ERROR([GMP 4.1 and MPFR 2.2 or newer versions required by $language]) - ;; - *:no:yes) - # Silently disable. - add_this_lang=no - ;; - esac - # Disable a language that is unsupported by the target. case " $unsupported_languages " in *" $language "*) diff -rup orig/egcc-SVN20061011/gcc/Makefile.in egcc-SVN20061011/gcc/Makefile.in --- orig/egcc-SVN20061011/gcc/Makefile.in 2006-10-10 20:01:28.000000000 -0400 +++ egcc-SVN20061011/gcc/Makefile.in 2006-10-13 03:00:25.192043515 -0400 @@ -846,7 +846,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY) # How to link with both our special library facilities # and the system's installed libraries. -LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) +LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) $(GMPLIBS) # Any system libraries needed just for GNAT. SYSLIBS = @GNAT_LIBEXC@ diff -rup orig/egcc-SVN20061011/gcc/doc/install.texi egcc-SVN20061011/gcc/doc/install.texi --- orig/egcc-SVN20061011/gcc/doc/install.texi 2006-10-03 20:00:51.000000000 -0400 +++ egcc-SVN20061011/gcc/doc/install.texi 2006-10-13 03:03:49.824512100 -0400 @@ -292,13 +292,13 @@ systems' @command{tar} programs will als @item GNU Multiple Precision Library (GMP) version 4.1 (or later) -Necessary to build the Fortran frontend. If you do not have it -installed in your library search path, you will have to configure with -the @option{--with-gmp} or @option{--with-gmp-dir} configure option. +Necessary to build GCC. If you do not have it installed in your +library search path, you will have to configure with the [EMAIL PROTECTED] or @option{--with-gmp-dir} configure option. @item MPFR Library version 2.2 (or later) -Necessary to build the Fortran frontend. It can be downloaded from +Necessary to build GCC. It can be downloaded from @uref{http://www.mpfr.org/}. The version of MPFR that is bundled with GMP 4.1.x contains numerous bugs. Although gfortran will appear to function with the buggy versions of MPFR, there are a few gfortran bugs diff -rup orig/egcc-SVN20061011/gcc/doc/sourcebuild.texi egcc-SVN20061011/gcc/doc/sourcebuild.texi --- orig/egcc-SVN20061011/gcc/doc/sourcebuild.texi 2006-07-13 20:01:40.000000000 -0400 +++ egcc-SVN20061011/gcc/doc/sourcebuild.texi 2006-10-13 02:56:59.255701248 -0400 @@ -714,10 +714,6 @@ If defined, a space-separated list of fi gengtype.c to generate the garbage collection tables and routines for this language. This excludes the files that are common to all front ends. @xref{Type Information}. [EMAIL PROTECTED] need_gmp -If defined to @samp{yes}, this frontend requires the GMP library. -Enables configure tests for GMP, which set @code{GMPLIBS} and [EMAIL PROTECTED] appropriately. @end table diff -rup orig/egcc-SVN20061011/gcc/fortran/Make-lang.in egcc-SVN20061011/gcc/fortran/Make-lang.in --- orig/egcc-SVN20061011/gcc/fortran/Make-lang.in 2006-10-10 20:01:17.000000000 -0400 +++ egcc-SVN20061011/gcc/fortran/Make-lang.in 2006-10-13 03:07:04.067551780 -0400 @@ -76,9 +76,6 @@ F95_OBJS = $(F95_PARSER_OBJS) \ fortran/trans-intrinsic.o fortran/trans-io.o fortran/trans-openmp.o \ fortran/trans-stmt.o fortran/trans-types.o -# GFORTRAN uses GMP for its internal arithmetics. -F95_LIBS = $(GMPLIBS) $(LIBS) - # # Define the names for selecting gfortran in LANGUAGES. fortran: f951$(exeext) @@ -107,7 +104,7 @@ gfortran-cross$(exeext): gfortran$(exeex f951$(exeext): $(F95_OBJS) \ $(BACKEND) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ \ - $(F95_OBJS) $(BACKEND) $(F95_LIBS) + $(F95_OBJS) $(BACKEND) $(LIBS) gt-fortran-trans.h : s-gtype; @true # diff -rup orig/egcc-SVN20061011/gcc/fortran/config-lang.in egcc-SVN20061011/gcc/fortran/config-lang.in --- orig/egcc-SVN20061011/gcc/fortran/config-lang.in 2006-01-23 00:20:04.000000000 -0500 +++ egcc-SVN20061011/gcc/fortran/config-lang.in 2006-10-13 02:57:45.513093474 -0400 @@ -16,5 +16,3 @@ target_libs=target-libgfortran gtfiles="\$(srcdir)/fortran/f95-lang.c \$(srcdir)/fortran/trans-decl.c \$(srcdir)/fortran/trans-intrinsic.c \$(srcdir)/fortran/trans-io.c \$(srcdir)/fortran/trans-types.c \$(srcdir)/fortran/trans-types.h \$(srcdir)/fortran/trans.h \$(srcdir)/fortran/trans-const.h" -need_gmp="yes" -