<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>There seems to be a bunch of code for making
certain that gcc still works even if --enable-gcc isn't used, so I'm assuming
that it's at least supposed to be a supported configuration, and hence this
issue that I found should probably be looked at:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you compile llvm-gcc-4.2 _without_ --enable-gcc,
and then try to compile the following program, you get a rather nasty RTL
error.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> void f() { try { throw; } catch
(...) {} }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> test.cpp: In function .void
f().:<BR> test.cpp:1: error: unrecognizable
insn:<BR> (insn 39 5 40 2 (set (reg:SI
107)<BR>
(UnKnown Unknown)) -1 (nil)<BR>
(nil))<BR> test.cpp:1: internal compiler error: in
extract_insn, at recog.c:2100</FONT><FONT face=Arial size=2></DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=Arial size=2>I managed to track this down to init_one_libfunc
being broken. There's some logic to try to divert an llvm_init_one_libfunc to
the old implementation (via some #defines) when --emnable-llvm isn't being used,
but it doesn't even have the right return type anymore and only seems to do half
the old logic (the rest being in llvm_init_one_libfunnc now).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've managed to fix it pretty easily with the
following hack, but it really does feel like a hack:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>diff --git a/gcc/expr.h b/gcc/expr.h<BR>index
850e7af..265b550 100644<BR>--- a/gcc/expr.h<BR>+++ b/gcc/expr.h<BR>@@ -753,9
+753,6 @@ extern rtx init_one_libfunc (const char *);<BR> /* LLVM LOCAL
begin */<BR> /* Call this to initialize an optab function tree.
*/<BR> extern tree llvm_init_one_libfunc (const char *);<BR>-#ifndef
ENABLE_LLVM<BR>-#define llvm_init_one_libfunc
init_one_libfunc<BR>-#endif<BR> /* LLVM LOCAL end */</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> extern int vector_mode_valid_p (enum
machine_mode);<BR>diff --git a/gcc/optabs.c b/gcc/optabs.c<BR>index
06243c9..d5a1b19 100644<BR>--- a/gcc/optabs.c<BR>+++ b/gcc/optabs.c<BR>@@
-5137,7 +5137,6 @@ init_intraclass_conv_libfuncs (convert_optab tab, const char
*opname,</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR> /* LLVM local begin */<BR>-#undef
llvm_init_one_libfunc<BR> tree<BR> llvm_init_one_libfunc (const char
*name)<BR> {</DIV>
<DIV> </DIV>
<DIV></FONT><FONT face=Arial size=2><FONT face=Arial
size=2>Sincerely,</FONT></DIV>
<DIV>
<DIV><FONT face=Arial size=2>Jay Freeman (saurik)</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><A
href="mailto:saurik@saurik.com">saurik@saurik.com</A></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><A
href="http://www.saurik.com/">http://www.saurik.com/</A></FONT></FONT></DIV></DIV></FONT></BODY></HTML>