aboutsummaryrefslogtreecommitdiff
path: root/libgcc/configure.ac
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-02-28 09:59:15 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-02-28 09:59:15 +0100
commitce579a4fe084bb4aea2b677592e114639d9afc07 (patch)
treeee17476149a90f9a012107fe31e62bdcb32f4996 /libgcc/configure.ac
parent678127a85e78a86d680e33b208e1571dc2dc045f (diff)
downloadgcc-ce579a4fe084bb4aea2b677592e114639d9afc07.zip
gcc-ce579a4fe084bb4aea2b677592e114639d9afc07.tar.gz
gcc-ce579a4fe084bb4aea2b677592e114639d9afc07.tar.bz2
re PR debug/83917 (with -mcall-ms2sysv-xlogues, stepping into x86 tail-call restore stub gives bad backtrace)
PR debug/83917 * configure.ac (AS_HIDDEN_DIRECTIVE): AC_DEFINE_UNQUOTED this to $asm_hidden_op if visibility ("hidden") attribute works. (HAVE_AS_CFI_SECTIONS): New AC_DEFINE. * config/i386/i386-asm.h: Don't include auto-host.h. (PACKAGE_VERSION, PACKAGE_NAME, PACKAGE_STRING, PACKAGE_TARNAME, PACKAGE_URL): Don't undefine. (USE_GAS_CFI_DIRECTIVES): Don't use nor define this macro, instead guard cfi_startproc only on ifdef __GCC_HAVE_DWARF2_CFI_ASM. (FN_HIDDEN): Change guard from #ifdef HAVE_GAS_HIDDEN to #ifdef AS_HIDDEN_DIRECTIVE, use AS_HIDDEN_DIRECTIVE macro in the definition instead of hardcoded .hidden. * config/i386/cygwin.S: Include i386-asm.h first before .cfi_sections directive. Use #ifdef HAVE_AS_CFI_SECTIONS rather than #ifdef HAVE_GAS_CFI_SECTIONS_DIRECTIVE to guard .cfi_sections. (USE_GAS_CFI_DIRECTIVES): Don't define. * configure: Regenerated. * config.in: Likewise. From-SVN: r258057
Diffstat (limited to 'libgcc/configure.ac')
-rw-r--r--libgcc/configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 6e76a68..b59aa74 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -486,11 +486,29 @@ AC_CACHE_CHECK([for __attribute__((visibility("hidden")))],
if test $libgcc_cv_hidden_visibility_attribute = yes; then
vis_hide='-fvisibility=hidden -DHIDE_EXPORTS'
+ AC_DEFINE_UNQUOTED(AS_HIDDEN_DIRECTIVE, $asm_hidden_op, [Define to the .hidden-like directive if it exists.])
else
vis_hide=
fi
AC_SUBST(vis_hide)
+# Check for .cfi_sections .debug_frame support.
+AC_CACHE_CHECK([for .cfi_sections .debug_frame],
+ libgcc_cv_cfi_sections_directive, [
+ echo 'int foo (int, char *);' > conftest.c
+ echo 'int bar (int x) { char *y = __builtin_alloca (x); return foo (x + 1, y) + 1; }' >> conftest.c
+ libgcc_cv_cfi_sections_directive=no
+ if AC_TRY_COMMAND(${CC-cc} -Werror -g -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-exceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ if grep "\\.cfi_sections.*\\.debug_frame" conftest.s >/dev/null; then
+ libgcc_cv_cfi_sections_directive=yes
+ fi
+ fi
+ rm -f conftest.*
+ ])
+if test $libgcc_cv_cfi_sections_directive = yes; then
+ AC_DEFINE(HAVE_AS_CFI_SECTIONS, 1, [Define to 1 if the assembler supports .cfi_sections .debug_frame directive.])
+fi
+
# See if we have thread-local storage. We can only test assembler
# since link-time and run-time tests require the newly built
# gcc, which can't be used to build executable due to that libgcc