Build on amd64. Yes, I know this isn't particularly nice.
This commit is contained in:
parent
ba1cabf4b9
commit
062b3e0c77
@ -1,8 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
MACHINE_ARCH=i386
|
||||
MACHINE=i386
|
||||
.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true
|
||||
.endif
|
||||
|
||||
.if !defined(NOFORTH)
|
||||
|
@ -34,7 +34,3 @@ MAN+= ../forth/loader.4th.8
|
||||
.endif
|
||||
|
||||
MAN+= loader.8
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
CFLAGS+= -m32
|
||||
.endif
|
||||
|
@ -1,5 +1,9 @@
|
||||
# $FreeBSD$
|
||||
#
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true
|
||||
.endif
|
||||
|
||||
.PATH: ${.CURDIR}/${MACHINE_ARCH}
|
||||
BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
|
||||
prefix.c search.c stack.c tools.c vm.c words.c
|
||||
@ -37,8 +41,24 @@ SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
|
||||
# Optional OO extension softwords
|
||||
#SOFTWORDS+= oo.fr classes.fr
|
||||
|
||||
.if defined(REALLY_AMD64)
|
||||
CFLAGS+= -m32 -I.
|
||||
LDFLAGS= -m elf_i386_fbsd
|
||||
.endif
|
||||
|
||||
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}/../common
|
||||
|
||||
softcore.c: ${SOFTWORDS} softcore.awk
|
||||
(cd ${.CURDIR}/softwords; cat ${SOFTWORDS} \
|
||||
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
|
||||
|
||||
.if defined(REALLY_AMD64)
|
||||
${SRCS:M*.c:R:S/$/.o/g}: machine
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
|
||||
machine:
|
||||
ln -sf ${.CURDIR}/../../i386/include machine
|
||||
|
||||
CLEANFILES+= machine
|
||||
.endif
|
||||
|
@ -4,3 +4,14 @@
|
||||
|
||||
LOADER_ADDRESS?= 0x200000
|
||||
CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
.MAKEFLAGS: MACHINE_ARCH=i386 MACHINE=i386 REALLY_AMD64=true
|
||||
.endif
|
||||
|
||||
.if defined(REALLY_AMD64) && !defined(__been_to_Makefile_inc)
|
||||
__been_to_Makefile_inc= 1
|
||||
CFLAGS+= -m32
|
||||
LDFLAGS+= -m elf_i386_fbsd
|
||||
AFLAGS+= --32
|
||||
.endif
|
||||
|
@ -109,3 +109,15 @@ install:
|
||||
boot2 ${DESTDIR}${BINDIR}/boot2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.if defined(REALLY_AMD64)
|
||||
boot2.o: machine
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
|
||||
machine:
|
||||
ln -sf ${.CURDIR}/../../../i386/include machine
|
||||
|
||||
CLEANFILES+= machine
|
||||
.endif
|
||||
|
||||
|
2
sys/boot/i386/btx/Makefile.inc
Normal file
2
sys/boot/i386/btx/Makefile.inc
Normal file
@ -0,0 +1,2 @@
|
||||
# $FreeBSD$
|
||||
.include <${.CURDIR}/../../Makefile.inc>
|
@ -19,5 +19,4 @@ btxldr.o: btxldr.s
|
||||
|
||||
CLEANFILES+= btxldr btxldr.out btxldr.o
|
||||
|
||||
.include <${.CURDIR}/../../Makefile.inc>
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -109,3 +109,15 @@ install:
|
||||
boot2 ${DESTDIR}${BINDIR}/boot2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
.if defined(REALLY_AMD64)
|
||||
boot2.o: machine
|
||||
|
||||
beforedepend ${OBJS}: machine
|
||||
|
||||
machine:
|
||||
ln -sf ${.CURDIR}/../../../i386/include machine
|
||||
|
||||
CLEANFILES+= machine
|
||||
.endif
|
||||
|
||||
|
@ -85,7 +85,7 @@ CFLAGS+= -elf
|
||||
|
||||
vers.o: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
||||
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
||||
${CC} -c vers.c
|
||||
${CC} ${CFLAGS} -c vers.c
|
||||
|
||||
${PROG}: ${PROG}.bin ${BTXLDR} ${BTXKERN} ${BTXCRT}
|
||||
btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
|
||||
|
Loading…
Reference in New Issue
Block a user