Index: sys/boot/Makefile.i386 =================================================================== --- sys/boot/Makefile.i386 +++ sys/boot/Makefile.i386 @@ -1,5 +1,4 @@ # $FreeBSD$ -SUBDIR+= efi SUBDIR+= libstand32 SUBDIR+= zfs Index: sys/boot/amd64/Makefile =================================================================== --- sys/boot/amd64/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# $FreeBSD$ - -.include - -SUBDIR= efi boot1.efi - -.include Index: sys/boot/amd64/Makefile.inc =================================================================== --- sys/boot/amd64/Makefile.inc +++ /dev/null @@ -1,12 +0,0 @@ -# Common defines for all of /sys/boot/amd64/ -# -# $FreeBSD$ - -BINDIR?= /boot - -# See conf/kern.mk for the correct set of these -CFLAGS+= -ffreestanding -CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float -LDFLAGS+= -nostdlib - -.include "../Makefile.inc" Index: sys/boot/efi/Makefile =================================================================== --- sys/boot/efi/Makefile +++ sys/boot/efi/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ -SUBDIR= libefi +SUBDIR= boot1 \ + libefi \ + loader .include Index: sys/boot/efi/Makefile.inc =================================================================== --- sys/boot/efi/Makefile.inc +++ sys/boot/efi/Makefile.inc @@ -2,7 +2,9 @@ BINDIR?= /boot -.if ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float +.elif ${MACHINE_CPUARCH} == "i386" CFLAGS+= -march=i386 .endif Index: sys/boot/efi/boot1/Makefile =================================================================== --- sys/boot/efi/boot1/Makefile +++ sys/boot/efi/boot1/Makefile @@ -17,19 +17,19 @@ CFLAGS+= -fPIC CFLAGS+= -I. -CFLAGS+= -I${.CURDIR}/../../efi/include -CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_CPUARCH} +CFLAGS+= -I${.CURDIR}/../include +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. # Always add MI sources and REGULAR efi loader bits -.PATH: ${.CURDIR}/../efi ${.CURDIR}/../../common +.PATH: ${.CURDIR}/../loader ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} -LDSCRIPT= ${.CURDIR}/../efi/ldscript.${MACHINE_CPUARCH} +LDSCRIPT= ${.CURDIR}/../loader/ldscript.${MACHINE_CPUARCH} LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared -Wl,-znocombreloc ${PROG}: ${LDSCRIPT}