Use a different hack for building libgcc2: `XCC= ${CC}' instead of
`XCC= <relative cc> -B<path to relative cc1> ...'. This is equivalent when cc and cc1, etc. have just been bootstrapped by `make world'. The relative versions normally won't work if the target system is not binary compatible. Bootstrapping different versions of gcc without going through `make world' is slightly more broken than before. Uniformized macro names (P1OBJS -> LIB1POBJS, etc.). Don't give full paths to sources.
This commit is contained in:
parent
64a965e707
commit
07b64a25d2
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.15 1997/02/22 15:45:08 peter Exp $
|
# $Id: Makefile,v 1.16 1998/03/23 12:23:13 bde Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
LIB= gcc
|
LIB= gcc
|
||||||
@ -14,29 +14,14 @@ INSTALL_PIC_ARCHIVE= yes
|
|||||||
#
|
#
|
||||||
# Normally, this does not make any difference, since we only have gcc, but
|
# Normally, this does not make any difference, since we only have gcc, but
|
||||||
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
|
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
|
||||||
# compiler for some of the libgcc2.c __attribute__ stuff. If there is no
|
# compiler for some of the libgcc2.c __attribute__ stuff.
|
||||||
# freshly built compiler in a relative obj directory, then `make world'
|
|
||||||
# must have recently installed it.
|
|
||||||
#
|
#
|
||||||
.if exists(${.OBJDIR}/../cc/cc)
|
# We now depend on a bootstrap pass (normally in `make world') to build
|
||||||
XCC= ${.OBJDIR}/../cc/cc
|
# and install the new version of gcc before we get here. This makes
|
||||||
.elif exists(${.CURDIR}/../cc/cc)
|
# finding the new version (XCC) easy but may break finding the old version
|
||||||
XCC= ${.CURDIR}/../cc/cc
|
# (CC).
|
||||||
.else
|
#
|
||||||
XCC= cc
|
XCC= ${CC}
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.OBJDIR}/../cc1/cc1)
|
|
||||||
XCC+= -B${.OBJDIR}/../cc1/
|
|
||||||
.elif exists(${.CURDIR}/../cc1/cc1)
|
|
||||||
XCC+= -B${.CURDIR}/../cc1/
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.OBJDIR}/../cpp/cpp)
|
|
||||||
XCC+= -B${.OBJDIR}/../cpp/
|
|
||||||
.elif exists(${.CURDIR}/../cpp/cpp)
|
|
||||||
XCC+= -B${.CURDIR}/../cpp/
|
|
||||||
.endif
|
|
||||||
|
|
||||||
# Members of libgcc1.a.
|
# Members of libgcc1.a.
|
||||||
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
|
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
|
||||||
@ -67,47 +52,44 @@ LIB1OBJS= ${LIB1FUNCS:S/$/.o/}
|
|||||||
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
|
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
|
||||||
LIB1SOBJS= ${LIB1FUNCS:S/$/.so/}
|
LIB1SOBJS= ${LIB1FUNCS:S/$/.so/}
|
||||||
LIB2SOBJS= ${LIB2FUNCS:S/$/.so/}
|
LIB2SOBJS= ${LIB2FUNCS:S/$/.so/}
|
||||||
P1OBJS= ${LIB1FUNCS:S/$/.po/}
|
LIB1POBJS= ${LIB1FUNCS:S/$/.po/}
|
||||||
P2OBJS= ${LIB2FUNCS:S/$/.po/}
|
LIB2POBJS= ${LIB2FUNCS:S/$/.po/}
|
||||||
|
|
||||||
OBJS= ${LIB1OBJS} ${LIB2OBJS}
|
OBJS= ${LIB1OBJS} ${LIB2OBJS}
|
||||||
|
|
||||||
config.h:
|
config.h tconfig.h:
|
||||||
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
|
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
|
||||||
|
|
||||||
tconfig.h:
|
|
||||||
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > tconfig.h
|
|
||||||
|
|
||||||
tm.h:
|
tm.h:
|
||||||
echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
|
echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
|
||||||
|
|
||||||
${OBJS}: ${COMMONHDRS}
|
${OBJS}: ${COMMONHDRS}
|
||||||
|
|
||||||
${LIB1OBJS}: libgcc1.c
|
${LIB1OBJS}: libgcc1.c
|
||||||
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
${LIB2OBJS}: libgcc2.c
|
${LIB2OBJS}: libgcc2.c
|
||||||
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
.if !defined(NOPIC)
|
.if !defined(NOPIC)
|
||||||
${LIB1SOBJS}: libgcc1.c
|
${LIB1SOBJS}: libgcc1.c
|
||||||
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
${LIB2SOBJS}: libgcc2.c
|
${LIB2SOBJS}: libgcc2.c
|
||||||
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !defined(NOPROFILE)
|
.if !defined(NOPROFILE)
|
||||||
${P1OBJS}: libgcc1.c
|
${LIB1POBJS}: libgcc1.c
|
||||||
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
||||||
|
|
||||||
${P2OBJS}: libgcc2.c
|
${LIB2POBJS}: libgcc2.c
|
||||||
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: Makefile,v 1.15 1997/02/22 15:45:08 peter Exp $
|
# $Id: Makefile,v 1.16 1998/03/23 12:23:13 bde Exp $
|
||||||
#
|
#
|
||||||
|
|
||||||
LIB= gcc
|
LIB= gcc
|
||||||
@ -14,29 +14,14 @@ INSTALL_PIC_ARCHIVE= yes
|
|||||||
#
|
#
|
||||||
# Normally, this does not make any difference, since we only have gcc, but
|
# Normally, this does not make any difference, since we only have gcc, but
|
||||||
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
|
# when bootstrapping from gcc-2.6.3, we have to use the freshly built 2.7.2
|
||||||
# compiler for some of the libgcc2.c __attribute__ stuff. If there is no
|
# compiler for some of the libgcc2.c __attribute__ stuff.
|
||||||
# freshly built compiler in a relative obj directory, then `make world'
|
|
||||||
# must have recently installed it.
|
|
||||||
#
|
#
|
||||||
.if exists(${.OBJDIR}/../cc/cc)
|
# We now depend on a bootstrap pass (normally in `make world') to build
|
||||||
XCC= ${.OBJDIR}/../cc/cc
|
# and install the new version of gcc before we get here. This makes
|
||||||
.elif exists(${.CURDIR}/../cc/cc)
|
# finding the new version (XCC) easy but may break finding the old version
|
||||||
XCC= ${.CURDIR}/../cc/cc
|
# (CC).
|
||||||
.else
|
#
|
||||||
XCC= cc
|
XCC= ${CC}
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.OBJDIR}/../cc1/cc1)
|
|
||||||
XCC+= -B${.OBJDIR}/../cc1/
|
|
||||||
.elif exists(${.CURDIR}/../cc1/cc1)
|
|
||||||
XCC+= -B${.CURDIR}/../cc1/
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if exists(${.OBJDIR}/../cpp/cpp)
|
|
||||||
XCC+= -B${.OBJDIR}/../cpp/
|
|
||||||
.elif exists(${.CURDIR}/../cpp/cpp)
|
|
||||||
XCC+= -B${.CURDIR}/../cpp/
|
|
||||||
.endif
|
|
||||||
|
|
||||||
# Members of libgcc1.a.
|
# Members of libgcc1.a.
|
||||||
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
|
LIB1FUNCS= _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
|
||||||
@ -67,47 +52,44 @@ LIB1OBJS= ${LIB1FUNCS:S/$/.o/}
|
|||||||
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
|
LIB2OBJS= ${LIB2FUNCS:S/$/.o/}
|
||||||
LIB1SOBJS= ${LIB1FUNCS:S/$/.so/}
|
LIB1SOBJS= ${LIB1FUNCS:S/$/.so/}
|
||||||
LIB2SOBJS= ${LIB2FUNCS:S/$/.so/}
|
LIB2SOBJS= ${LIB2FUNCS:S/$/.so/}
|
||||||
P1OBJS= ${LIB1FUNCS:S/$/.po/}
|
LIB1POBJS= ${LIB1FUNCS:S/$/.po/}
|
||||||
P2OBJS= ${LIB2FUNCS:S/$/.po/}
|
LIB2POBJS= ${LIB2FUNCS:S/$/.po/}
|
||||||
|
|
||||||
OBJS= ${LIB1OBJS} ${LIB2OBJS}
|
OBJS= ${LIB1OBJS} ${LIB2OBJS}
|
||||||
|
|
||||||
config.h:
|
config.h tconfig.h:
|
||||||
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
|
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > ${.TARGET}
|
||||||
|
|
||||||
tconfig.h:
|
|
||||||
echo '#include "${MACHINE_ARCH}/xm-freebsd.h"' > tconfig.h
|
|
||||||
|
|
||||||
tm.h:
|
tm.h:
|
||||||
echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
|
echo '#include "${MACHINE_ARCH}/freebsd.h"' > ${.TARGET}
|
||||||
|
|
||||||
${OBJS}: ${COMMONHDRS}
|
${OBJS}: ${COMMONHDRS}
|
||||||
|
|
||||||
${LIB1OBJS}: libgcc1.c
|
${LIB1OBJS}: libgcc1.c
|
||||||
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
${LIB2OBJS}: libgcc2.c
|
${LIB2OBJS}: libgcc2.c
|
||||||
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
.if !defined(NOPIC)
|
.if !defined(NOPIC)
|
||||||
${LIB1SOBJS}: libgcc1.c
|
${LIB1SOBJS}: libgcc1.c
|
||||||
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
|
|
||||||
${LIB2SOBJS}: libgcc2.c
|
${LIB2SOBJS}: libgcc2.c
|
||||||
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c -fpic ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
@${LD} -O ${.TARGET} -x -r ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !defined(NOPROFILE)
|
.if !defined(NOPROFILE)
|
||||||
${P1OBJS}: libgcc1.c
|
${LIB1POBJS}: libgcc1.c
|
||||||
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc1.c
|
${CC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
||||||
|
|
||||||
${P2OBJS}: libgcc2.c
|
${LIB2POBJS}: libgcc2.c
|
||||||
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${GCCDIR}/libgcc2.c
|
${XCC} -c -p ${CFLAGS} -DL${.PREFIX} -o ${.TARGET} ${.ALLSRC:M*.c}
|
||||||
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
@${LD} -O ${.TARGET} -X -r ${.TARGET}
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user