mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-28 16:43:09 +00:00
Update for GCC 3.1.
(Alpha now uses crtstuff rather than the ASM verisons!)
This commit is contained in:
parent
9bd6dcbf97
commit
4d484dd742
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/WIP_GCC31/; revision=93870
@ -1,81 +1,44 @@
|
||||
# $FreeBSD$
|
||||
|
||||
GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
||||
|
||||
TARGET_ARCH?= ${MACHINE_ARCH}
|
||||
|
||||
.if ${TARGET_ARCH} == "alpha"
|
||||
.PATH: ${GCCDIR}/config/alpha
|
||||
SRCS= crtbegin.s crtend.s
|
||||
UGLYHACK= -x assembler
|
||||
.else
|
||||
GCCDIR= ${.CURDIR}/../../../contrib/gcc
|
||||
.PATH: ${GCCDIR}
|
||||
SRCS= crtstuff.c tm.h
|
||||
.endif
|
||||
|
||||
SRCS= crtstuff.c tconfig.h
|
||||
|
||||
OBJS= crtbegin.o crtend.o
|
||||
SOBJS= crtbegin.So crtend.So
|
||||
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \
|
||||
-I${.CURDIR}/../../usr.bin/cc/cc_tools -I../../usr.bin/cc/cc_tools \
|
||||
-DIN_GCC \
|
||||
-finhibit-size-directive -fno-inline-functions \
|
||||
CFLAGS+= -DIN_GCC -DHAVE_LD_EH_FRAME_HDR
|
||||
CFLAGS+= -finhibit-size-directive -fno-inline-functions \
|
||||
-fno-exceptions -fno-omit-frame-pointer
|
||||
INTERNALLIB= true
|
||||
|
||||
CFLAGS+= -I${GCCDIR}/config -I${GCCDIR} -I. \
|
||||
-I${.CURDIR}/../../usr.bin/cc/cc_tools
|
||||
CRTS_CFLAGS= -DCRTSTUFFS_O ${PICFLAG}
|
||||
MKDEPCMD= CC=${CC} MKDEP_CPP_OPTS="-M -DCRT_BEGIN" mkdep
|
||||
INTERNALLIB= true
|
||||
|
||||
all: ${OBJS} ${SOBJS}
|
||||
|
||||
.if ${TARGET_ARCH} == "alpha"
|
||||
crtbegin.o crtbegin.So: crtbegin.s
|
||||
crtend.o crtend.So: crtend.s
|
||||
.for PART in begin end
|
||||
CLEANFILES+= crt${PART}.s
|
||||
crt${PART}.s: crt${PART}.asm
|
||||
ln -sf ${.ALLSRC} ${.TARGET}
|
||||
.endfor
|
||||
.else
|
||||
crtbegin.o crtbegin.So crtend.o crtend.So: ${SRCS}
|
||||
.endif
|
||||
|
||||
crtbegin.o:
|
||||
${CC} ${CFLAGS} -g0 -DCRT_BEGIN \
|
||||
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
|
||||
-c -o ${.TARGET} ${.ALLSRC:N*.h}
|
||||
|
||||
crtbegin.So:
|
||||
${CC} ${CFLAGS} -g0 -DCRT_BEGIN ${CRTS_CFLAGS} \
|
||||
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
|
||||
-c -o ${.TARGET} ${.ALLSRC:N*.h}
|
||||
|
||||
crtend.o:
|
||||
${CC} ${CFLAGS} -g0 -DCRT_END \
|
||||
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
|
||||
-c -o ${.TARGET} ${.ALLSRC:N*.h}
|
||||
|
||||
crtend.So:
|
||||
${CC} ${CFLAGS} -g0 -DCRT_END ${CRTS_CFLAGS} \
|
||||
-c -o ${.TARGET} ${UGLYHACK} ${.ALLSRC:N*.h}
|
||||
-c -o ${.TARGET} ${.ALLSRC:N*.h}
|
||||
|
||||
CLEANFILES+= tm.h
|
||||
# KEEP THIS IN SYNC with src/gnu/usr.bin/cc/cc_tools/Makefile !!
|
||||
tm.h:
|
||||
echo '#include "gansidecl.h"' > ${.TARGET}
|
||||
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' >> ${.TARGET}
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
echo '#include "${MACHINE_ARCH}/att.h"' >> ${.TARGET}
|
||||
.endif
|
||||
echo '#include <freebsd-native.h>' >> ${.TARGET}
|
||||
echo '#include <freebsd.h>' >> ${.TARGET}
|
||||
.if exists(${MACHINE_ARCH}/config/${MACHINE_ARCH}/elf.h)
|
||||
echo '#include "${MACHINE_ARCH}/elf.h"' >> ${.TARGET}
|
||||
.endif
|
||||
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
|
||||
.if ${MACHINE_ARCH} == "i386"
|
||||
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
|
||||
.endif
|
||||
echo '#include "defaults.h"' >> ${.TARGET}
|
||||
echo '#ifndef GENERATOR_FILE' >> ${.TARGET}
|
||||
echo '#include "insn-codes.h"' >> ${.TARGET}
|
||||
echo '#include "insn-flags.h"' >> ${.TARGET}
|
||||
echo '#endif' >> ${.TARGET}
|
||||
CLEANFILES= tconfig.h
|
||||
tconfig.h: ${.CURDIR}/../../usr.bin/cc/cc_tools/Makefile
|
||||
${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} ${.TARGET}
|
||||
|
||||
realinstall:
|
||||
.for file in ${OBJS} ${SOBJS}
|
||||
|
Loading…
Reference in New Issue
Block a user