[multiple changes]

2007-01-11  Paolo Bonzini  <bonzini@gnu.org>
            Nick Clifton  <nickc@redhat.com>
            Kaveh R. Ghazi  <ghazi@caip.rutgets.edu>

        * configure.in (build_configargs, host_configargs, target_configargs):
        Remove build/host/target parameters.
        (host_libs): Add gmp and mpfr.
        (GMP tests): Reorganize to allow in-tree GMP/MPFR.
        * Makefile.def (gmp, mpfr): New.
        (gcc): Remove makefile target.
        * Makefile.tpl (build_os, build_vendor, host_os, host_vendor,
        target_os, target_vendor): New.
        (configure): Add host_alias/target_alias arguments.  Adjust invocations.
        * configure: Regenerate.
        * Makefile.in: Regenerate.

2007-01-11  Matt Fago  <fago@earthlink.net>

	* configure.in: Try to link to functions only in mpfr 2.2.x
        to improve robustness of configure tests.
	* configure: Regenerate.

From-SVN: r120671
This commit is contained in:
Paolo Bonzini 2007-01-11 11:20:44 +00:00
parent 8b1f719ae7
commit e69bf64be9
6 changed files with 2378 additions and 380 deletions

View File

@ -1,3 +1,25 @@
2007-01-11 Paolo Bonzini <bonzini@gnu.org>
Nick Clifton <nickc@redhat.com>
Kaveh R. Ghazi <ghazi@caip.rutgets.edu>
* configure.in (build_configargs, host_configargs, target_configargs):
Remove build/host/target parameters.
(host_libs): Add gmp and mpfr.
(GMP tests): Reorganize to allow in-tree GMP/MPFR.
* Makefile.def (gmp, mpfr): New.
(gcc): Remove target.
* Makefile.tpl (build_os, build_vendor, host_os, host_vendor,
target_os, target_vendor): New.
(configure): Add host_alias/target_alias arguments. Adjust invocations.
* configure: Regenerate.
* Makefile.in: Regenerate.
2007-01-11 Matt Fago <fago@earthlink.net>
* configure.in: Try to link to functions only in mpfr 2.2.x
to improve robustness of configure tests.
* configure: Regenerate.
2007-01-09 Uros Bizjak <ubizjak@gmail.com>
* MAINTAINERS: Add myself as i386 maintainer.

View File

@ -30,8 +30,7 @@ build_modules= { module= byacc; };
build_modules= { module= flex; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
build_modules= { module= fixincludes;
extra_configure_args='--target=$(target)'; };
build_modules= { module= fixincludes; };
host_modules= { module= ash; };
host_modules= { module= autoconf; };
@ -61,10 +60,19 @@ host_modules= { module= fixincludes;
host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
host_modules= { module= gcc; bootstrap=true;
target="`if [ -f stage_last ]; then echo quickstrap ; else echo all; fi`";
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gawk; };
host_modules= { module= gettext; };
host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared';
no_install= true;
host="none-${host_vendor}-${host_os}";
target="none-${host_vendor}-${host_os}"; };
host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
extra_configure_flags='--disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp';
no_install= true;
host="none-${host_vendor}-${host_os}";
target="none-${host_vendor}-${host_os}"; };
host_modules= { module= gnuserv; };
host_modules= { module= gprof; };
host_modules= { module= gzip; };
@ -275,7 +283,9 @@ dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
dependencies = { module=all-gcc; on=all-gmp; };
dependencies = { module=all-gcc; on=all-intl; };
dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
dependencies = { module=all-gcc; on=all-build-byacc; };
@ -298,6 +308,8 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
dependencies = { module=configure-mpfr; on=all-gmp; };
// Host modules specific to gdb.
dependencies = { module=configure-gdb; on=configure-intl; };
dependencies = { module=configure-gdb; on=configure-sim; };

File diff suppressed because it is too large Load Diff

View File

