AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
AC_SUBST(CROSS_SYSTEM_HEADER_DIR)
+AC_ARG_WITH(specs,
+ [AS_HELP_STRING([--with-specs=SPECS],
+ [add SPECS to driver command-line processing])],
+ [CONFIGURE_SPECS=$withval],
+ [CONFIGURE_SPECS=]
+)
+AC_SUBST(CONFIGURE_SPECS)
+
# Build with intermodule optimisations
AC_ARG_ENABLE(intermodule,
[ --enable-intermodule build the compiler in one step],
AC_PATH_PROG(gcc_cv_ld, $LD_FOR_TARGET)
fi])
+ORIGINAL_PLUGIN_LD_FOR_TARGET=$gcc_cv_ld
+PLUGIN_LD=`basename $gcc_cv_ld`
+AC_ARG_WITH(plugin-ld,
+[ --with-plugin-ld=[[ARG]] specify the plugin linker],
+[if test x"$withval" != x; then
+ ORIGINAL_PLUGIN_LD_FOR_TARGET="$withval"
+ PLUGIN_LD="$withval"
+ fi])
+AC_SUBST(ORIGINAL_PLUGIN_LD_FOR_TARGET)
+AC_DEFINE_UNQUOTED(PLUGIN_LD, "$PLUGIN_LD", [Specify plugin linker])
+
ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld
AC_SUBST(ORIGINAL_LD_FOR_TARGET)
case "$ORIGINAL_LD_FOR_TARGET" in
[ .hidden foobar
foobar:])
+changequote(,)dnl
+if test $in_tree_ld != yes ; then
+ ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
+ if echo "$ld_ver" | grep GNU > /dev/null; then
+ ld_vers=`echo $ld_ver | sed -n \
+ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
+ ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
+ ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
+ ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
+ ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
+ fi
+fi
+changequote([,])dnl
+
AC_CACHE_CHECK(linker for .hidden support, gcc_cv_ld_hidden,
[if test $in_tree_ld = yes ; then
gcc_cv_ld_hidden=no
else
changequote(,)dnl
gcc_cv_ld_hidden=yes
- ld_ver=`$gcc_cv_ld --version 2>/dev/null | sed 1q`
if echo "$ld_ver" | grep GNU > /dev/null; then
- ld_vers=`echo $ld_ver | sed -n \
- -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'`
- ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
- ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'`
- ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'`
- ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
if test 0"$ld_date" -lt 20020404; then
if test -n "$ld_date"; then
# If there was date string, but was earlier than 2002-04-04, fail
then echo 1; else echo 0; fi`],
[Define 0/1 if your assembler supports .cfi_personality.])
+gcc_GAS_CHECK_FEATURE([cfi sections directive],
+ gcc_cv_as_cfi_sections_directive, ,,
+[ .text
+ .cfi_sections .debug_frame, .eh_frame
+ .cfi_startproc
+ .cfi_endproc])
+AC_DEFINE_UNQUOTED(HAVE_GAS_CFI_SECTIONS_DIRECTIVE,
+ [`if test $gcc_cv_as_cfi_sections_directive = yes;
+ then echo 1; else echo 0; fi`],
+ [Define 0/1 if your assembler supports .cfi_sections.])
+
# GAS versions up to and including 2.11.0 may mis-optimize
# .eh_frame data.
gcc_GAS_CHECK_FEATURE(eh_frame optimization, gcc_cv_as_eh_frame,
i[34567]86-*-* | x86_64-*-*)
changequote([,])dnl
case $target_os in
+ cygwin*)
+ # Full C++ conformance when using a shared libstdc++-v3 requires some
+ # support from the Cygwin DLL, which in more recent versions exports
+ # wrappers to aid in interposing and redirecting operators new, delete,
+ # etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
+ # are configuring for a version of Cygwin that exports the wrappers.
+ if test x$host = x$target; then
+ AC_CHECK_FUNC([__wrap__Znaj],[gcc_ac_cygwin_dll_wrappers=yes],[gcc_ac_cygwin_dll_wrappers=no])
+ else
+ # Can't check presence of libc functions during cross-compile, so
+ # we just have to assume we're building for an up-to-date target.
+ gcc_ac_cygwin_dll_wrappers=yes
+ fi
+ AC_DEFINE_UNQUOTED(USE_CYGWIN_LIBSTDCXX_WRAPPERS,
+ [`if test $gcc_ac_cygwin_dll_wrappers = yes; then echo 1; else echo 0; fi`],
+ [Define if you want to generate code by default that assumes that the
+ Cygwin DLL exports wrappers to support libstdc++ function replacement.])
+ esac
+ case $target_os in
cygwin* | pe | mingw32*)
# Recent binutils allows the three-operand form of ".comm" on PE. This
# definition is used unconditionally to initialise the default state of
[AC_DEFINE(HAVE_AS_IX86_SAHF, 1,
[Define if your assembler supports the sahf mnemonic.])])
+ gcc_GAS_CHECK_FEATURE([swap suffix],
+ gcc_cv_as_ix86_swap,,,
+ [movl.s %esp, %ebp],,
+ [AC_DEFINE(HAVE_AS_IX86_SWAP, 1,
+ [Define if your assembler supports the swap suffix.])])
+
gcc_GAS_CHECK_FEATURE([different section symbol subtraction],
gcc_cv_as_ix86_diff_sect_delta,,,
[.section .rodata
[AC_DEFINE(HAVE_AS_LWSYNC, 1,
[Define if your assembler supports LWSYNC instructions.])])
+ case $target in
+ *-*-aix*) conftest_s=' .machine "476"
+ .csect .text[[PR]]
+ dci 0';;
+ *) conftest_s=' .machine "476"
+ .text
+ dci 0';;
+ esac
+
+ gcc_GAS_CHECK_FEATURE([data cache invalidate support],
+ gcc_cv_as_powerpc_dci, [9,99,0], -a32,
+ [$conftest_s],,
+ [AC_DEFINE(HAVE_AS_DCI, 1,
+ [Define if your assembler supports the DCI/ICI instructions.])])
+
gcc_GAS_CHECK_FEATURE([.gnu_attribute support],
gcc_cv_as_powerpc_gnu_attribute, [2,18,0],,
[.gnu_attribute 4,1],,
fi
fi
AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
+
+ AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
+ [gcc_cv_ld_mips_personality_relaxation],
+ [gcc_cv_ld_mips_personality_relaxation=no
+ if test $in_tree_ld = yes ; then
+ if test "$gcc_cv_gld_major_version" -eq 2 \
+ -a "$gcc_cv_gld_minor_version" -ge 21 \
+ -o "$gcc_cv_gld_major_version" -gt 2; then
+ gcc_cv_ld_mips_personality_relaxation=yes
+ fi
+ elif test x$gcc_cv_as != x \
+ -a x$gcc_cv_ld != x \
+ -a x$gcc_cv_readelf != x ; then
+ cat > conftest.s <<EOF
+ .cfi_startproc
+ .cfi_personality 0x80,indirect_ptr
+ .ent test
+test:
+ nop
+ .end test
+ .cfi_endproc
+
+ .section .data,"aw",@progbits
+indirect_ptr:
+ .dc.a personality
+EOF
+ if $gcc_cv_as -KPIC -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o -shared > /dev/null 2>&1; then
+ if $gcc_cv_readelf -d conftest 2>&1 \
+ | grep TEXTREL > /dev/null 2>&1; then
+ :
+ elif $gcc_cv_readelf --relocs conftest 2>&1 \
+ | grep 'R_MIPS_REL32 *$' > /dev/null 2>&1; then
+ :
+ else
+ gcc_cv_ld_mips_personality_relaxation=yes
+ fi
+ fi
+ fi
+ rm -f conftest.s conftest.o conftest])
+ if test x$gcc_cv_ld_mips_personality_relaxation = xyes; then
+ AC_DEFINE(HAVE_LD_PERSONALITY_RELAXATION, 1,
+ [Define if your linker can relax absolute .eh_frame personality
+pointers into PC-relative form.])
+ fi
;;
esac
all_compilers="$all_compilers $compilers"
all_outputs="$all_outputs $outputs"
all_gtfiles="$all_gtfiles [[$subdir]] $gtfiles"
+ case ",$enable_languages," in
+ *,lto,*)
+ AC_DEFINE(ENABLE_LTO, 1, [Define to enable LTO support.])
+ enable_lto=yes
+ AC_SUBST(enable_lto)
+ ;;
+ *) ;;
+ esac
done
# Pick up gtfiles for c
AC_ARG_VAR(GMPLIBS,[How to link GMP])
AC_ARG_VAR(GMPINC,[How to find GMP include files])
-case "${GMPLIBS}" in
- *-lmpc*) AC_DEFINE(HAVE_mpc, 1, [Define if mpc is in use.]) ;;
-esac
-
AC_ARG_VAR(PPLLIBS,[How to link PPL])
AC_ARG_VAR(PPLINC,[How to find PPL include files])
AC_DEFINE(HAVE_cloog, 1, [Define if cloog is in use.])
fi
+AC_ARG_VAR(LIBELFLIBS,[How to link libelf])
+AC_ARG_VAR(LIBELFINC,[How to find libelf include files])
+if test "x${LIBELFLIBS}" != "x" ; then
+ AC_DEFINE(HAVE_libelf, 1, [Define if libelf is in use.])
+fi
+
# Check for plugin support
AC_ARG_ENABLE(plugin,
[ --enable-plugin enable plugin support],
fi
# Check -ldl
- LDFLAGS="$LDFLAGS -ldl"
- AC_MSG_CHECKING([for -ldl])
- AC_TRY_LINK(
- [#include <dlfcn.h>],
- [volatile int f = 0; if (f) dlopen ("dummy", 0);],
- [AC_MSG_RESULT([yes]); have_dl=yes],
- [AC_MSG_RESULT([no])])
- if test x"$have_dl" = x"yes"; then
+ AC_SEARCH_LIBS([dlopen], [dl])
+ if test x"$ac_cv_search_dlopen" = x"-ldl"; then
pluginlibs="$pluginlibs -ldl"
fi
[extern int X;],[return X == 0;],
[AC_MSG_RESULT([yes]); have_pic_shared=yes],
[AC_MSG_RESULT([no]); have_pic_shared=no])
- if test x"$have_pic_shared" != x"yes"; then
+ if test x"$have_pic_shared" != x"yes" -o x"$ac_cv_search_dlopen" = x"no"; then
pluginlibs=
enable_plugin=no
fi