diff options
Diffstat (limited to 'contrib/gcc/configure.ac')
-rw-r--r-- | contrib/gcc/configure.ac | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/contrib/gcc/configure.ac b/contrib/gcc/configure.ac index 0aadf4ef3a8c..37f2dee5dbe9 100644 --- a/contrib/gcc/configure.ac +++ b/contrib/gcc/configure.ac @@ -979,20 +979,10 @@ AC_ARG_ENABLE(sjlj-exceptions, AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj, [Define 0/1 to force the choice for exception handling model.])]) -if test x$host = x$target; then - AC_CHECK_LIB(unwind, main, use_libunwind_default=yes, use_libunwind_default=no) -else - use_libunwind_default=no -fi -# Use libunwind based exception handling. -AC_ARG_ENABLE(libunwind-exceptions, -[ --enable-libunwind-exceptions force use libunwind for exceptions], -use_libunwind_exceptions=$enableval, -use_libunwind_exceptions=$use_libunwind_default) -if test x"$use_libunwind_exceptions" = xyes; then - AC_DEFINE(USE_LIBUNWIND_EXCEPTIONS, 1, - [Define if gcc should use -lunwind.]) -fi +# For platforms with the unwind ABI which includes an unwind library, +# libunwind, we can choose to use the system libunwind. +AC_ARG_WITH(system-libunwind, +[ --with-system-libunwind use installed libunwind]) # -------------------------------------------------------- # Build, host, and target specific configuration fragments @@ -1865,6 +1855,12 @@ gcc_GAS_CHECK_FEATURE([.weak], gcc_cv_as_weak, [ .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 @@ -2407,7 +2403,7 @@ foo: [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().])]) @@ -2627,6 +2623,25 @@ if test x"$gcc_cv_ld_pie" = xyes; then fi AC_MSG_RESULT($gcc_cv_ld_pie) +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) + case "$target" in *-*-linux*) AC_CACHE_CHECK(linker --as-needed support, @@ -3100,6 +3115,9 @@ AC_SUBST(target_cpu_default) AC_SUBST_FILE(language_hooks) +sinclude(../config/gcc-lib-path.m4) +TL_AC_GNU_MAKE_GCC_LIB_PATH + # If it doesn't already exist, create document directory echo "checking for the document directory." 1>&2 if test -d doc ; then |