]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Don't use DWARF 4 on Solaris
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 7 May 2012 11:07:31 +0000 (11:07 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 7 May 2012 11:07:31 +0000 (11:07 +0000)
* 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

gcc/ChangeLog
gcc/config/sol2-protos.h
gcc/config/sol2.c
gcc/config/sol2.h

index 63179624942e982bc6e1bae92ed7394a2c5bead1..089dd9c8b35e4b4cb0b1017e5642299f37c634be 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * config/sol2.c (solaris_override_options): New function.
+       * config/sol2-protos.h (solaris_override_options): Declare.
+       * config/sol2.h (SUBTARGET_OVERRIDE_OPTIONS): Define.
+
 2012-05-07  Richard Guenther  <rguenther@suse.de>
 
        * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Return
index 9f31ce34aff39004be7fb7e1e22320a27f533965..3d24e9271d8028812a0d1251acda4fc5ef6174d5 100644 (file)
@@ -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);
index b1f0196e7b507d3bb153250d5d8d248da7507200..b15b895c70feb191412ffe1ad406f02ae3dd1e9e 100644 (file)
@@ -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;
+}
index 670dbaa782fd24ba860a9646260618a336bf3f9d..4cbb3081b3a327c60a08c35ea33f52ae99188065 100644 (file)
@@ -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 \