This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] fix lto1/rs6000.c interaction
- From: Nathan Froyd <froydnj at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 29 Dec 2007 12:15:24 -0800
- Subject: [lto] fix lto1/rs6000.c interaction
The patch below fixes two problems using LTO on powerpc platforms. The
powerpc backend wants to push identifiers for types, which goes badly if
lto_pushdecl aborts. Additionally, the powerpc backend wants to look at
the name of the language frontend for encoding traceback tables and LTO
did not previously declare its name. The current name is not ideal, but
it is an accurate reflection of our capabilities at the present time.
Committed to the LTO branch.
-Nathan
2007-12-29 Nathan Froyd <froydnj@codesourcery.com>
* lto-lang.c (lto_pushdecl): Do nothing instead of aborting.
(LANG_HOOKS_NAME): Define.
Index: gcc/lto/lto-lang.c
===================================================================
--- gcc/lto/lto-lang.c (revision 131213)
+++ gcc/lto/lto-lang.c (working copy)
@@ -424,7 +424,9 @@ lto_set_decl_assembler_name (tree decl)
static tree
lto_pushdecl (tree t ATTRIBUTE_UNUSED)
{
- gcc_unreachable ();
+ /* Do nothing, since we get all information from DWARF and LTO
+ sections. */
+ return NULL_TREE;
}
static tree
@@ -573,6 +575,10 @@ lto_init (void)
return true;
}
+/* rs6000.c wants to look at this and we really only do C for the time
+ being. */
+#undef LANG_HOOKS_NAME
+#define LANG_HOOKS_NAME "GNU C"
#define LANG_HOOKS_MARK_ADDRESSABLE lto_mark_addressable
#define LANG_HOOKS_TYPE_FOR_MODE lto_type_for_mode
#define LANG_HOOKS_TYPE_FOR_SIZE lto_type_for_size