From 585d4a8062519831fc8bc33fb0c7134b87ca94b2 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 12 Nov 2010 15:52:27 +0000 Subject: [PATCH] Revert to libgcc for sparc64. I've had a report of a sparc64 system where cc1 generates illegal instructions. We still have to diagnose this properly, but instead of hosing all sparc64 boxes out there, fall back to libgcc to prevent more damage. Reported by: Florian Smeets --- gnu/lib/libgcc/Makefile | 4 ++++ lib/libcompiler_rt/Makefile | 8 +++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index 2021c8c737cc..73fb1bebc89f 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -15,6 +15,10 @@ MK_SSP= no .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" +.if ${TARGET_CPUARCH} == "sparc64" +LIB= gcc +.endif + .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR} CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ diff --git a/lib/libcompiler_rt/Makefile b/lib/libcompiler_rt/Makefile index 2da28aa9e675..103bb8ca504d 100644 --- a/lib/libcompiler_rt/Makefile +++ b/lib/libcompiler_rt/Makefile @@ -147,11 +147,13 @@ SRCS+= ${file}.c . endif .endfor -.if ${MK_INSTALLLIB} != "no" +.if ${MACHINE_CPUARCH} != "sparc64" +. if ${MK_INSTALLLIB} != "no" SYMLINKS+=libcompiler_rt.a ${LIBDIR}/libgcc.a -.endif -.if ${MK_PROFILE} != "no" +. endif +. if ${MK_PROFILE} != "no" SYMLINKS+=libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a +. endif .endif .include