Index: gnu/lib/csu/Makefile =========================================================================== --- gnu/lib/csu/Makefile 2002/05/15 12:50:01 #4 +++ gnu/lib/csu/Makefile 2002/05/15 12:50:01 @@ -6,7 +6,13 @@ CCDIR= ${.CURDIR}/../../usr.bin/cc .include "${CCDIR}/Makefile.tgt" +.PATH: ${GCCDIR}/config/${GCC_CPU} + +.if ${TARGET_ARCH} == "ia64" +SRCS= crtbegin.asm crtend.asm +.else SRCS= crtstuff.c tconfig.h +.endif OBJS= crtbegin.o crtend.o SOBJS= crtbegin.So crtend.So CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR @@ -19,7 +25,6 @@ NOLIB= true .if ${TARGET_ARCH} == "sparc64" -.PATH: ${GCCDIR}/config/${GCC_CPU} TGTOBJS= crtfastmath.o SRCS+= crtfastmath.c .endif @@ -28,7 +33,26 @@ crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS} +.if ${TARGET_ARCH} == "ia64" +depend: + crtbegin.o: + ${CC} -x assembler-with-cpp \ + -c -o ${.TARGET} ${.ALLSRC:M*crtbegin*} + +crtbegin.So: + ${CC} -x assembler-with-cpp -DSHARED \ + -c -o ${.TARGET} ${.ALLSRC:M*crtbegin*} + +crtend.o: + ${CC} -x assembler-with-cpp \ + -c -o ${.TARGET} ${.ALLSRC:M*crtend*} + +crtend.So: + ${CC} -x assembler-with-cpp -DSHARED \ + -c -o ${.TARGET} ${.ALLSRC:M*crtend*} +.else +crtbegin.o: ${CC} ${CFLAGS} -g0 -DCRT_BEGIN \ -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} @@ -43,6 +67,7 @@ crtend.So: ${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \ -c -o ${.TARGET} ${.ALLSRC:M*crtstuff*} +.endif CLEANFILES= tconfig.h tconfig.h: ${CCDIR}/cc_tools/Makefile Index: gnu/lib/libgcc/Makefile =========================================================================== --- gnu/lib/libgcc/Makefile 2002/05/15 12:50:01 #5 +++ gnu/lib/libgcc/Makefile 2002/05/15 12:50:01 @@ -43,35 +43,8 @@ CFLAGS+= -I${.CURDIR}/../../usr.bin/cc/cc_tools \ -I${GCCDIR}/config -I${GCCDIR} -I. LDFLAGS= -nostdlib - -# Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are -# defined as optimized assembly code in LIB1ASMFUNCS. -.if defined(LIB1ASMFUNCS) -.for sym in ${LIB1ASMFUNCS} -LIB2FUNCS_1= ${LIB2FUNCS_1:S/${sym}//g} -LIB2FUNCS_2= ${LIB2FUNCS_2:S/${sym}//g} -LIB2_DIVMOD_FUNCS= ${LIB2_DIVMOD_FUNCS:S/${sym}//g} -.endfor -.endif - -SYMS= ${LIB1ASMFUNCS} \ - ${LIB2FUNCS_1} \ - ${LIB2FUNCS_2} \ - ${LIB2_DIVMOD_FUNCS} -.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" -SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} -.endif -SYMS_ST= ${LIB2FUNCS_ST} \ - ${LIB2ADD_ST} -OBJS_T= ${SYMS:S/$/.o/} ${SYMS_ST:S/$/.o/} -OBJS_P= ${SYMS:S/$/.po/} ${SYMS_ST:S/$/.po/} -OBJS_S= ${SYMS:S/$/.So/} -OBJS= ${SYMS:S/$/.o/} -STATICOBJS= ${SYMS_ST:S/$/.o/} -SRCS= ${LIB2ADD} ${LIB2ADDEH} +OBJS= - - #--------------------------------------------------------------------------- # # When upgrading GCC, get the following defintions straight from Makefile.in @@ -161,6 +134,39 @@ OBJS+= dp-bit.o fp-bit.o .endif +# Remove any objects from LIB2FUNCS and LIB2_DIVMOD_FUNCS that are +# defined as optimized assembly code in LIB1ASMFUNCS. +.if defined(LIB1ASMFUNCS) +.for sym in ${LIB1ASMFUNCS} +LIB2FUNCS_1:= ${LIB2FUNCS_1:S/${sym}//g} +LIB2FUNCS_2:= ${LIB2FUNCS_2:S/${sym}//g} +LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS:S/${sym}//g} +.endfor +.endif + +#----------------------------------------------------------------------- + +SYMS= ${LIB2FUNCS_1} \ + ${LIB2FUNCS_2} \ + ${LIB2_DIVMOD_FUNCS} +.if ${TARGET_ARCH} == "arm" || ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "sparc64" +SYMS+= ${FPBIT_FUNCS} ${DPBIT_FUNCS} +.endif +SYMS_ST= ${LIB2FUNCS_ST} \ + ${LIB2ADD_ST} +OBJS_T= ${SYMS:S/$/.o/} ${SYMS_ST:S/$/.o/} +OBJS_P= ${SYMS:S/$/.po/} ${SYMS_ST:S/$/.po/} +OBJS_S= ${SYMS:S/$/.So/} +ASM_T= ${LIB1ASMFUNCS:S/$/.o/} +ASM_P= ${LIB1ASMFUNCS:S/$/.po/} +ASM_S= ${LIB1ASMFUNCS:S/$/.So/} +OBJS+= ${SYMS:S/$/.o/} ${LIB1ASMFUNCS:S/$/.o/} +STATICOBJS= ${SYMS_ST:S/$/.o/} +SRCS= ${LIB2ADD} ${LIB2ADDEH} + + +#----------------------------------------------------------------------- + dp-bit.o: config/fp-bit.c ${XCC} -c ${CFLAGS} -o ${.TARGET} ${.ALLSRC:M*fp-bit*} @@ -209,4 +215,25 @@ @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 Index: gnu/usr.bin/cc/cc_tools/Makefile =========================================================================== --- gnu/usr.bin/cc/cc_tools/Makefile 2002/05/15 12:50:01 #9 +++ gnu/usr.bin/cc/cc_tools/Makefile 2002/05/15 12:50:01 @@ -142,6 +142,7 @@ echo 'union tree_node;' >> ${.TARGET} echo 'typedef union tree_node *tree;' >> ${.TARGET} echo '' >> ${.TARGET} + echo '#define TARGET_CPU_DEFAULT (MASK_GNU_AS|MASK_GNU_LD)' >> ${.TARGET} echo '#include "ansidecl.h"' >> ${.TARGET} echo '#include "${GCC_CPU}/${GCC_CPU}.h"' >> ${.TARGET} .if ${TARGET_ARCH} == "i386"