1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-01 12:19:28 +00:00

MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH (which simplifies some powerpc/powerpc64 ifs)

This commit is contained in:
Warner Losh 2010-08-23 01:50:34 +00:00
parent 99a4fb6cbc
commit f0e82e0b01
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211680
6 changed files with 18 additions and 18 deletions

View File

@ -9,7 +9,7 @@ INTERNALLIB=
SRCS= autoload.c bootinfo.c copy.c devicename.c exec.c
CFLAGS+= -I${.CURDIR}/../../efi/include
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
@ -17,7 +17,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
BOOT_FORTH= yes
CFLAGS+= -DBOOT_FORTH
CFLAGS+= -I${.CURDIR}/../../ficl
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../ficl/${MACHINE_CPUARCH}
.endif
.PATH: ${.CURDIR}/../../common

View File

@ -9,21 +9,21 @@ PROG= loader.sym
INTERNALPROG=
SRCS= conf.c efimd.c main.c pal.S start.S vers.c
.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${.CURDIR}/../../../${MACHINE_CPUARCH}/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../common
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../efi/include
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH}
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
${PROG}: ${LDSCRIPT}
NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH}
NEWVERSWHAT= "EFI boot" ${MACHINE_CPUARCH}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
@ -42,7 +42,7 @@ loader.efi: loader.sym
fi
${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \
-j .rela.dyn -j .reloc -j .sdata -j .text \
--target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET}
--target=efi-app-${MACHINE_CPUARCH} ${.ALLSRC} ${.TARGET}
CLEANFILES= vers.c loader.efi

View File

@ -17,10 +17,10 @@ CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
LDFLAGS= -Wl,-T${LDSCRIPT}
NEWVERSWHAT= "SKI boot" ${MACHINE_ARCH}
NEWVERSWHAT= "SKI boot" ${MACHINE_CPUARCH}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}

View File

@ -13,7 +13,7 @@ CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
CFLAGS+= -I${.CURDIR}/../../common -I${.CURDIR}/../../.. -I.
CFLAGS+= -ffreestanding
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
.if ${MACHINE_CPUARCH} == "powerpc"
CFLAGS+= -msoft-float
SRCS+= ppc64_elf_freebsd.c
.endif
@ -24,7 +24,7 @@ CFLAGS+= -DDISK_DEBUG
.endif
machine:
ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine
ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
CLEANFILES+= machine

View File

@ -23,7 +23,7 @@ CFLAGS+= -DDISK_DEBUG
.endif
machine:
ln -sf ${.CURDIR}/../../../${MACHINE_ARCH}/include machine
ln -sf ${.CURDIR}/../../../${MACHINE_CPUARCH}/include machine
CLEANFILES+= machine

View File

@ -10,23 +10,23 @@ CFLAGS+= -I${.CURDIR}/../../../lib/libstand
CFLAGS+= -I${.CURDIR}/../../cddl/boot/zfs
CFLAGS+= -ffreestanding
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -mpreferred-stack-boundary=2
CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2
.endif
.if ${MACHINE_ARCH} == "i386"
.if ${MACHINE_CPUARCH} == "i386"
CFLAGS+= -mno-sse3
.endif
.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "arm"
.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm"
CFLAGS+= -msoft-float
.endif
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
CFLAGS+= -m32 -march=i386
.endif
CFLAGS+= -Wformat -Wall
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
CLEANFILES+= machine
machine:
ln -sf ${.CURDIR}/../../i386/include machine
@ -34,6 +34,6 @@ machine:
.include <bsd.lib.mk>
.if ${MACHINE_ARCH} == "amd64"
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend ${OBJS}: machine
.endif