# configure.in for GCC
# Process this file with autoconf to generate a configuration script.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
#This file is part of GCC.
# Determine the host, build, and target systems
AC_CANONICAL_SYSTEM
+# Set program_transform_name
+AC_ARG_PROGRAM
+
# Find the native compiler
AC_PROG_CC
AC_PROG_CC_C_O
AC_SUBST(NO_MINUS_C_MINUS_O)
AC_SUBST(OUTPUT_OPTION)
+# See if GNAT has been installed
+gcc_AC_PROG_GNAT
+
AC_CACHE_CHECK(whether ${CC-cc} accepts -Wno-long-long,
ac_cv_prog_cc_no_long_long,
[save_CFLAGS="$CFLAGS"
AC_TRY_COMPILE(,,ac_cv_prog_cc_no_long_long=yes,
ac_cv_prog_cc_no_long_long=no)
CFLAGS="$save_CFLAGS"])
+
+if test x$have_gnat != xno ; then
+AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long,
+ac_cv_prog_adac_no_long_long,
+[cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
+ ac_cv_prog_adac_no_long_long=yes
+else
+ ac_cv_prog_adac_no_long_long=no
+fi
+rm -f conftest*])
+else
+ ac_cv_prog_adac_no_long_long=yes
+fi
+
strict1_warn=
-if test $ac_cv_prog_cc_no_long_long = yes; then
+if test $ac_cv_prog_cc_no_long_long = yes && \
+ test $ac_cv_prog_adac_no_long_long = yes ; then
strict1_warn="-pedantic -Wno-long-long"
fi
AC_SUBST(strict1_warn)
stage1_cflags="-J"
fi
;;
+powerpc-*-darwin*)
+ # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
+ # sources; use -no-cpp-precomp to get to GNU cpp.
+ # Apple's GCC has bugs in designated initializer handling, so disable
+ # that too.
+ stage1_cflags="-no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
+ ;;
esac
AC_SUBST(stage1_cflags)
gcc_AC_C_COMPILE_ENDIAN
gcc_AC_C_FLOAT_FORMAT
-# See if GNAT has been installed
-AC_CHECK_PROG(have_gnat, gnatbind, yes, no)
-
# See if we have the mktemp command.
AC_CHECK_PROG(have_mktemp_command, mktemp, yes, no)
# that we can use it.
gcc_AC_CHECK_PROG_VER(MAKEINFO, makeinfo, --version,
[GNU texinfo.* \([0-9][0-9.]*\)],
- [4.*])
+ [4.[1-9]*])
fi
if test $gcc_cv_prog_makeinfo_modern = no; then
# Is pod2man recent enough to regenerate manpages?
AC_MSG_CHECKING([for recent Pod::Man])
-if perl -e 'use 1.10 Pod::Man' >/dev/null 2>&1; then
+if (perl -e 'use 1.10 Pod::Man') >/dev/null 2>&1; then
AC_MSG_RESULT(yes)
GENERATED_MANPAGES=generated-manpages AC_SUBST(GENERATED_MANPAGES)
else
dnl Disabled until we have a complete test for buggy enum bitfields.
dnl gcc_AC_C_ENUM_BF_UNSIGNED
-AC_CHECK_FUNCS(strtoul bsearch popen times clock \
- strchr strrchr kill getrlimit setrlimit atoll atoq \
- sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
- fputs_unlocked fwrite_unlocked fprintf_unlocked getrusage nl_langinfo \
- lstat)
+AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
+ sysconf strsignal putc_unlocked fputc_unlocked fputs_unlocked \
+ fwrite_unlocked fprintf_unlocked getrusage nl_langinfo lstat)
AC_CHECK_TYPE(ssize_t, int)
fi
AC_SUBST(TARGET_GETGROUPS_T)
-gcc_AC_FUNC_VFPRINTF_DOPRNT
-gcc_AC_FUNC_STRSTR
gcc_AC_FUNC_PRINTF_PTR
case "${host}" in
*** UWIN may not be used as a host platform because
*** linking with posix.dll is not allowed by the GNU GPL])
;;
+*-*-*vms*)
+ # Under VMS, vfork works very different than on Unix. The standard test
+ # won't work, and it isn't easily adaptable. It makes more sense to
+ # just force it.
+ ac_cv_func_vfork_works=yes
+ ;;
esac
AC_FUNC_VFORK
AC_FUNC_MMAP_ANYWHERE
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked fwrite_unlocked \
- fprintf_unlocked strstr environ errno \
+ fprintf_unlocked strstr errno \
malloc realloc calloc free basename getopt clock, , ,[
#include "ansidecl.h"
#include "system.h"])
if test x$host = x$build
then
build_auto=auto-host.h
+ FORBUILD=..
else
# We create a subdir, then run autoconf in the subdir.
# To prevent recursion we set host and build for the new
saved_CFLAGS="${CFLAGS}"
CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
${realsrcdir}/configure \
- --target=$target --host=$build --build=$build
+ --target=$target_alias --host=$build_alias --build=$build_alias
CFLAGS="${saved_CFLAGS}"
# We just finished tests for the build machine, so rename
cd ..
rm -rf $tempdir
build_auto=auto-build.h
+ FORBUILD=../$build
fi
+AC_SUBST(FORBUILD)
tm_file="${tm_file} defaults.h"
host_xm_file="auto-host.h ansidecl.h ${host_xm_file} ${tm_file}"
# Internationalization
PACKAGE=gcc
VERSION="$gcc_version"
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE",
- [Define to the name of the distribution.])
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION",
- [Define to the version of the distribution.])
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
-ALL_LINGUAS="sv"
-
# Enable NLS support by default
AC_ARG_ENABLE(nls,
[ --enable-nls use Native Language Support (default)],
enable_nls=no
fi
-# if NLS is enabled, also enable check in po subdir
-if test $enable_nls = yes; then
- CHECK_PO=check-po
-else
- CHECK_PO=""
-fi
-
-AC_SUBST(CHECK_PO)
-
AM_GNU_GETTEXT
-XGETTEXT="AWK='$AWK' \$(SHELL) \$(top_srcdir)/exgettext $XGETTEXT"
# Windows32 Registry support for specifying GCC installation paths.
AC_ARG_ENABLE(win32-registry,
cc_set_by_configure="\$(CC)"
quoted_cc_set_by_configure="\$(CC)"
stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
+ quoted_stage_prefix_set_by_configure="\$(STAGE_PREFIX)"
else
rm -f symtest.tem
if cp -p $srcdir/gcc.c symtest.tem 2>/dev/null
cc_set_by_configure="\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`"
quoted_cc_set_by_configure="\\\`case '\\\$(CC)' in stage*) echo '\\\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(CC)';; esac\\\`"
stage_prefix_set_by_configure="\`case '\$(STAGE_PREFIX)' in stage*) echo '\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\$(STAGE_PREFIX)';; esac\`"
+ quoted_stage_prefix_set_by_configure="\\\`case '\\\$(STAGE_PREFIX)' in stage*) echo '\\\$(STAGE_PREFIX)' | sed -e 's|stage|../stage|g';; *) echo '\\\$(STAGE_PREFIX)';; esac\\\`"
fi
rm -f symtest.tem
esac
done
-# Define macro CROSS_COMPILE in compilation
-# if this is a cross-compiler.
-# Also use all.cross instead of all.internal
-# and add cross-make to Makefile.
-cross_overrides="/dev/null"
+# Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
+# Also use all.cross instead of all.internal and adjust SYSTEM_HEADER_DIR.
+CROSS= AC_SUBST(CROSS)
+ALL=all.internal AC_SUBST(ALL)
+SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' AC_SUBST(SYSTEM_HEADER_DIR)
if test x$host != x$target
then
- cross_defines="CROSS=-DCROSS_COMPILE"
- cross_overrides="${topdir}/cross-make"
+ CROSS="-DCROSS_COMPILE"
+ ALL=all.cross
+ SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
fi
# If this is a cross-compiler that does not
fi
AC_SUBST(inhibit_libc)
-# When building gcc with a cross-compiler, we need to fix a few things.
-# This must come after cross-make as we want all.build to override
-# all.cross.
-build_overrides="/dev/null"
+# When building gcc with a cross-compiler, we need to adjust things so
+# that the generator programs are still built with the native compiler.
+# Also, we cannot run fixincludes or fix-header.
+# Note that the terminology here is wrong; it should be BUILD_* throughout.
+# FIXME.
+
+# These are the normal (build=host) settings:
+HOST_PREFIX= AC_SUBST(HOST_PREFIX)
+HOST_PREFIX_1=ignore- AC_SUBST(HOST_PREFIX_1)
+HOST_CC='$(CC)' AC_SUBST(HOST_CC)
+HOST_CFLAGS='$(ALL_CFLAGS)' AC_SUBST(HOST_CFLAGS)
+
+STMP_FIXINC=stmp-fixinc AC_SUBST(STMP_FIXINC)
+STMP_FIXPROTO=stmp-fixproto AC_SUBST(STMP_FIXPROTO)
+
+# And these apply if build != host.
if test x$build != x$host
then
- build_overrides="${topdir}/build-make"
+ HOST_PREFIX=build-
+ HOST_PREFIX_1=build-
+ HOST_CC='$(CC_FOR_BUILD)'
+ HOST_CFLAGS='$(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS_FOR_BUILD) $(XCFLAGS)'
+
+ STMP_FIXINC=
+ STMP_FIXPROTO=
fi
# Expand extra_headers to include complete path.
if test "x$extra_headers" = x
then true
else
- # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
+ # Prepend ${srcdir}/config/${cpu_type}/ to every entry in extra_headers.
for file in $extra_headers;
do
- extra_headers_list="${extra_headers_list} \$(srcdir)/ginclude/${file}"
+ extra_headers_list="${extra_headers_list} \$(srcdir)/config/${cpu_type}/${file}"
done
fi
rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
fi
-# If we have nm in the build tree, make a link to it.
+# If we have nm and objdump in the build tree, make a link to them.
if test -f ../binutils/Makefile; then
rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
+ rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
fi
# If we have ld in the build tree, make a link to it.
gcc_cv_gas_major_version=
gcc_cv_gas_minor_version=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
+gcc_cv_as_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
if test -x "$DEFAULT_ASSEMBLER"; then
gcc_cv_as="$DEFAULT_ASSEMBLER"
elif test -x "$AS"; then
gcc_cv_as=./as$host_exeext
elif test -f $gcc_cv_as_gas_srcdir/configure.in -a -f ../gas/Makefile; then
# Single tree build which includes gas.
- for f in $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
+ for f in $gcc_cv_as_bfd_srcdir/configure $gcc_cv_as_gas_srcdir/configure $gcc_cv_as_gas_srcdir/configure.in $gcc_cv_as_gas_srcdir/Makefile.in
do
changequote(,)dnl
gcc_cv_gas_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
changequote([,])dnl
fi
-if test "x$gcc_cv_as" = x -a x$host = x$target; then
- # Native build.
+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
# do not find a suitable assembler binary, then try the user's
# If the loop below does not find an assembler, then use whatever
# one we can find in the users's path.
# user's path.
- gcc_cv_as=as$host_exeext
-
- test_dirs="$test_prefix/lib/gcc-lib/$target/$gcc_version \
- $test_prefix/lib/gcc-lib/$target \
- /usr/lib/gcc/$target/$gcc_version \
- /usr/lib/gcc/$target \
- $test_prefix/$target/bin/$target/$gcc_version \
- $test_prefix/$target/bin \
+ if test "x$program_prefix" != xNONE; then
+ gcc_cv_as=${program_prefix}as$host_exeext
+ else
+ gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
+ fi
+
+ test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
+ $test_prefix/lib/gcc-lib/$target_alias \
+ /usr/lib/gcc/$target_alias/$gcc_version \
+ /usr/lib/gcc/$target_alias \
+ $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
+ $test_prefix/$target_alias/bin"
+
+ if test x$host = x$target; then
+ test_dirs="$test_dirs \
/usr/libexec \
/usr/ccs/gcc \
/usr/ccs/bin \
/sysv/usr/lib/cmplrs/cc \
/svr4/usr/lib/cmplrs/cc \
/usr/bin"
+ fi
for dir in $test_dirs; do
- if test -f $dir/as$host_exeext; then
+ if test -x $dir/as$host_exeext; then
gcc_cv_as=$dir/as$host_exeext
break;
fi
AC_MSG_RESULT($gcc_cv_as)
fi
+# Figure out what linker we will be using.
+AC_MSG_CHECKING(what linker to use)
+gcc_cv_ld=
+gcc_cv_gld_major_version=
+gcc_cv_gld_minor_version=
+gcc_cv_ld_gld_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/ld
+gcc_cv_ld_bfd_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/bfd
+if test -x "$DEFAULT_LINKER"; then
+ gcc_cv_ld="$DEFAULT_LINKER"
+elif test -x "$LD"; then
+ gcc_cv_ld="$LD"
+elif test -x ld$host_exeext; then
+ # Build using linker in the current directory.
+ gcc_cv_ld=./ld$host_exeext
+elif test -f $gcc_cv_ld_gld_srcdir/configure.in -a -f ../ld/Makefile; then
+ # Single tree build which includes ld.
+ for f in $gcc_cv_ld_bfd_srcdir/configure $gcc_cv_ld_gld_srcdir/configure $gcc_cv_ld_gld_srcdir/configure.in $gcc_cv_ld_gld_srcdir/Makefile.in
+ do
+changequote(,)dnl
+ gcc_cv_gld_version=`grep '^VERSION=[0-9]*\.[0-9]*' $f`
+changequote([,])dnl
+ if test x$gcc_cv_gld_version != x; then
+ break
+ fi
+ done
+changequote(,)dnl
+ gcc_cv_gld_major_version=`expr "$gcc_cv_gld_version" : "VERSION=\([0-9]*\)"`
+ gcc_cv_gld_minor_version=`expr "$gcc_cv_gld_version" : "VERSION=[0-9]*\.\([0-9]*\)"`
+changequote([,])dnl
+fi
+
+if test "x$gcc_cv_ld" = x; then
+ # Search the same directories that the installed compiler will
+ # search. Else we may find the wrong linker and lose. If we
+ # do not find a suitable linker binary, then try the user's
+ # path.
+ #
+ # Also note we have to check MD_EXEC_PREFIX before checking the
+ # user's path. Unfortunately, there is no good way to get at the
+ # value of MD_EXEC_PREFIX here. So we do a brute force search
+ # through all the known MD_EXEC_PREFIX values. Ugh. This needs
+ # to be fixed as part of the make/configure rewrite too.
+
+ if test "x$exec_prefix" = xNONE; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ 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 test "x$program_prefix" != xNONE; then
+ gcc_cv_ld=${program_prefix}ld$host_exeext
+ else
+ gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
+ fi
+
+ test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
+ $test_prefix/lib/gcc-lib/$target_alias \
+ /usr/lib/gcc/$target_alias/$gcc_version \
+ /usr/lib/gcc/$target_alias \
+ $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
+ $test_prefix/$target_alias/bin"
+
+ if test x$host = x$target; then
+ test_dirs="$test_dirs \
+ /usr/libexec \
+ /usr/ccs/gcc \
+ /usr/ccs/bin \
+ /udk/usr/ccs/bin \
+ /bsd43/usr/lib/cmplrs/cc \
+ /usr/cross64/usr/bin \
+ /usr/lib/cmplrs/cc \
+ /sysv/usr/lib/cmplrs/cc \
+ /svr4/usr/lib/cmplrs/cc \
+ /usr/bin"
+ fi
+
+ for dir in $test_dirs; do
+ if test -x $dir/ld$host_exeext; then
+ gcc_cv_ld=$dir/ld$host_exeext
+ break;
+ fi
+ done
+fi
+if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
+ AC_MSG_RESULT("newly built ld")
+else
+ AC_MSG_RESULT($gcc_cv_ld)
+fi
+
# Figure out what nm we will be using.
AC_MSG_CHECKING(what nm to use)
if test -x nm$host_exeext; then
gcc_cv_nm=./nm$host_exeext
-elif test x$host = x$target; then
- # Native build.
- gcc_cv_nm=nm$host_exeext
+elif test "x$program_prefix" != xNONE; then
+ gcc_cv_nm=${program_prefix}nm$host_exeext
+else
+ gcc_cv_nm=`echo nm | sed ${program_transform_name}`$host_exeext
fi
AC_MSG_RESULT($gcc_cv_nm)
+# Figure out what objdump we will be using.
+AC_MSG_CHECKING(what objdump to use)
+if test -x objdump$host_exeext; then
+ gcc_cv_objdump=./objdump$host_exeext
+elif test "x$program_prefix" != xNONE; then
+ gcc_cv_objdump=${program_prefix}objdump$host_exeext
+else
+ gcc_cv_objdump=`echo objdump | sed ${program_transform_name}`$host_exeext
+fi
+AC_MSG_RESULT($gcc_cv_objdump)
+
# Figure out what assembler alignment features are present.
AC_MSG_CHECKING(assembler alignment features)
gcc_cv_as_alignment_features=none
[Define if your assembler supports .hidden.])
fi
AC_MSG_RESULT($gcc_cv_as_hidden)
+libgcc_visibility=$gcc_cv_as_hidden
+AC_SUBST(libgcc_visibility)
AC_MSG_CHECKING(assembler leb128 support)
gcc_cv_as_leb128=no
# arbitrary sections are supported and try the test.
as_ver=`$gcc_cv_as --version 2>/dev/null | head -1`
if echo "$as_ver" | grep GNU > /dev/null; then
- as_ver=`echo $as_ver | sed -e 's/.* //'`
- as_major=`echo $as_ver | sed 's/\..*//'`
changequote(,)dnl
+ as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
+ as_major=`echo $as_ver | sed 's/\..*//'`
as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
changequote([,])dnl
if test $as_major -eq 2 -a $as_minor -lt 11; then
# If the assembler didn't choke, and we can objdump,
# and we got the correct data, then succeed.
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
- && objdump -s -j .eh_frame conftest.o 2>/dev/null \
+ && $gcc_cv_objdump -s -j .eh_frame conftest.o 2>/dev/null \
| tail -3 > conftest.got \
&& { cmp conftest.lit conftest.got > /dev/null 2>&1 \
|| cmp conftest.big conftest.got > /dev/null 2>&1; }
fi
AC_MSG_RESULT($gcc_cv_as_shf_merge)
-case "$target" in
+case "$target" in
+ # All TARGET_ABI_OSF targets.
+ alpha*-*-osf* | alpha*-*-linux* | alpha*-*-*bsd*)
+ AC_CACHE_CHECK([assembler supports explicit relocations],
+ gcc_cv_as_explicit_relocs, [
+ gcc_cv_as_explicit_relocs=unknown
+ if test x$gcc_cv_gas_major_version != x \
+ -a x$gcc_cv_gas_minor_version != x
+ then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 12 \
+ -o "$gcc_cv_gas_major_version" -gt 2; then
+ gcc_cv_as_explicit_relocs=yes
+ fi
+ elif test x$gcc_cv_as != x; then
+ cat > conftest.s << 'EOF'
+ .set nomacro
+ .text
+ extbl $3, $2, $3 !lituse_bytoff!1
+ ldq $2, a($29) !literal!1
+ ldq $4, b($29) !literal!2
+ ldq_u $3, 0($2) !lituse_base!1
+ ldq $27, f($29) !literal!5
+ jsr $26, ($27), f !lituse_jsr!5
+ ldah $29, 0($26) !gpdisp!3
+ lda $0, c($29) !gprel
+ ldah $1, d($29) !gprelhigh
+ lda $1, d($1) !gprellow
+ lda $29, 0($29) !gpdisp!3
+EOF
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_explicit_relocs=yes
+ else
+ gcc_cv_as_explicit_relocs=no
+ fi
+ rm -f conftest.s conftest.o
+ fi
+ ])
+ if test "x$gcc_cv_as_explicit_relocs" = xyes; then
+ AC_DEFINE(HAVE_AS_EXPLICIT_RELOCS, 1,
+ [Define if your assembler supports explicit relocations.])
+ fi
+ ;;
sparc*-*-*)
AC_CACHE_CHECK([assembler .register pseudo-op support],
gcc_cv_as_register_pseudo_op, [
[Define if your assembler supports -relax option.])
fi
- case "$tm_file" in
- *64*)
- AC_CACHE_CHECK([for 64 bit support in assembler ($gcc_cv_as)],
- gcc_cv_as_flags64, [
- if test -n "$gcc_cv_as"; then
- echo ".xword foo" > conftest.s
- gcc_cv_as_flags64=no
- for flag in "-xarch=v9" "-64 -Av9"; do
- if $gcc_cv_as $flag -o conftest.o conftest.s \
- > /dev/null 2>&1; then
- gcc_cv_as_flags64=$flag
- break
- fi
- done
- rm -f conftest.s conftest.o
- else
- if test "$gas" = yes; then
- gcc_cv_as_flags64="-64 -Av9"
+ AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
+ gcc_cv_as_sparc_ua_pcrel, [
+ gcc_cv_as_sparc_ua_pcrel=unknown
+ if test x$gcc_cv_as != x -a x$gcc_cv_ld != x; then
+ gcc_cv_as_sparc_ua_pcrel=no
+ echo ".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo)" > conftest.s
+ if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1; then
+ gcc_cv_as_sparc_ua_pcrel=yes
+ fi
+ rm -f conftest.s conftest.o conftest
+ fi
+ ])
+ if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
+ AC_DEFINE(HAVE_AS_SPARC_UA_PCREL, 1,
+ [Define if your assembler and linker support unaligned PC relative relocs.])
+ fi
+
+ AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs against hidden symbols],
+ gcc_cv_as_sparc_ua_pcrel_hidden, [
+ if test "x$gcc_cv_as_sparc_ua_pcrel" = xyes; then
+ gcc_cv_as_sparc_ua_pcrel_hidden=unknown
+ if test x$gcc_cv_objdump != x; then
+ gcc_cv_as_sparc_ua_pcrel_hidden=no
+ echo ".data; .align 4; .byte 0x31; .uaword %r_disp32(foo)" > conftest.s
+ echo ".byte 0x32, 0x33, 0x34; .global foo; .hidden foo" >> conftest.s
+ echo "foo: .skip 4" >> conftest.s
+ if $gcc_cv_as -K PIC -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o -G > /dev/null 2>&1 \
+ && $gcc_cv_objdump -s -j .data conftest 2> /dev/null \
+ | grep ' 31000000 07323334' > /dev/null 2>&1; then
+ if $gcc_cv_objdump -R conftest 2> /dev/null \
+ | grep 'DISP32' > /dev/null 2>&1; then
+ :
else
- gcc_cv_as_flags64="-xarch=v9"
+ gcc_cv_as_sparc_ua_pcrel_hidden=yes
fi
fi
- ])
- if test "x$gcc_cv_as_flags64" = xno; then
-changequote(, )
- tmake_file=`echo " $tmake_file " | sed -e 's, sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
- dep_tmake_file=`echo " $dep_tmake_file " | sed -e 's, [^ ]*/config/sparc/t-sol2-64 , ,' -e 's,^ ,,' -e 's, $,,'`
-changequote([, ])
+ fi
+ rm -f conftest.s conftest.o conftest
else
- AC_DEFINE_UNQUOTED(AS_SPARC64_FLAG, "$gcc_cv_as_flags64",
- [Define if the assembler supports 64bit sparc.])
+ gcc_cv_as_sparc_ua_pcrel_hidden="$gcc_cv_as_sparc_ua_pcrel"
fi
- ;;
- *) gcc_cv_as_flags64=${gcc_cv_as_flags64-no}
- ;;
- esac
+ ])
+ if test "x$gcc_cv_as_sparc_ua_pcrel_hidden" = xyes; then
+ AC_DEFINE(HAVE_AS_SPARC_UA_PCREL_HIDDEN, 1,
+ [Define if your assembler and linker support unaligned PC relative relocs against hidden symbols.])
+ fi
if test "x$gcc_cv_as_flags64" != xno; then
AC_CACHE_CHECK([for assembler offsetable %lo() support],
;;
changequote(,)dnl
- i[34567]86-*-*)
+ i[34567]86-*-* | x86_64-*-*)
changequote([,])dnl
AC_MSG_CHECKING(assembler instructions)
gcc_cv_as_instructions=
AC_DEFINE_UNQUOTED(HAVE_GAS_`echo "$gcc_cv_as_instructions" | sed -e 's/ $//' | tr '[a-z ]' '[A-Z_]'`)
fi
AC_MSG_RESULT($gcc_cv_as_instructions)
+
+ AC_MSG_CHECKING(assembler GOTOFF in data directives)
+ gcc_cv_as_gotoff_in_data=no
+ if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x
+ then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 11 \
+ -o "$gcc_cv_gas_major_version" -gt 2; then
+ gcc_cv_as_gotoff_in_data=yes
+ fi
+ elif test x$gcc_cv_as != x; then
+ cat > conftest.s <<EOF
+ .text
+.L0:
+ nop
+ .data
+ .long .L0@GOTOFF
+EOF
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1; then
+ gcc_cv_as_gotoff_in_data=yes
+ fi
+ fi
+ AC_DEFINE_UNQUOTED(HAVE_AS_GOTOFF_IN_DATA,
+ [`if test $gcc_cv_as_gotoff_in_data = yes; then echo 1; else echo 0; fi`],
+ [Define true if the assembler supports '.long foo@GOTOFF'.])
+ AC_MSG_RESULT($gcc_cv_as_gotoff_in_data)
;;
esac
# ??? Once 2.11 is released, probably need to add first known working
# version to the per-target configury.
case "$target" in
- i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-*)
+ i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* | x86_64*-*-* | hppa*-*-*)
insn="nop"
;;
ia64*-*-*)
if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
&& grep debug_line conftest.o > /dev/null 2>&1 ; then
# The .debug_line file table must be in the exact order that
- # we specified the files, since these indicies are also used
+ # we specified the files, since these indices are also used
# by DW_AT_decl_file. Approximate this test by testing if
# the assembler bitches if the same index is assigned twice.
echo ' .file 1 "foo.s"' > conftest.s
if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
AC_DEFINE(HAVE_AS_DWARF2_DEBUG_LINE, 1,
[Define if your assembler supports dwarf2 .file/.loc directives,
- and preserves file table indicies exactly as given.])
+ and preserves file table indices exactly as given.])
fi
AC_MSG_RESULT($gcc_cv_as_dwarf2_debug_line)
+AC_MSG_CHECKING(assembler --gdwarf2 support)
+gcc_cv_as_gdwarf2_flag=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
+then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 11 \
+ -o "$gcc_cv_gas_major_version" -gt 2 \
+ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+ && test x"$insn" != x ; then
+ gcc_cv_as_gdwarf2_debug_flag="yes"
+ fi
+elif test x$gcc_cv_as != x -a x"$insn" != x ; then
+ echo '' > conftest.s
+ # ??? This fails with non-gnu grep.
+ if $gcc_cv_as --gdwarf2 -o conftest.o conftest.s > /dev/null 2>&1
+ then
+ gcc_cv_as_gdwarf2_flag="yes"
+ fi
+ rm -f conftest.s conftest.o
+fi
+if test x"$gcc_cv_as_gdwarf2_flag" = xyes; then
+ AC_DEFINE(HAVE_AS_GDWARF2_DEBUG_FLAG, 1,
+[Define if your assembler supports the --gdwarf2 option.])
+fi
+AC_MSG_RESULT($gcc_cv_as_gdwarf2_flag)
+
+AC_MSG_CHECKING(assembler --gstabs support)
+gcc_cv_as_gstabs_flag=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x;
+then
+ if test "$gcc_cv_gas_major_version" -eq 2 \
+ -a "$gcc_cv_gas_minor_version" -ge 11 \
+ -o "$gcc_cv_gas_major_version" -gt 2 \
+ && grep 'obj_format = elf' ../gas/Makefile > /dev/null \
+ && test x"$insn" != x ; then
+ gcc_cv_as_gstabs_debug_flag="yes"
+ fi
+elif test x$gcc_cv_as != x -a x"$insn" != x ; then
+ echo '' > conftest.s
+ # ??? This fails with non-gnu grep.
+ if $gcc_cv_as --gstabs -o conftest.o conftest.s > /dev/null 2>&1 ; then
+ gcc_cv_as_gstabs_flag="yes"
+ fi
+ rm -f conftest.s conftest.o
+fi
+if test x"$gcc_cv_as_gstabs_flag" = xyes; then
+ AC_DEFINE(HAVE_AS_GSTABS_DEBUG_FLAG, 1,
+[Define if your assembler supports the --gstabs option.])
+fi
+AC_MSG_RESULT($gcc_cv_as_gstabs_flag)
+
+AC_MSG_CHECKING(linker PT_GNU_EH_FRAME support)
+gcc_cv_ld_eh_frame_hdr=no
+if test x$gcc_cv_gld_major_version != x -a x$gcc_cv_gld_minor_version != x; then
+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 12 -o "$gcc_cv_gld_major_version" -gt 2 && grep 'EMUL = elf' ../ld/Makefile > /dev/null; then
+ gcc_cv_ld_eh_frame_hdr=yes
+ fi
+elif test x$gcc_cv_ld != x; then
+ # Check if linker supports --eh-frame-hdr option
+ if $gcc_cv_ld --help 2>/dev/null | grep eh-frame-hdr > /dev/null; then
+ gcc_cv_ld_eh_frame_hdr=yes
+ fi
+fi
+if test x"$gcc_cv_ld_eh_frame_hdr" = xyes; then
+ AC_DEFINE(HAVE_LD_EH_FRAME_HDR, 1,
+[Define if your linker supports --eh-frame-hdr option.])
+fi
+AC_MSG_RESULT($gcc_cv_ld_eh_frame_hdr)
+
+if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
+ AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
+fi
+
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
# go away some day.
+# NB: embedded tabs in this IF block -- do not untabify
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
- enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
+ enable_languages="${LANGUAGES}"
+ AC_MSG_WARN([setting LANGUAGES is deprecated, use --enable-languages instead])
+
else
enable_languages=all
fi
else
- if test x"${enable_languages}" = x; then
- AC_MSG_ERROR([--enable-languages needs at least one argument])
+ if test x"${enable_languages}" = x ||
+ test x"${enable_languages}" = xyes;
+ then
+ AC_MSG_ERROR([--enable-languages needs at least one language argument])
fi
fi
+enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
lang_specs_files=
lang_options_files=
lang_tree_files=
-rm -f specs.h options.h gencheck.h
-touch specs.h options.h gencheck.h
for subdir in . $subdirs
do
if test -f $srcdir/$subdir/lang-specs.h; then
- echo "#include \"$subdir/lang-specs.h\"" >>specs.h
- lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
+ lang_specs_files="$lang_specs_files $srcdir/$subdir/lang-specs.h"
fi
if test -f $srcdir/$subdir/lang-options.h; then
- echo "#include \"$subdir/lang-options.h\"" >>options.h
- lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
+ lang_options_files="$lang_options_files $srcdir/$subdir/lang-options.h"
fi
if test -f $srcdir/$subdir/$subdir-tree.def; then
- echo "#include \"$subdir/$subdir-tree.def\"" >>gencheck.h
- lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
+ lang_tree_files="$lang_tree_files $srcdir/$subdir/$subdir-tree.def"
fi
done
all_boot_languages=
all_compilers=
all_stagestuff=
-all_diff_excludes=
-all_outputs='Makefile intl/Makefile po/Makefile.in fixinc/Makefile gccbug mklibgcc'
+all_outputs='Makefile intl/Makefile fixinc/Makefile gccbug mklibgcc'
# List of language makefile fragments.
all_lang_makefiles=
-all_headers=
-all_lib2funcs=
# Add the language fragments.
# Languages are added via two mechanisms. Some information must be
boot_language=
compilers=
stagestuff=
- diff_excludes=
- headers=
outputs=
- lib2funcs=
. ${srcdir}/$s/config-lang.in
if test "x$language" = x
then
fi
all_compilers="$all_compilers $compilers"
all_stagestuff="$all_stagestuff $stagestuff"
- all_diff_excludes="$all_diff_excludes $diff_excludes"
- all_headers="$all_headers $headers"
all_outputs="$all_outputs $outputs"
- all_lib2funcs="$all_lib2funcs $lib2funcs"
fi
done
rm -f Make-hooks
touch Make-hooks
target_list="all.build all.cross start.encap rest.encap \
- info dvi \
+ info dvi generated-manpages \
install-normal install-common install-info install-man \
uninstall \
mostlyclean clean distclean extraclean maintainer-clean \
# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
# -e 's|/$||' match a trailing forward slash and eliminates it
# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
-# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
+# -e 's|/[^/]*|../|g' replaces each occurrence of /<directory> with ../
#
# (*) Note this pattern overwrites the first character of the string
# with a forward slash if one is not already present. This is not a
AC_SUBST(subdirs)
AC_SUBST(all_boot_languages)
AC_SUBST(all_compilers)
-AC_SUBST(all_diff_excludes)
-AC_SUBST(all_headers)
AC_SUBST(all_lang_makefiles)
AC_SUBST(all_languages)
-AC_SUBST(all_lib2funcs)
AC_SUBST(all_stagestuff)
AC_SUBST(build_exeext)
AC_SUBST(build_install_headers_dir)
AC_SUBST(cpp_install_dir)
AC_SUBST(dep_host_xmake_file)
AC_SUBST(dep_tmake_file)
-AC_SUBST(extra_c_flags)
AC_SUBST(extra_headers_list)
AC_SUBST(extra_objs)
AC_SUBST(extra_parts)
AC_SUBST(out_file)
AC_SUBST(out_object_file)
AC_SUBST(stage_prefix_set_by_configure)
+AC_SUBST(quoted_stage_prefix_set_by_configure)
AC_SUBST(symbolic_link)
AC_SUBST(thread_file)
AC_SUBST(tm_file_list)
AC_SUBST(tm_p_file)
AC_SUBST(xm_file)
AC_SUBST(xm_defines)
+AC_SUBST(target_alias)
AC_SUBST(c_target_objs)
AC_SUBST(cxx_target_objs)
AC_SUBST(target_cpu_default)
AC_SUBST_FILE(target_overrides)
AC_SUBST_FILE(host_overrides)
-AC_SUBST(cross_defines)
-AC_SUBST_FILE(cross_overrides)
-AC_SUBST_FILE(build_overrides)
AC_SUBST_FILE(language_fragments)
AC_SUBST_FILE(language_hooks)
# This is virtually a duplicate of what happens in configure.lang; we do
# an extra check to make sure this only happens if ln -s can be used.
if test "$symbolic_link" = "ln -s"; then
- for d in .. ${subdirs} ; do
+ for d in .. ${subdirs} fixinc ; do
if test $d != ..; then
STARTDIR=`pwd`
cd $d
echo creating libintl.h
echo '#include "intl/libintl.h"' >libintl.h
fi
-],
-[
-host='${host}'
-build='${build}'
-target='${target}'
-target_alias='${target_alias}'
-srcdir='${srcdir}'
-subdirs='${subdirs}'
-symbolic_link='${symbolic_link}'
-program_transform_set='${program_transform_set}'
-program_transform_name='${program_transform_name}'
-dep_host_xmake_file='${dep_host_xmake_file}'
-host_xmake_file='${host_xmake_file}'
-dep_tmake_file='${dep_tmake_file}'
-tmake_file='${tmake_file}'
-thread_file='${thread_file}'
-gcc_config_arguments='${gcc_config_arguments}'
-gcc_version='${gcc_version}'
-gcc_version_full='${gcc_version_full}'
-gcc_version_trigger='${gcc_version_trigger}'
-local_prefix='${local_prefix}'
-build_install_headers_dir='${build_install_headers_dir}'
-build_exeext='${build_exeext}'
-host_exeext='${host_exeext}'
-out_file='${out_file}'
-gdb_needs_out_file_path='${gdb_needs_out_file_path}'
-SET_MAKE='${SET_MAKE}'
-target_list='${target_list}'
-target_overrides='${target_overrides}'
-host_overrides='${host_overrides}'
-cross_defines='${cross_defines}'
-cross_overrides='${cross_overrides}'
-build_overrides='${build_overrides}'
-cpp_install_dir='${cpp_install_dir}'
+],
+[subdirs='$subdirs'
+symbolic_link='$symbolic_link'
])