Hi Sebastien,
Currently the lm32-elf target fails to configure libgcc because of a
seg-fault whilst running the configuration checks:
configure:3794: lm32-elf/gcc/xgcc [...] conftest.c
xgcc: internal compiler error: Segmentation fault (program cc1)
GCC goes into an infinite loop trying to generate a valid return
instruction. The problem is the epilogue and return patterns are
misnamed. The return is really a simple_return and the epilogue is
really the (complex) return. Thus the patch below fixes the problem
and allows the libgcc library to be configured and built.
OK to apply ?
Cheers
Nick
gcc/ChangeLog
2012-08-17 Nick Clifton <[email protected]>
* config/lm32/lm32.md (return): Rename to simple_return.
(epilogue): Rename to return.
Index: gcc/config/lm32/lm32.md
===================================================================
--- gcc/config/lm32/lm32.md (revision 190466)
+++ gcc/config/lm32/lm32.md (working copy)
@@ -636,13 +636,14 @@
[(set_attr "type" "uibranch")]
)
-(define_insn "return"
- [(return)]
+(define_insn "simple_return"
+ [(simple_return)]
"lm32_can_use_return ()"
"ret"
[(set_attr "type" "uibranch")]
)
@@ -961,7 +962,7 @@
DONE;
}")
-(define_expand "epilogue"
+(define_expand "return"
[(return)]
""
"