aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2015-12-17 09:23:08 +0000
committerRainer Orth <ro@gcc.gnu.org>2015-12-17 09:23:08 +0000
commit01704e5ad985b1f79c2d02dc59ccf94d5af2c5da (patch)
tree386a71d903e0a9b7ad0c6b9afeabe836fa999010 /gcc/config
parent761f6ae919c2ae800acd23a8a99b50a71889e71d (diff)
downloadgcc-01704e5ad985b1f79c2d02dc59ccf94d5af2c5da.zip
gcc-01704e5ad985b1f79c2d02dc59ccf94d5af2c5da.tar.gz
gcc-01704e5ad985b1f79c2d02dc59ccf94d5af2c5da.tar.bz2
Only support -gstabs on Mac OS X if assember supports it (PR target/67973)
gcc: PR target/67973 * configure.ac (gcc_cv_as_stabs_directive): New test. * configure: Regenerate. * config.in: Regenerate. * config/darwin.h (DBX_DEBUGGING_INFO): Wrap in HAVE_AS_STABS_DIRECTIVE. (PREFERRED_DEBUGGING_TYPE): Likewise. * config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Only include DBX_DEBUG if HAVE_AS_STABS_DIRECTIVE. * doc/sourcebuild.texi (Effective-Target Keywords, Environment attributes): Document stabs. gcc/testsuite: PR target/67973 * lib/target-supports.exp (check_effective_target_stabs): New proc. * g++.dg/cpp0x/alias-decl-debug-0.C: Restrict to stabs targets. * g++.dg/other/PR23205.C: Likewise. * g++.dg/other/pr23205-2.C: Likewise. * gcc.dg/20040813-1.c: Likewise. * gcc.dg/darwin-20040809-2.c: Likewise. * objc.dg/stabs-1.m: Likewise. From-SVN: r231747
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/darwin.h7
-rw-r--r--gcc/config/i386/darwin.h4
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/config/darwin.h b/gcc/config/darwin.h
index 7d093c9..32d4c45 100644
--- a/gcc/config/darwin.h
+++ b/gcc/config/darwin.h
@@ -400,12 +400,13 @@ extern GTY(()) int darwin_ms_struct;
#define ASM_DEBUG_SPEC "%{g*:%{!g0:%{!gdwarf*:--gstabs}}}"
-/* We still allow output of STABS. */
-
+/* We still allow output of STABS if the assembler supports it. */
+#ifdef HAVE_AS_STABS_DIRECTIVE
#define DBX_DEBUGGING_INFO 1
+#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
+#endif
#define DWARF2_DEBUGGING_INFO 1
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
#define DEBUG_FRAME_SECTION "__DWARF,__debug_frame,regular,debug"
#define DEBUG_INFO_SECTION "__DWARF,__debug_info,regular,debug"
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index 2006a75..f295989 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -226,7 +226,11 @@ do { \
compiles default to stabs+. darwin9+ defaults to dwarf-2. */
#ifndef DARWIN_PREFER_DWARF
#undef PREFERRED_DEBUGGING_TYPE
+#ifdef HAVE_AS_STABS_DIRECTIVE
#define PREFERRED_DEBUGGING_TYPE (TARGET_64BIT ? DWARF2_DEBUG : DBX_DEBUG)
+#else
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+#endif
#endif
/* Darwin uses the standard DWARF register numbers but the default