summaryrefslogtreecommitdiff
path: root/sys/boot/ficl
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2014-04-03 21:18:03 +0000
committerEd Maste <emaste@FreeBSD.org>2014-04-03 21:18:03 +0000
commit04555dfd892830549bbceeeca52c66e7b928c102 (patch)
tree4e29dbdf76bd0fc68e2ce6977b411a71df15a722 /sys/boot/ficl
parent89e84aead6479b86e4b73977d587efdf1efb5ea5 (diff)
downloadsrc-test2-04555dfd892830549bbceeeca52c66e7b928c102.tar.gz
src-test2-04555dfd892830549bbceeeca52c66e7b928c102.zip
Notes
Diffstat (limited to 'sys/boot/ficl')
-rw-r--r--sys/boot/ficl/Makefile23
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/boot/ficl/Makefile b/sys/boot/ficl/Makefile
index 684df5b81c55..a31b1cf364f9 100644
--- a/sys/boot/ficl/Makefile
+++ b/sys/boot/ficl/Makefile
@@ -3,7 +3,7 @@
FICLDIR?= ${.CURDIR}
-.if !defined(FICL64)
+.if defined(FICL32)
.PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/}
.elif ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el"
.PATH: ${FICLDIR}/${MACHINE_ARCH}
@@ -16,11 +16,12 @@ BASE_SRCS= dict.c ficl.c fileaccess.c float.c loader.c math64.c \
SRCS= ${BASE_SRCS} sysdep.c softcore.c
CLEANFILES= softcore.c testmain testmain.o
CFLAGS+= -ffreestanding
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-.if !defined(FICL64)
+.if ${MACHINE_CPUARCH} == "i386" || \
+ (${MACHINE_CPUARCH} == "amd64" && defined(FICL32))
CFLAGS+= -march=i386
CFLAGS.gcc+= -mpreferred-stack-boundary=2
.endif
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
.endif
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
@@ -53,22 +54,32 @@ SOFTWORDS= softcore.fr jhlocal.fr marker.fr freebsd.fr ficllocal.fr \
# Optional OO extension softwords
#SOFTWORDS+= oo.fr classes.fr
-.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64)
+.if ${MACHINE_CPUARCH} == "amd64"
+.if defined(FICL32)
CFLAGS+= -m32 -I.
+.else
+CFLAGS+= -fPIC
+.endif
.endif
.if ${MACHINE_ARCH} == "powerpc64"
CFLAGS+= -m32 -mcpu=powerpc -I.
.endif
-CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
+FICL_CPUARCH= i386
+.else
+FICL_CPUARCH= ${MACHINE_CPUARCH}
+.endif
+
+CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \
-I${FICLDIR}/../common
softcore.c: ${SOFTWORDS} softcore.awk
(cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \
| awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET}
-.if ${MACHINE_CPUARCH} == "amd64"
+.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32)
.if !exists(machine)
${SRCS:M*.c:R:S/$/.o/g}: machine