aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 16:14:49 +0000
committerandreao <andreao@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 16:14:49 +0000
commit3a5d771aad30cd87f79bebb9cefdafbf3411cc40 (patch)
treeeff23a43ff51a900b29a295f10667b980bbff547 /configure.ac
parent0ee5103eb2fe6a6d0d739c70b09da0450aee115c (diff)
merge from trunk revisions 127002-132392, 10/N
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/st/cli-be@146441 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac170
1 files changed, 138 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac
index 8973fe3c338..b500dfe2386 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,6 +41,7 @@ AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
m4_pattern_allow([^AS_FOR_TARGET$])dnl
+m4_pattern_allow([^AS_FOR_BUILD$])dnl
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
@@ -101,6 +102,9 @@ do
# Add the quoted argument to the list.
TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
done
+if test "$silent" = yes; then
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS --silent"
+fi
# Remove the initial space we just introduced and, as these will be
# expanded by make, quote '$'.
TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
@@ -173,6 +177,7 @@ target_libraries="target-libgcc \
target-libiberty \
target-libgloss \
target-newlib \
+ target-libgomp \
target-libstdc++-v3 \
target-libmudflap \
target-libssp \
@@ -180,8 +185,7 @@ target_libraries="target-libgcc \
target-boehm-gc \
${libgcj} \
target-libobjc \
- target-libada \
- target-libgomp"
+ target-libada"
# these tools are built using the target libraries, and are intended to
# run only in the target environment
@@ -203,6 +207,10 @@ configdirs=`echo ${host_libs} ${host_tools}`
target_configdirs=`echo ${target_libraries} ${target_tools}`
build_configdirs=`echo ${build_libs} ${build_tools}`
+m4_divert_text([PARSE_ARGS],
+[ac_subdirs_all=`cd $srcdir && echo */configure | sed 's,/configure,,g'`
+])
+
################################################################################
srcname="gnu development package"
@@ -395,12 +403,14 @@ if test x$enable_libgomp = x ; then
esac
fi
+# Default libgloss CPU subdirectory.
+libgloss_dir="$target_cpu"
case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- powerpc-*-darwin* | i[[3456789]]86-*-darwin*)
+ powerpc-*-darwin* | i[[3456789]]86-*-darwin* | x86_64-*-darwin9*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
@@ -501,6 +511,7 @@ case "${target}" in
*) noconfigdirs="$noconfigdirs gdb readline"
;;
esac
+ libgloss_dir=wince
;;
arc-*-*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -509,19 +520,23 @@ case "${target}" in
;;
arm-*-coff | strongarm-*-coff | xscale-*-coff)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=arm
;;
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ libgloss_dir=arm
;;
arm*-*-linux-gnueabi)
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
- noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ noconfigdirs="$noconfigdirs target-qthreads"
+ noconfigdirs="$noconfigdirs target-libobjc"
case ${with_newlib} in
no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
esac
+ libgloss_dir=arm
;;
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
+ libgloss_dir=arm
;;
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
@@ -565,7 +580,6 @@ case "${target}" in
unsupported_languages="$unsupported_languages fortran"
noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
*-*-elf)
- unsupported_languages="$unsupported_languages fortran"
noconfigdirs="$noconfigdirs target-boehm-gc";;
*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
@@ -573,6 +587,7 @@ case "${target}" in
unsupported_languages="$unsupported_languages fortran"
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss";;
esac
+ libgloss_dir=cris
;;
crx-*-*)
noconfigdirs="$noconfigdirs target-libstdc++-v3 target-mudflap ${libgcj}"
@@ -583,6 +598,9 @@ case "${target}" in
d30v-*-*)
noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
+ ep9312-*-elf | ep9312-*-coff)
+ libgloss_dir=arm
+ ;;
fr30-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj} gdb"
;;
@@ -614,6 +632,9 @@ case "${target}" in
hppa*-hp-hpux11*)
noconfigdirs="$noconfigdirs ld shellutils"
;;
+ hppa*-*-pro*)
+ libgloss_dir=pa
+ ;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
# build on HP-UX 10.20.
@@ -634,6 +655,7 @@ case "${target}" in
;;
i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=i386
;;
i[[3456789]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
@@ -703,6 +725,7 @@ case "${target}" in
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
+ libgloss_dir=m68hc11
;;
m68k-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -710,6 +733,9 @@ case "${target}" in
m68k-*-coff*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ m68*-*-* | fido-*-*)
+ libgloss_dir=m68k
+ ;;
mcore-*-pe*)
# The EPOC C++ environment does not support exceptions or rtti,
# and so building libstdc++-v3 tends not to always work.
@@ -741,14 +767,17 @@ case "${target}" in
# This is temporary until we can link against shared libraries
powerpcle-*-solaris*)
noconfigdirs="$noconfigdirs gdb sim make tcl tk expect itcl gnuserv ${libgcj}"
+ libgloss_dir=rs6000
;;
powerpc-*-beos*)
noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
powerpc-*-eabi)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=rs6000
;;
powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
+ libgloss_dir=rs6000
;;
rs6000-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
@@ -762,6 +791,14 @@ case "${target}" in
m68k-apollo-*)
noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss ${libgcj}"
;;
+ mips*-sde-elf*)
+ skipdirs="$skipdirs target-libiberty"
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ if test x$with_newlib = xyes; then
+ noconfigdirs="$noconfigdirs gprof"
+ fi
+ libgloss_dir=mips
+ ;;
mips*-*-irix5*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
@@ -775,14 +812,12 @@ case "${target}" in
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
- ;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
mips*-*-*)
noconfigdirs="$noconfigdirs gprof ${libgcj}"
+ libgloss_dir=mips
;;
romp-*-*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
@@ -796,14 +831,19 @@ case "${target}" in
esac
noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
;;
+ sparclet-*-aout* | sparc86x-*-*)
+ libgloss_dir=sparc
+ ;;
sparc-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
sparc64-*-elf*)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=sparc
;;
sparclite-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
+ libgloss_dir=sparc
;;
sparc-*-sunos4*)
noconfigdirs="$noconfigdirs ${libgcj}"
@@ -839,7 +879,7 @@ case "${target}" in
vax-*-*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- xtensa-*-*)
+ xtensa*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
ip2k-*-*)
@@ -976,8 +1016,10 @@ case "${host}" in
host_makefile_frag="config/mh-cygwin"
;;
*-mingw32*)
+ host_makefile_frag="config/mh-mingw"
;;
*-mingw64*)
+ host_makefile_frag="config/mh-mingw"
;;
*-interix*)
host_makefile_frag="config/mh-interix"
@@ -1049,9 +1091,31 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
fi
if test "${build}" != "${host}" ; then
+ AR_FOR_BUILD=${AR_FOR_BUILD-ar}
+ AS_FOR_BUILD=${AS_FOR_BUILD-as}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+ CXX_FOR_BUILD=${CXX_FOR_BUILD-g++}
+ GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj}
+ GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
+ DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
+ LD_FOR_BUILD=${LD_FOR_BUILD-ld}
+ NM_FOR_BUILD=${NM_FOR_BUILD-nm}
+ RANLIB_FOR_BUILD=${RANLIB_FOR_BUILD-ranlib}
+ WINDRES_FOR_BUILD=${WINDRES_FOR_BUILD-windres}
+ WINDMC_FOR_BUILD=${WINDMC_FOR_BUILD-windmc}
else
+ AR_FOR_BUILD="\$(AR)"
+ AS_FOR_BUILD="\$(AS)"
CC_FOR_BUILD="\$(CC)"
+ CXX_FOR_BUILD="\$(CXX)"
+ GCJ_FOR_BUILD="\$(GCJ)"
+ GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
+ DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
+ LD_FOR_BUILD="\$(LD)"
+ NM_FOR_BUILD="\$(NM)"
+ RANLIB_FOR_BUILD="\$(RANLIB)"
+ WINDRES_FOR_BUILD="\$(WINDRES)"
+ WINDMC_FOR_BUILD="\$(WINDMC)"
fi
AC_PROG_CC
@@ -1164,11 +1228,11 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
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.
+ dnl MPFR 2.2.1 is acceptable, but MPFR 2.3.0 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)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
choke me
#endif
mpfr_t n;
@@ -1181,7 +1245,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
mpfr_subnormalize (x, t, GMP_RNDN);
], [AC_TRY_LINK([#include <gmp.h>
#include <mpfr.h>],[
- #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,3,0)
choke me
#endif
mpfr_t n; mpfr_init(n);
@@ -1192,7 +1256,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
CFLAGS="$saved_CFLAGS"
if test x$have_gmp != xyes; then
- AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
+ AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
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/.
@@ -1424,7 +1488,8 @@ fi
# Handle --disable-<component> generically.
for dir in $configdirs $build_configdirs $target_configdirs ; do
dirname=`echo $dir | sed -e s/target-//g -e s/build-//g -e s/-/_/g`
- if eval test x\${enable_${dirname}} "=" xno ; then
+ varname=`echo $dirname | sed -e s/+/_/g`
+ if eval test x\${enable_${varname}} "=" xno ; then
noconfigdirs="$noconfigdirs $dir"
fi
done
@@ -1595,6 +1660,18 @@ AC_ARG_WITH([build-sysroot],
[SYSROOT_CFLAGS_FOR_TARGET=])
AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
+AC_ARG_WITH([debug-prefix-map],
+ [ --with-debug-prefix-map='A=B C=D ...'
+ map A to B, C to D ... in debug information],
+ [if test x"$withval" != x; then
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET=
+ for debug_map in $withval; do
+ DEBUG_PREFIX_CFLAGS_FOR_TARGET="$DEBUG_PREFIX_CFLAGS_FOR_TARGET -fdebug-prefix-map=$debug_map"
+ done
+ fi],
+ [DEBUG_PREFIX_CFLAGS_FOR_TARGET=])
+AC_SUBST(DEBUG_PREFIX_CFLAGS_FOR_TARGET)
+
# Handle --with-headers=XXX. If the value is not "yes", the contents of
# the named directory are copied to $(tooldir)/sys-include.
if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
@@ -1722,7 +1799,7 @@ case "${target}" in
v850*-*-*)
md_exec_prefix=/usr/ccs/bin
;;
- xtensa-*-elf*)
+ xtensa*-*-elf*)
;;
*-*-beos* | \
@@ -1750,6 +1827,12 @@ case "${target}" in
spu-*-*)
target_makefile_frag="config/mt-spu"
;;
+ mips*-sde-elf*)
+ target_makefile_frag="config/mt-sde"
+ ;;
+ mipsisa*-*-elfoabi*)
+ target_makefile_frag="config/mt-mips-elfoabi"
+ ;;
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
@@ -2183,6 +2266,9 @@ EOF_SED
gcc_transform_name=`cat conftestsed.out`
rm -f conftestsed.out
baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
+if test "$silent" = yes; then
+ baseargs="$baseargs --silent"
+fi
# 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
@@ -2283,6 +2369,19 @@ case " $target_configdirs " in
# for any libc-related directories first (so make it the last -B
# switch).
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+
+ # If we're building libgloss, find the startup file, simulator library
+ # and linker script.
+ case " $target_configdirs " in
+ *" libgloss "*)
+ # Look for startup file, simulator library and maybe linker script.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/'"$libgloss_dir"
+ # Look for libnosys.a in case the target needs it.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
+ # Most targets have the linker script in the source directory.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$s/libgloss/'"$libgloss_dir"
+ ;;
+ esac
;;
esac
;;
@@ -2297,7 +2396,11 @@ esac
# Allow the user to override the flags for
# our build compiler if desired.
-CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+if test x"${build}" = x"${host}" ; then
+ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+ CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
+fi
# On Canadian crosses, we'll be searching the right directories for
# the previously-installed cross compiler, so don't bother to add
@@ -2316,16 +2419,6 @@ fi
# Search for other target-specific linker scripts and such.
case "${target}" in
- m32c-*-* )
- if test -d ${srcdir}/libgloss/m32c; then
- # This is for crt0.o
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
- # This is for r8c.ld
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
- # This is for libnosys.a
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
- fi
- ;;
mep*)
FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
;;
@@ -2365,7 +2458,21 @@ AC_SUBST(target_configargs)
# Build tools.
+AC_SUBST(AR_FOR_BUILD)
+AC_SUBST(AS_FOR_BUILD)
AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CXXFLAGS_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(DLLTOOL_FOR_BUILD)
+AC_SUBST(GCJ_FOR_BUILD)
+AC_SUBST(GFORTRAN_FOR_BUILD)
+AC_SUBST(LDFLAGS_FOR_BUILD)
+AC_SUBST(LD_FOR_BUILD)
+AC_SUBST(NM_FOR_BUILD)
+AC_SUBST(RANLIB_FOR_BUILD)
+AC_SUBST(WINDMC_FOR_BUILD)
+AC_SUBST(WINDRES_FOR_BUILD)
AC_SUBST(config_shell)
# Generate default definitions for YACC, M4, LEX and other programs that run
@@ -2405,10 +2512,10 @@ case " $build_configdirs " in
*" texinfo "*) MAKEINFO='$$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo' ;;
*)
changequote(,)
- # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # For an installed makeinfo, we require it to be from texinfo 4.6 or
# higher, else we use the "missing" dummy.
if ${MAKEINFO} --version \
- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
+ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
:
else
MAKEINFO="$MISSING makeinfo"
@@ -2450,7 +2557,6 @@ NCN_STRICT_CHECK_TOOLS(OBJDUMP, objdump)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
-AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS)
# Target tools.
@@ -2597,10 +2703,10 @@ AC_ARG_ENABLE(stage1-checking,
[ --enable-stage1-checking@<:@=all@:>@ choose additional checking for stage1
of the compiler],
[stage1_checking=--enable-checking=${enable_stage1_checking}],
-[if test "x$enable_checking" = xno; then
+[if test "x$enable_checking" = xno || test "x$enable_checking" = x; then
stage1_checking=--enable-checking=yes,types
else
- stage1_checking=--enable-checking=types${enable_checking+,}$enable_checking
+ stage1_checking=--enable-checking=$enable_checking,types
fi])
AC_SUBST(stage1_checking)