X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfigure.ac;h=1fcb87a2e2d1266e047ff63c66d26f3a0cc75b02;hb=4c33a6fa048f451ea01ff7414776320329ff1cfc;hp=79de6cd7964b7cd0277af606243ea8b693c3b03d;hpb=7bfefa9d2c82e804ef4e59772f4060ac325bf99a;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/configure.ac b/gcc/configure.ac index 79de6cd7964..1fcb87a2e2d 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to generate a configuration script. # Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. #This file is part of GCC. @@ -785,6 +785,14 @@ AC_SUBST(TARGET_SYSTEM_ROOT) 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], @@ -905,7 +913,7 @@ AC_CHECK_PROGS([BISON], bison, [$MISSING bison]) # NM if test x${build} = x${host} && test -f $srcdir/../binutils/nm.c \ && test -d ../binutils ; then - NM='$(objdir)/../binutils/nm-new' + NM='${objdir}/../binutils/nm-new' else AC_CHECK_PROG(NM, nm, nm, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing nm) fi @@ -913,7 +921,7 @@ fi # AR if test x${build} = x${host} && test -f $srcdir/../binutils/ar.c \ && test -d ../binutils ; then - AR='$(objdir)/../binutils/ar' + AR='${objdir}/../binutils/ar' else AC_CHECK_PROG(AR, ar, ar, ${CONFIG_SHELL-/bin/sh} ${srcdir}/../missing ar) fi @@ -1016,6 +1024,22 @@ AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \ gettimeofday mbstowcs wcswidth mmap mincore setlocale \ gcc_UNLOCKED_FUNCS) +save_CPPFLAGS="$CPPFLAGS" +save_LIBS="$LIBS" +LIBS="$LIBS $LIBELFLIBS" +AC_CHECK_FUNCS(elf_getshdrstrndx,, + [AC_CHECK_FUNCS(elf_getshstrndx, + [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include +#include +int main() +{ + return elf_getshstrndx (NULL, 0) == 0; +}]])], AC_DEFINE(HAVE_ELF_GETSHSTRNDX_GABI, 1, + [Define if elf_getshstrndx has gABI conformant return values.]))])] + ) +LIBS="$save_LIBS" +CPPFLAGS="$save_CPPFLAGS" + if test x$ac_cv_func_mbstowcs = xyes; then AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include @@ -1544,10 +1568,33 @@ AC_ARG_ENABLE(secureplt, [ --enable-secureplt enable -msecure-plt by default for PowerPC], [], []) +AC_ARG_ENABLE(leading-mingw64-underscores, + AS_HELP_STRING([--enable-leading-mingw64-underscores], + [Enable leading underscores on 64 bit mingw targets]), + [],[]) +AS_IF([ test x"$enable_leading_mingw64_underscores" = xyes ], + [AC_DEFINE(USE_MINGW64_LEADING_UNDERSCORES, 1, + [Define if we should use leading underscore on 64 bit mingw targets])]) + AC_ARG_ENABLE(cld, [ --enable-cld enable -mcld by default for 32bit x86], [], [enable_cld=no]) +AC_ARG_ENABLE(frame-pointer, +[ --enable-frame-pointer enable -fno-omit-frame-pointer by default for 32bit x86], [], +[ +case $target_os in +linux* | darwin[[8912]]*) + # Enable -fomit-frame-pointer by default for Linux and Darwin with + # DWARF2. + enable_frame_pointer=no + ;; +*) + enable_frame_pointer=yes + ;; +esac +]) + # Windows32 Registry support for specifying GCC installation paths. AC_ARG_ENABLE(win32-registry, [ --disable-win32-registry @@ -1611,7 +1658,7 @@ tmake_file="${tmake_file_}" out_object_file=`basename $out_file .c`.o tm_file_list="options.h" -tm_include_list="options.h" +tm_include_list="options.h insn-constants.h" for f in $tm_file; do case $f in ./* ) @@ -1915,6 +1962,28 @@ else 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]) + +# Check to see if we are using gold instead of ld +AC_MSG_CHECKING(whether we are using gold) +ld_is_gold=no +if test x$gcc_cv_ld != x; then + if $gcc_cv_ld --version 2>/dev/null | sed 1q \ + | grep "GNU gold" > /dev/null; then + ld_is_gold=yes + fi +fi +AC_MSG_RESULT($ld_is_gold) + ORIGINAL_LD_FOR_TARGET=$gcc_cv_ld AC_SUBST(ORIGINAL_LD_FOR_TARGET) case "$ORIGINAL_LD_FOR_TARGET" in @@ -2098,26 +2167,83 @@ gcc_GAS_CHECK_FEATURE([.nsubspa comdat], gcc_cv_as_nsubspa_comdat, gcc_GAS_CHECK_FEATURE([.hidden], gcc_cv_as_hidden, [elf,2,13,0],, [ .hidden foobar -foobar:]) +foobar:],[ +# Solaris 9/x86 as incorrectly emits an alias for a hidden symbol with +# STV_HIDDEN, so disable .hidden support if so. +case "${target}" in + i?86-*-solaris2*) + if test x$gcc_cv_as != x && test x$gcc_cv_objdump != x; then + cat > conftest.s <