@ -29,10 +29,16 @@ in
VPATH=@srcdir@
build_alias=@build_alias@
build_vendor=@build_vendor@
build_os=@build_os@
build=@build@
host_alias=@host_alias@
host_vendor=@host_vendor@
host_os=@host_os@
host=@host@
target_alias=@target_alias@
target_vendor=@target_vendor@
target_os=@target_os@
target=@target@
program_transform_name = @program_transform_name@
@ -779,7 +785,8 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
libsrcdir="$$s/[+module+]"; \
[+ IF no-config-site +]rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
[+args+] $${srcdiroption} [+extra_configure_flags+] \
[+args+] --build=${build_alias} --host=[+host_alias+] \
--target=[+target_alias+] $${srcdiroption} [+extra_configure_flags+] \
|| exit 1
@endif [+prefix+][+module+]
@ -821,7 +828,8 @@ configure-stage[+id+]-[+prefix+][+module+]:
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
libsrcdir="$$s/[+module+]"; \
$(SHELL) $${libsrcdir}/configure \
[+args+] $${srcdiroption} \
[+args+] --build=${build_alias} --host=[+host_alias+] \
--target=[+target_alias+] $${srcdiroption} \
[+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
[+stage_configure_flags+] [+extra_configure_flags+]
@endif [+prefix+][+module+]-bootstrap
@ -837,7 +845,7 @@ all-[+prefix+][+module+]: stage_current
@endif gcc-bootstrap
@if [+prefix+][+module+]
TARGET-[+prefix+][+module+]=[+
IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
IF all_target +][+all_target+][+ ELSE +]all[+ ENDIF all_target +]
maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +]
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
@ -894,6 +902,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
# --------------------------------------
[+ FOR build_modules +]
[+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
host_alias=(get "host" "${build_alias}")
target_alias=(get "target" "${target_alias}")
args="$(BUILD_CONFIGARGS)" no-config-site=true +]
[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
@ -906,6 +916,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
[+ configure prefix="" subdir="$(HOST_SUBDIR)"
exports="$(HOST_EXPORTS)"
poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
host_alias=(get "host" "${host_alias}")
target_alias=(get "target" "${target_alias}")
args="$(HOST_CONFIGARGS)" +]
[+ all prefix="" subdir="$(HOST_SUBDIR)"
@ -1003,6 +1015,8 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
check_multilibs=true
exports="$(RAW_CXX_TARGET_EXPORTS)"
host_alias=(get "host" "${target_alias}")
target_alias=(get "target" "${target_alias}")
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
@ -1012,6 +1026,8 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
check_multilibs=true
exports="$(NORMAL_TARGET_EXPORTS)"
host_alias=(get "host" "${target_alias}")
target_alias=(get "target" "${target_alias}")
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"

349
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -123,7 +123,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
# these libraries are used by various programs built for the host environment
#
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@ -1062,9 +1062,10 @@ ACX_PROG_GNAT
ACX_PROG_CMP_IGNORE_INITIAL
# Check for GMP and MPFR
gmplibs="-lmpfr"
gmplibs="-lmpfr -lgmp"
gmpinc=
have_gmp=yes
have_gmp=no
# Specify a location for mpfr
# check for this first so it ends up on the link line before gmp.
AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH This option has been REMOVED],
@ -1088,14 +1089,21 @@ fi
if test "x$with_mpfr_lib" != x; then
gmplibs="-L$with_mpfr_lib $gmplibs"
fi
if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
# Do not test the mpfr version. Assume that it is sufficient, since
# it is in the source tree, and the library has not been built yet
# but it would be included on the link line in the version check below
# hence making the test fail.
have_gmp=yes
fi
# Specify a location for gmp
AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH This option has been REMOVED],
AC_MSG_ERROR([The --with-gmp-dir=PATH option has been removed.
Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH]))
gmplibs="$gmplibs -lgmp"
AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify prefix directory for the installed GMP package
Equivalent to --with-gmp-include=PATH/include
plus --with-gmp-lib=PATH/lib])
@ -1113,42 +1121,58 @@ fi
if test "x$with_gmp_lib" != x; then
gmplibs="-L$with_gmp_lib $gmplibs"
fi
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
AC_MSG_CHECKING([for correct version of gmp.h])
AC_TRY_COMPILE([#include "gmp.h"],[
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
choke me
#endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
if test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
dnl MPFR 2.2.0 is acceptable but buggy, MPFR 2.2.1 is better.
AC_MSG_CHECKING([for correct version of mpfr.h])
AC_TRY_LINK([#include <gmp.h>
#include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
choke me
#endif
mpfr_t n; mpfr_init(n);
], [AC_TRY_LINK([#include <gmp.h>
#include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
choke me
#endif
mpfr_t n; mpfr_init(n);
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
[AC_MSG_RESULT([no]); have_gmp=no])
LIBS="$saved_LIBS"
if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
# Do not test the gmp version. Assume that it is sufficient, since
# it is in the source tree, and the library has not been built yet
# but it would be included on the link line in the version check below
# hence making the test fail.
have_gmp=yes
fi
CFLAGS="$saved_CFLAGS"
if test -d ${srcdir}/gcc && test x$have_gmp != xyes; then
AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
if test -d ${srcdir}/gcc && test "x$have_gmp" == xno; then
have_gmp=yes
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc"
# Check GMP actually works
AC_MSG_CHECKING([for correct version of gmp.h])
AC_TRY_COMPILE([#include "gmp.h"],[
#if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
choke me
#endif
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
if test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
dnl MPFR 2.2.0 is acceptable but buggy, MPFR 2.2.1 is better.
AC_MSG_CHECKING([for correct version of mpfr.h])
AC_TRY_LINK([#include <gmp.h>
#include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
choke me
#endif
mpfr_t n; mpfr_init(n);
mpfr_t x; mpfr_init(x);
int t;
mpfr_atan2 (n, n, x, GMP_RNDN);
mpfr_erfc (n, x, GMP_RNDN);
mpfr_subnormalize (x, t, GMP_RNDN);
], [AC_TRY_LINK([#include <gmp.h>
#include <mpfr.h>],[
#if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
choke me
#endif
mpfr_t n; mpfr_init(n);
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
[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.1+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
@ -1156,6 +1180,7 @@ See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.])
fi
fi
# Flags needed for both GMP and/or MPFR
@ -2095,7 +2120,7 @@ baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
# desired.
build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
build_configargs="--cache-file=../config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@ -2109,7 +2134,7 @@ esac
# Host dirs don't like to share a cache file either, horribly enough.
# This seems to be due to autoconf 2.5x stupidity.
host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
target_configargs=${baseargs}
@ -2145,7 +2170,7 @@ fi
# Pass the appropriate --build, --host, --target and --cache-file arguments.
# We need to pass --target, as newer autoconf's requires consistency
# for target_alias and gcc doesn't manage it consistently.
target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
target_configargs="--cache-file=./config.cache ${target_configargs}"
FLAGS_FOR_TARGET=
case " $target_configdirs " in