Index: head/sys/boot/ficl/Makefile =================================================================== --- head/sys/boot/ficl/Makefile (revision 325479) +++ head/sys/boot/ficl/Makefile (revision 325480) @@ -1,38 +1,42 @@ # $FreeBSD$ # .include .include "${BOOTSRC}/ficl.mk" 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 SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o .if ${MACHINE_CPUARCH} == "i386" || \ - (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) + (${MACHINE_CPUARCH} == "amd64" && defined(DO32)) CFLAGS+= -march=i386 .endif +.if ${MACHINE_CPUARCH} == "amd64" && defined(DO32) +CFLAGS+= -m32 +.endif + .if defined(HAVE_PNP) CFLAGS+= -DHAVE_PNP .endif .include .ifmake testmain CFLAGS+= -DTESTMAIN -D_TESTMAIN SRCS+= testmain.c PROG= testmain .include .else LIB= ficl INTERNALLIB= .include .endif # Standard softwords .PATH: ${FICLSRC}/softwords SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \ ifbrack.fr softcore.c: ${SOFTWORDS} softcore.awk (cd ${FICLSRC}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} Index: head/sys/boot/ficl.mk =================================================================== --- head/sys/boot/ficl.mk (revision 325479) +++ head/sys/boot/ficl.mk (revision 325480) @@ -1,44 +1,44 @@ # $FreeBSD$ # Common flags to build FICL related files .include "defs.mk" -.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) +.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1 FICL_CPUARCH= i386 .elif ${MACHINE_ARCH:Mmips64*} != "" FICL_CPUARCH= mips64 .else FICL_CPUARCH= ${MACHINE_CPUARCH} .endif .PATH: ${FICLSRC} ${FICLSRC}/${FICL_CPUARCH} .if ${MACHINE_CPUARCH} == "amd64" -.if defined(FICL32) +.if ${DO32:U0} == 1 CFLAGS+= -m32 -I. .else CFLAGS+= -fPIC .endif .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -I. .endif CFLAGS+= -I${FICLSRC} -I${FICLSRC}/${FICL_CPUARCH} -I${LDRSRC} CFLAGS+= -DBOOT_FORTH CFLAGS+= -DBF_DICTSIZE=15000 -.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) +.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1 .if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine beforedepend ${OBJS}: machine .endif machine: .NOMETA ln -sf ${SYSDIR}/i386/include machine CLEANFILES+= machine .endif Index: head/sys/boot/ficl32/Makefile =================================================================== --- head/sys/boot/ficl32/Makefile (revision 325479) +++ head/sys/boot/ficl32/Makefile (revision 325480) @@ -1,5 +1,5 @@ # $FreeBSD$ -FICL32= +DO32=1 .include "${.CURDIR}/../ficl/Makefile" Index: head/sys/boot/libsa32/Makefile =================================================================== --- head/sys/boot/libsa32/Makefile (revision 325479) +++ head/sys/boot/libsa32/Makefile (revision 325480) @@ -1,24 +1,26 @@ # $FreeBSD$ +DO32=1 + .include LIB=sa32 .if ${MACHINE_CPUARCH} == "amd64" LIBSA_CPUARCH=i386 .else LIBSA_CPUARCH=${MACHINE_CPUARCH} .endif .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -m32 -I. .endif .PATH: ${SASRC} .include "${SASRC}/Makefile" .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine beforedepend ${OBJS}: machine machine: .NOMETA ln -fs ${SYSDIR}/i386/include machine .endif Index: head/sys/boot/zfs/Makefile =================================================================== --- head/sys/boot/zfs/Makefile (revision 325479) +++ head/sys/boot/zfs/Makefile (revision 325480) @@ -1,42 +1,42 @@ # $FreeBSD$ .include LIB= zfsboot INTERNALLIB= .PATH: ${ZFSSRC} SRCS+= zfs.c skein.c skein_block.c # Do not unroll skein loops, reduce code size CFLAGS+= -DSKEIN_LOOP=111 .PATH: ${SYSDIR}/crypto/skein CFLAGS+= -DBOOTPROG=\"zfsloader\" CFLAGS+= -I${LDRSRC} -I${SYSDIR} -I. CFLAGS+= -I${SYSDIR}/cddl/boot/zfs CFLAGS+= -I${SYSDIR}/crypto/skein .if ${MACHINE_CPUARCH} == "i386" || \ - (${MACHINE_CPUARCH} == "amd64" && defined(ZFS32)) + (${MACHINE_CPUARCH} == "amd64" && defined(DO32)) CFLAGS+= -march=i386 .endif -.if ${MACHINE_CPUARCH} == "amd64" && defined(ZFS32) +.if ${MACHINE_CPUARCH} == "amd64" && defined(DO32) CFLAGS+= -m32 .endif CFLAGS+= -Wformat -Wall -.if ${MACHINE_CPUARCH} == "amd64" && defined(ZFS32) +.if ${MACHINE_CPUARCH} == "amd64" && defined(DO32) CLEANFILES+= machine machine: .NOMETA ln -sf ${SYSDIR}/i386/include machine .endif .include .include -.if ${MACHINE_CPUARCH} == "amd64" && defined(ZFS32) +.if ${MACHINE_CPUARCH} == "amd64" && defined(DO32) .if !exists(machine) beforedepend ${OBJS}: machine .endif .endif Index: head/sys/boot/zfs32/Makefile =================================================================== --- head/sys/boot/zfs32/Makefile (revision 325479) +++ head/sys/boot/zfs32/Makefile (revision 325480) @@ -1,5 +1,5 @@ # $FreeBSD$ -ZFS32=1 +DO32=1 .include "${.CURDIR}/../zfs/Makefile"