aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2012-05-07 11:07:31 +0000
committerRainer Orth <ro@gcc.gnu.org>2012-05-07 11:07:31 +0000
commitfe551ce4b1ca15430d74f308aa81f059d0f33d31 (patch)
tree1e33c591d014afe77c80059f2cab97605f3e4db5 /gcc/config
parent1e3733905bf2731e15d9792c7fa284f0eb5ca924 (diff)
downloadgcc-fe551ce4b1ca15430d74f308aa81f059d0f33d31.zip
gcc-fe551ce4b1ca15430d74f308aa81f059d0f33d31.tar.gz
gcc-fe551ce4b1ca15430d74f308aa81f059d0f33d31.tar.bz2
Don't use DWARF 4 on Solaris
* config/sol2.c (solaris_override_options): New function. * config/sol2-protos.h (solaris_override_options): Declare. * config/sol2.h (SUBTARGET_OVERRIDE_OPTIONS): Define. From-SVN: r187230
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/sol2-protos.h3
-rw-r--r--gcc/config/sol2.c12
-rw-r--r--gcc/config/sol2.h6
3 files changed, 19 insertions, 2 deletions
diff --git a/gcc/config/sol2-protos.h b/gcc/config/sol2-protos.h
index 9f31ce3..3d24e92 100644
--- a/gcc/config/sol2-protos.h
+++ b/gcc/config/sol2-protos.h
@@ -1,6 +1,6 @@
/* Operating system specific prototypes to be used when targeting GCC for any
Solaris 2 system.
- Copyright 2004, 2007, 2010, 2011 Free Software Foundation, Inc.
+ Copyright 2004, 2007, 2010, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -24,6 +24,7 @@ extern void solaris_elf_asm_comdat_section (const char *, unsigned int, tree);
extern void solaris_file_end (void);
extern void solaris_insert_attributes (tree, tree *);
extern void solaris_output_init_fini (FILE *, tree);
+extern void solaris_override_options (void);
/* In sol2-c.c. */
extern void solaris_register_pragmas (void);
diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c
index b1f0196..b15b895 100644
--- a/gcc/config/sol2.c
+++ b/gcc/config/sol2.c
@@ -1,5 +1,6 @@
/* General Solaris system support.
- Copyright (C) 2004, 2005 , 2007, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 , 2007, 2010, 2011, 2012
+ Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GCC.
@@ -282,3 +283,12 @@ solaris_file_end (void)
htab_traverse (solaris_comdat_htab, solaris_define_comdat_signature, NULL);
}
+
+void
+solaris_override_options (void)
+{
+ /* Don't emit DWARF3/4 unless specifically selected. Solaris ld cannot
+ handle CIE version 3 in .eh_frame. */
+ if (!global_options_set.x_dwarf_version)
+ dwarf_version = 2;
+}
diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
index 670dbaa..4cbb308 100644
--- a/gcc/config/sol2.h
+++ b/gcc/config/sol2.h
@@ -99,6 +99,12 @@ along with GCC; see the file COPYING3. If not see
TARGET_SUB_OS_CPP_BUILTINS(); \
} while (0)
+#define SUBTARGET_OVERRIDE_OPTIONS \
+ do { \
+ solaris_override_options (); \
+ } while (0)
+
+
/* It's safe to pass -s always, even if -g is not used. Those options are
handled by both Sun as and GNU as. */
#define ASM_SPEC_BASE \