diff --git a/sys/boot/Makefile.powerpc b/sys/boot/Makefile.powerpc index a1347d218ecd..b7660f4600d4 100644 --- a/sys/boot/Makefile.powerpc +++ b/sys/boot/Makefile.powerpc @@ -4,6 +4,5 @@ SUBDIR+= fdt .endif -SUBDIR+= libsa32 SUBDIR+= ofw SUBDIR+= uboot diff --git a/sys/boot/defs.mk b/sys/boot/defs.mk index 0115f4bc09b6..a769c5835057 100644 --- a/sys/boot/defs.mk +++ b/sys/boot/defs.mk @@ -86,4 +86,10 @@ CFLAGS+= -DLOADER_GELI_SUPPORT .endif .endif +# All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc +# or powerpc64. +.if ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -m32 -mcpu=powerpc +.endif + .endif # __BOOT_DEFS_MK__ diff --git a/sys/boot/libsa32/Makefile b/sys/boot/libsa32/Makefile index 12ffcbb6da5b..9338a0fe15d6 100644 --- a/sys/boot/libsa32/Makefile +++ b/sys/boot/libsa32/Makefile @@ -9,7 +9,7 @@ LIBSA_CPUARCH=i386 LIBSA_CPUARCH=${MACHINE_CPUARCH} .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_ARCH} == "amd64" CFLAGS+= -m32 -I. .endif diff --git a/sys/boot/powerpc/Makefile.inc b/sys/boot/powerpc/Makefile.inc index 1b62477aa7c5..265f86d1ed55 100644 --- a/sys/boot/powerpc/Makefile.inc +++ b/sys/boot/powerpc/Makefile.inc @@ -1,7 +1,3 @@ # $FreeBSD$ -.if ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -mcpu=powerpc -.endif - .include "../Makefile.inc" diff --git a/sys/boot/powerpc/kboot/Makefile b/sys/boot/powerpc/kboot/Makefile index 5af9e036ee19..4055b1a63fdc 100644 --- a/sys/boot/powerpc/kboot/Makefile +++ b/sys/boot/powerpc/kboot/Makefile @@ -51,8 +51,8 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc # 64-bit bridge extensions CFLAGS+= -Wa,-mppc64bridge -DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} loader.help: help.common help.kboot ${FDTSRC}/help.fdt cat ${.ALLSRC} | \ diff --git a/sys/boot/powerpc/ofw/Makefile b/sys/boot/powerpc/ofw/Makefile index 3ad3adc69f53..883c242df33c 100644 --- a/sys/boot/powerpc/ofw/Makefile +++ b/sys/boot/powerpc/ofw/Makefile @@ -55,8 +55,8 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc LIBOFW= ${BOOTOBJ}/ofw/libofw/libofw.a CFLAGS+= -I${BOOTSRC}/ofw/libofw -DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA32} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBFDT} ${LIBSA} loader.help: help.common help.ofw ${FDTSRC}/help.fdt cat ${.ALLSRC} | \ diff --git a/sys/boot/powerpc/ps3/Makefile b/sys/boot/powerpc/ps3/Makefile index c62778976cfe..dd4117f4081a 100644 --- a/sys/boot/powerpc/ps3/Makefile +++ b/sys/boot/powerpc/ps3/Makefile @@ -47,8 +47,8 @@ CFLAGS+= -DRELOC=${RELOC} LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc -DPADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} -LDADD= ${LIBFICL} ${LIBOFW} ${LIBSA32} +DPADD= ${LIBFICL} ${LIBOFW} ${LIBSA} +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSA} SC_DFLT_FONT=cp437 diff --git a/sys/boot/powerpc/uboot/Makefile b/sys/boot/powerpc/uboot/Makefile index 38791eda7c16..41dcb2750aaf 100644 --- a/sys/boot/powerpc/uboot/Makefile +++ b/sys/boot/powerpc/uboot/Makefile @@ -35,8 +35,8 @@ LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.powerpc .include "${BOOTSRC}/uboot.mk" -DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA32} +DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBUBOOT_FDT} ${LIBSA} loader.help: help.common help.uboot ${BOOTSRC}/fdt/help.fdt cat ${.ALLSRC} | \