diff options
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/Makefile.in | 2 | ||||
-rwxr-xr-x | libgcc/configure | 26 | ||||
-rw-r--r-- | libgcc/configure.ac | 13 |
3 files changed, 40 insertions, 1 deletions
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in index d8163c5..3f77283 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -434,7 +434,7 @@ LIB2ADD += enable-execute-stack.c LIB2ADD += $(srcdir)/hardcfr.c # Stack scrubbing infrastructure. -LIB2ADD += $(srcdir)/strub.c +@HAVE_STRUB_SUPPORT@LIB2ADD += $(srcdir)/strub.c # While emutls.c has nothing to do with EH, it is in LIB2ADDEH* # instead of LIB2ADD because that's the way to be sure on some targets diff --git a/libgcc/configure b/libgcc/configure index cf14920..5671589 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -593,6 +593,7 @@ asm_hidden_op extra_parts cpu_type get_gcc_base_ver +HAVE_STRUB_SUPPORT thread_header tm_defines tm_file @@ -5702,6 +5703,31 @@ esac +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strub support" >&5 +$as_echo_n "checking for strub support... " >&6; } +if ${libgcc_cv_strub_support+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +void __attribute__ ((__strub__)) fn (void) {} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + libgcc_cv_strub_support=yes +else + libgcc_cv_strub_support=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_strub_support" >&5 +$as_echo "$libgcc_cv_strub_support" >&6; } +if test "x$libgcc_cv_strub_support" != xno; then + HAVE_STRUB_SUPPORT= +else + HAVE_STRUB_SUPPORT='# ' +fi + + # Determine what GCC version number to use in filesystem paths. get_gcc_base_ver="cat" diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 2fc9d5d..9c0e415 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -694,6 +694,19 @@ AC_SUBST(tm_defines) # Map from thread model to thread header. GCC_AC_THREAD_HEADER([$target_thread_file]) +AC_CACHE_CHECK([for strub support], + [libgcc_cv_strub_support], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([void __attribute__ ((__strub__)) fn (void) {}])], + [libgcc_cv_strub_support=yes], + [libgcc_cv_strub_support=no])]) +if test "x$libgcc_cv_strub_support" != xno; then + HAVE_STRUB_SUPPORT= +else + HAVE_STRUB_SUPPORT='# ' +fi +AC_SUBST(HAVE_STRUB_SUPPORT) + # Determine what GCC version number to use in filesystem paths. GCC_BASE_VER |