In llvm-gcc 4.0, "rs6000_output_mi_thunk" in
gcc/config/rs6000/rs6000.c fails to compile unless TARGET_MACHO is
defined. The problem is this block of code:
/* This JMP is in a coalesced section, and Mach-O forbids us to
directly reference anything else in a coalesced section; if
our target gets coalesced away, the linker (static or
dynamic) won't know where to send our JMP. Ergo, force a
stub. */
label_decl = add_compiler_branch_island (function, line_number);
which isn't protected by an "#if TARGET_MACHO". I've been working around
the problem using the attached patch, which simply defines
"branch_island_list" whether TARGET_MACHO is attached or not. Is this
the correct fix?
Nick
Index: rs6000.c
===================================================================
--- rs6000.c (revision 43681)
+++ rs6000.c (working copy)
@@ -20088,11 +20088,11 @@
fatal_insn ("bad address", op);
}
-#if TARGET_MACHO
-
/* APPLE LOCAL mlongcall long names 4271187 */
static GTY (()) tree branch_island_list = 0;
+#if TARGET_MACHO
+
/* APPLE LOCAL begin 4380289 */
/* Remember to generate a branch island for far calls to the given
function. Force the creation of a Mach-O stub. */
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits