AC_CONFIG_SRCDIR(tree.c)
AC_CONFIG_HEADER(auto-host.h:config.in)
-#Set to 1 on a release branch
-is_release=
-
# Determine the host, build, and target systems
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
*** and run configure again.])
fi
-TL_AC_GCC_VERSION([$srcdir/..])
-
# -----------
# Directories
# -----------
if test x${enable_version_specific_runtime_libs} = xyes; then
gcc_gxx_include_dir='${libsubdir}/include/c++'
else
- libstdcxx_incdir=c++/${gcc_version}
+ libstdcxx_incdir='c++/$(version)'
changequote(<<, >>)dnl
gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
changequote([, ])dnl
AC_SUBST(warn_cflags)
# Enable -Werror in bootstrap stage2 and later.
+is_release=
+if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
+ is_release=yes
+fi
AC_ARG_ENABLE(werror,
[ --enable-werror enable -Werror in bootstrap stage2 and later], [],
[if test x$is_release = x ; then
[ --enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
- Categories are: assert,fold,gc,gcac,misc,
- rtlflag,rtl,tree,valgrind,release,yes,all;],
+ Categories are: yes,no,all,none,release.
+ Flags are: assert,fold,gc,gcac,misc,
+ rtlflag,rtl,runtime,tree,valgrind.],
[ac_checking_flags="${enableval}"],[
# Determine the default checks.
if test x$is_release = x ; then
fi])
ac_assert_checking=1
ac_checking=
-ac_tree_checking=
-ac_rtl_checking=
-ac_rtlflag_checking=
+ac_fold_checking=
ac_gc_checking=
ac_gc_always_collect=
-ac_fold_checking=
+ac_rtl_checking=
+ac_rtlflag_checking=
+ac_runtime_checking=1
+ac_tree_checking=
+ac_valgrind_checking=
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
do
case $check in
+ # these set all the flags to specific states
yes) ac_assert_checking=1 ; ac_checking=1 ;
- ac_tree_checking=1 ; ac_gc_checking=1 ;
- ac_rtlflag_checking=1 ;;
- no) ac_assert_checking= ; ac_checking= ;
- ac_tree_checking= ; ac_rtl_checking= ;
- ac_rtlflag_checking= ; ac_gc_checking= ;
- ac_gc_always_collect= ; ac_fold_checking= ;;
+ ac_fold_checking= ; ac_gc_checking=1 ;
+ ac_gc_always_collect= ; ac_rtl_checking= ;
+ ac_rtlflag_checking=1 ; ac_runtime_chacking=1 ;
+ ac_tree_checking=1 ; ac_valgrind_checking= ;;
+ no|none) ac_assert_checking= ; ac_checking= ;
+ ac_fold_checking= ; ac_gc_checking= ;
+ ac_gc_always_collect= ; ac_rtl_checking= ;
+ ac_rtlflag_checking= ; ac_runtime_chacking= ;
+ ac_tree_checking= ; ac_valgrind_checking= ;;
all) ac_assert_checking=1 ; ac_checking=1 ;
- ac_tree_checking=1 ; ac_rtl_checking=1 ;
- ac_rtlflag_checking=1 ; ac_gc_checking=1 ;
- ac_gc_always_collect=1 ; ac_fold_checking=1 ;;
- release) ac_assert_checking=1 ;;
+ ac_fold_checking=1 ; ac_gc_checking=1 ;
+ ac_gc_always_collect=1 ; ac_rtl_checking=1 ;
+ ac_rtlflag_checking=1 ; ac_runtime_checking=1 ;
+ ac_tree_checking=1 ; ac_valgrind_checking= ;;
+ release) ac_assert_checking=1 ; ac_checking= ;
+ ac_fold_checking= ; ac_gc_checking= ;
+ ac_gc_always_collect= ; ac_rtl_checking= ;
+ ac_rtlflag_checking= ; ac_runtime_checking=1 ;
+ ac_tree_checking= ; ac_valgrind_checking= ;;
+ # these enable particular checks
assert) ac_assert_checking=1 ;;
fold) ac_fold_checking=1 ;;
gc) ac_gc_checking=1 ;;
gcac) ac_gc_always_collect=1 ;;
misc) ac_checking=1 ;;
- rtlflag) ac_rtlflag_checking=1 ;;
rtl) ac_rtl_checking=1 ;;
+ rtlflag) ac_rtlflag_checking=1 ;;
+ runtime) ac_runtime_checking=1 ;;
tree) ac_tree_checking=1 ;;
- valgrind) ac_checking_valgrind=1 ;;
+ valgrind) ac_valgrind_checking=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
AC_DEFINE(ENABLE_ASSERT_CHECKING, 1,
[Define if you want assertions enabled. This is a cheap check.])
fi
+if test x$ac_runtime_checking != x ; then
+ AC_DEFINE(ENABLE_RUNTIME_CHECKING, 1,
+[Define if you want runtime assertions enabled. This is a cheap check.])
+fi
if test x$ac_tree_checking != x ; then
AC_DEFINE(ENABLE_TREE_CHECKING, 1,
[Define if you want all operations on trees (the basic data
dnl # in converting to autoconf 2.5x!
AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no)
-if test x$ac_checking_valgrind != x ; then
+if test x$ac_valgrind_checking != x ; then
# It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both.
AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
for this architecture.])
fi
+# Convert extra_options into a form suitable for Makefile use.
+extra_opt_files=
+for f in $extra_options; do
+ extra_opt_files="$extra_opt_files \$(srcdir)/config/$f"
+done
+AC_SUBST(extra_opt_files)
+
# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
# If host=build, it is correct to have bconfig include auto-host.h
changequote([,])dnl
# Internationalization
-PACKAGE=gcc
-VERSION="$gcc_version"
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
- [The name of this program for internationalization purposes.])
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
-
ZW_GNU_GETTEXT_SISTER_DIR
# If LIBINTL contains LIBICONV, then clear LIBICONV so we don't get
--enable-win32-registry=KEY
use KEY instead of GCC version as the last portion
of the registry key],,)
+
case $host_os in
- win32 | pe | cygwin* | mingw32* | uwin*)
-AC_MSG_CHECKING(whether windows registry support is requested)
-if test "x$enable_win32_registry" != xno; then
- AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
-[Define to 1 if installation paths should be looked up in Windows32
- Registry. Ignored on non windows32 hosts.])
- AC_MSG_RESULT(yes)
- AC_SEARCH_LIBS(RegOpenKeyExA, advapi32)
-else
- AC_MSG_RESULT(no)
-fi
+ win32 | pe | cygwin* | mingw32* | uwin*)
+ if test "x$enable_win32_registry" != xno; then
+ AC_SEARCH_LIBS(RegOpenKeyExA, advapi32,, [enable_win32_registry=no])
+ fi
-# Check if user specified a different registry key.
-case "x${enable_win32_registry}" in
-x | xyes)
- # default.
- gcc_cv_win32_registry_key="$VERSION"
- ;;
-xno)
- # no registry lookup.
- gcc_cv_win32_registry_key=''
- ;;
-*)
- # user-specified key.
- gcc_cv_win32_registry_key="$enable_win32_registry"
+ if test "x$enable_win32_registry" != xno; then
+ AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
+ [Define to 1 if installation paths should be looked up in the Windows
+ Registry. Ignored on non-Windows hosts.])
+
+ if test "x$enable_win32_registry" != xyes \
+ && test "x$enable_win32_registry" != x; then
+ AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$enable_win32_registry",
+ [Define to be the last component of the Windows registry key under which
+ to look for installation paths. The full key used will be
+ HKEY_LOCAL_MACHINE/SOFTWARE/Free Software Foundation/{WIN32_REGISTRY_KEY}.
+ The default is the GCC version number.])
+ fi
+ fi
;;
esac
-if test "x$enable_win32_registry" != xno; then
- AC_MSG_CHECKING(registry key on windows hosts)
- AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
- [Define to be the last portion of registry key on windows hosts.])
- AC_MSG_RESULT($gcc_cv_win32_registry_key)
-fi
-;;
-esac
-
# Get an absolute path to the GCC top-level source directory
holddir=`${PWDCMD-pwd}`
cd $srcdir
;;
esac
+# This is a terrible hack which will go away some day.
+host_cc_for_libada=${CC}
+AC_SUBST(host_cc_for_libada)
+
out_object_file=`basename $out_file .c`.o
-tm_file_list=
-tm_include_list=
+tm_file_list="options.h"
+tm_include_list="options.h"
for f in $tm_file; do
case $f in
defaults.h )
gcc_cv_as="$AS"
fi
+gcc_version=`cat $srcdir/BASE-VER`
+
if test "x$gcc_cv_as" = x; then
# Search the same directories that the installed compiler will
# search. Else we may find the wrong assembler and lose. If we
fi
# If the loop below does not find an assembler, then use whatever
- # one we can find in the users's path.
- # user's path.
+ # one we can find in the users's path. We are looking for a
+ # ${build} -> ${target} assembler.
if test "x$program_prefix" != xNONE; then
gcc_cv_as=${program_prefix}as$build_exeext
+ elif test x$build != x$host && test x$build != x$target; then
+ gcc_cv_as=${target_noncanonical}-as$build_exeext
else
gcc_cv_as=`echo as | sed "${program_transform_name}"`$build_exeext
fi
test_dirs=
fi
- if test x$host = x$target; then
+ if test x$build = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
test_prefix=$exec_prefix
fi
- # If the loop below does not find an linker, then use whatever
- # one we can find in the users's path.
- # user's path.
+ # If the loop below does not find a linker, then use whatever
+ # one we can find in the users's path. We are looking for a
+ # ${build} -> ${target} linker.
if test "x$program_prefix" != xNONE; then
gcc_cv_ld=${program_prefix}ld$build_exeext
+ elif test x$build != x$host && test x$build != x$target; then
+ gcc_cv_ld=${target_noncanonical}-ld$build_exeext
else
gcc_cv_ld=`echo ld | sed "${program_transform_name}"`$build_exeext
fi
test_dirs=
fi
- if test x$host = x$target; then
+ if test x$build = x$target; then
test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
$LN_S ../binutils/nm-new$build_exeext nm$build_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then
gcc_cv_nm=${program_prefix}nm$build_exeext
+elif test x$build != x$host && test x$build != x$target; then
+ gcc_cv_nm=${target_noncanonical}-nm$build_exeext
else
gcc_cv_nm=`echo nm | sed "${program_transform_name}"`$build_exeext
fi
$LN_S ../binutils/objdump$build_exeext objdump$build_exeext 2>/dev/null
elif test "x$program_prefix" != xNONE; then
gcc_cv_objdump=${program_prefix}objdump$build_exeext
+elif test x$build != x$host && test x$build != x$target; then
+ gcc_cv_objdump=${target_noncanonical}-objdump$build_exeext
else
gcc_cv_objdump=`echo objdump | \
sed "${program_transform_name}"`$build_exeext
[ .weak foobar],,
[AC_DEFINE(HAVE_GAS_WEAK, 1, [Define if your assembler supports .weak.])])
+gcc_GAS_CHECK_FEATURE([.nsubspa comdat], gcc_cv_as_nsubspa_comdat,
+ [2,15,91],,
+ [ .SPACE $TEXT$
+ .NSUBSPA $CODE$,COMDAT],,
+[AC_DEFINE(HAVE_GAS_NSUBSPA_COMDAT, 1, [Define if your assembler supports .nsubspa comdat option.])])
+
# .hidden needs to be supported in both the assembler and the linker,
# because GNU LD versions before 2.12.1 have buggy support for STV_HIDDEN.
# This is irritatingly difficult to feature test for; we have to check the
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ frv*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+x: .long 25
+ .text
+ call #gettlsoff(x)'
+ tls_first_major=2
+ tls_first_minor=14
+ ;;
i[34567]86-*-*)
conftest_s='
.section ".tdata","awT",@progbits
tls_first_minor=13
tls_as_opt=--fatal-warnings
;;
+ mips*-*-*)
+ conftest_s='
+ .section .tdata,"awT",@progbits
+x:
+ .word 2
+ .text
+ addiu $4, $28, %tlsgd(x)
+ addiu $4, $28, %tlsldm(x)
+ lui $4, %dtprel_hi(x)
+ addiu $4, $4, %dtprel_lo(x)
+ lw $4, %gottprel(x)($28)
+ lui $4, %tprel_hi(x)
+ addiu $4, $4, %tprel_lo(x)'
+ tls_first_major=2
+ tls_first_minor=16
+ tls_as_opt='-32 --fatal-warnings'
+ ;;
powerpc-*-*)
conftest_s='
.section ".tdata","awT",@progbits
# Target-specific assembler checks.
+AC_MSG_CHECKING(linker -Bstatic/-Bdynamic option)
+gcc_cv_ld_static_dynamic=no
+if test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 10; then
+ gcc_cv_ld_static_dynamic=yes
+ fi
+elif test x$gcc_cv_ld != x; then
+ # Check if linker supports -Bstatic/-Bdynamic option
+ if $gcc_cv_ld --help 2>/dev/null | grep -- -Bstatic > /dev/null \
+ && $gcc_cv_ld --help 2>/dev/null | grep -- -Bdynamic > /dev/null; then
+ gcc_cv_ld_static_dynamic=yes
+ fi
+fi
+if test x"$gcc_cv_ld_static_dynamic" = xyes; then
+ AC_DEFINE(HAVE_LD_STATIC_DYNAMIC, 1,
+[Define if your linker supports -Bstatic/-Bdynamic option.])
+fi
+AC_MSG_RESULT($gcc_cv_ld_static_dynamic)
+
if test x"$demangler_in_ld" = xyes; then
AC_MSG_CHECKING(linker --demangle support)
gcc_cv_ld_demangle=no
[if test x$gcc_cv_objdump != x \
&& $gcc_cv_objdump -s -j .text conftest.o 2> /dev/null \
| grep ' 82106000 82106000' > /dev/null 2>&1; then
- gcc_cv_as_offsetable_lo10=yes
+ gcc_cv_as_sparc_offsetable_lo10=yes
fi],
[AC_DEFINE(HAVE_AS_OFFSETABLE_LO10, 1,
[Define if your assembler supports offsetable %lo().])])
gcc_GAS_CHECK_FEATURE([dwarf2 debug_line support],
gcc_cv_as_dwarf2_debug_line,
[elf,2,11,0],, [$conftest_s],
- [# ??? This fails with non-gnu grep. Maybe use objdump?
- if grep debug_line conftest.o > /dev/null 2>&1; then
+ [if test x$gcc_cv_objdump != x \
+ && $gcc_cv_objdump -h conftest.o 2> /dev/null \
+ | grep debug_line > /dev/null 2>&1; then
gcc_cv_as_dwarf2_debug_line=yes
fi])
[ --with-gc={page,zone} choose the garbage collection mechanism to use
with the compiler],
[case "$withval" in
- page | zone)
+ page)
GGC=ggc-$withval
;;
+ zone)
+ GGC=ggc-$withval
+ AC_DEFINE(GGC_ZONE, 1, [Define if the zone collector is in use])
+ ;;
*)
AC_MSG_ERROR([$withval is an invalid option to --with-gc])
;;
AC_SUBST_FILE(language_hooks)
-TL_AC_GNU_MAKE_GCC_LIB_PATH
-
# Echo link setup.
if test x${build} = x${host} ; then
if test x${host} = x${target} ; then