Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 May 2002 09:57:56 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 11127 for review
Message-ID:  <200205101657.g4AGvu851969@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11127

Change 11127 by peter@peter_ia64 on 2002/05/10 09:56:57

	This is a bit brutal, but the current Makefile doesn't actually assemble
	the lib1asmfucs stuff.  Most of this is moving around so that the
	.if defined(FOO) stuff could see the definitions.  Unfortunately, bmake
	is very order sensitive for macros.  _exit and __main are still empty,
	as are some of the fix* entries.

Affected files ...

... //depot/projects/ia64/gnu/lib/libgcc/Makefile#5 edit

Differences ...

==== //depot/projects/ia64/gnu/lib/libgcc/Makefile#5 (text+ko) ====

@@ -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 <bsd.lib.mk>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205101657.g4AGvu851969>