From 82807c2121870bd2458a29037c5518b2bc90007c Mon Sep 17 00:00:00 2001 From: Duncan Coutts Date: Tue, 16 May 2006 09:04:30 +0000 Subject: [PATCH] Let GHCi work with with Sparc32+/V8+ .o files Currently the GHCi linker looks exclusively for V7 ABI .o files. You can generate V8+ ABI .o files using flags to gcc such as: -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc Note that this allows gcc to generate hardware integer division and hardware floating point instructions rather than using software emulation. All recent sparc hardware is V8+ or later. Perhaps we should check for the cpu generation in configure and use the later ABI if possible. Tested briefly on a SunBlade 100 (TI UltraSparc IIe) sparc-unknown-linux --- rts/Linker.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rts/Linker.c b/rts/Linker.c index e1be5e6..4aca397 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -2908,6 +2908,9 @@ ocVerifyImage_ELF ( ObjectCode* oc ) IF_DEBUG(linker,debugBelch( "Architecture is " )); switch (ehdr->e_machine) { case EM_386: IF_DEBUG(linker,debugBelch( "x86" )); break; +#ifdef EM_SPARC32PLUS + case EM_SPARC32PLUS: +#endif case EM_SPARC: IF_DEBUG(linker,debugBelch( "sparc" )); break; #ifdef EM_IA_64 case EM_IA_64: IF_DEBUG(linker,debugBelch( "ia64" )); break; -- 1.7.10.4