From 01532a0d4b3569df9830752607c04c1ef04477e3 Mon Sep 17 00:00:00 2001 From: obrien Date: Sun, 12 May 2002 14:05:58 +0000 Subject: Properly build lb1spc.asm on Sparc64. --- gnu/lib/libgcc/Makefile | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'gnu/lib/libgcc') diff --git a/gnu/lib/libgcc/Makefile b/gnu/lib/libgcc/Makefile index a292d04..1edb26d 100644 --- a/gnu/lib/libgcc/Makefile +++ b/gnu/lib/libgcc/Makefile @@ -1,9 +1,9 @@ # $FreeBSD$ -TARGET_ARCH?= ${MACHINE_ARCH} +.include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" GCCDIR= ${.CURDIR}/../../../contrib/gcc -.PATH: ${GCCDIR}/config/${TARGET_ARCH} ${GCCDIR} +.PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR} # allow to be overridden for the a.out case .if !defined(LIB) || ${LIB} != "gcc_r" @@ -128,7 +128,7 @@ OBJS+= dp-bit.o fp-bit.o # from config/sparc/t-elf # We want fine grained libraries, so use the new code to build the # floating point emulation libraries. -LIB1ASMSRC = sparc/lb1spc.asm +LIB1ASMSRC = lb1spc.asm LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 OBJS+= dp-bit.o fp-bit.o .endif @@ -163,6 +163,10 @@ LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS:S/${sym}//g} .endfor .endif +ASM_T= ${LIB1ASMFUNCS:S/$/.o/} +ASM_P= ${LIB1ASMFUNCS:S/$/.po/} +ASM_S= ${LIB1ASMFUNCS:S/$/.So/} + SYMS= ${LIB1ASMFUNCS} \ ${LIB2FUNCS_1} \ ${LIB2FUNCS_2} \ @@ -207,4 +211,25 @@ ${OBJS_P}: libgcc2.c @mv ${.TARGET}.tmp ${.TARGET} .endif +.if defined(LIB1ASMSRC) +${ASM_T}: ${LIB1ASMSRC} + ${XCC} -x assembler-with-cpp -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/config/${LIB1ASMSRC} + @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} + +.if !defined(NOPIC) +${ASM_S}: ${LIB1ASMSRC} + ${XCC} -x assembler-with-cpp -c ${PICFLAG} ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/config/${LIB1ASMSRC} + @${LD} -o ${.TARGET}.tmp -x -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} +.endif + +.if !defined(NOPROFILE) +${ASM_P}: ${LIB1ASMSRC} + ${XCC} -x assembler-with-cpp -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/config/${TARGET_ARCH}/${LIB1ASMSRC} + @${LD} -o ${.TARGET}.tmp -X -r ${.TARGET} + @mv ${.TARGET}.tmp ${.TARGET} +.endif +.endif + .include -- cgit v1.1