Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Nov 2017 15:21:40 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325478 - in head/sys/boot: . libsa32 powerpc powerpc/kboot powerpc/ofw powerpc/ps3 powerpc/uboot
Message-ID:  <201711061521.vA6FLetF036182@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Mon Nov  6 15:21:39 2017
New Revision: 325478
URL: https://svnweb.freebsd.org/changeset/base/325478

Log:
  Powerpc is a 32-bit boot loader.
  
  Stop building libsa32 on powerpc. Build everything on powerpc64
  -m32. Transition to using LIBSA from LIBSA32. This elimiantes the
  useless build of libsa on powerpc64 (nothing used to use it) and
  should be a more direct way of saying this.
  
  Sponsored by: Netflix

Modified:
  head/sys/boot/Makefile.powerpc
  head/sys/boot/defs.mk
  head/sys/boot/libsa32/Makefile
  head/sys/boot/powerpc/Makefile.inc
  head/sys/boot/powerpc/kboot/Makefile
  head/sys/boot/powerpc/ofw/Makefile
  head/sys/boot/powerpc/ps3/Makefile
  head/sys/boot/powerpc/uboot/Makefile

Modified: head/sys/boot/Makefile.powerpc
==============================================================================
--- head/sys/boot/Makefile.powerpc	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/Makefile.powerpc	Mon Nov  6 15:21:39 2017	(r325478)
@@ -4,6 +4,5 @@
 SUBDIR+=		fdt
 .endif
 
-SUBDIR+=		libsa32
 SUBDIR+=		ofw
 SUBDIR+=		uboot

Modified: head/sys/boot/defs.mk
==============================================================================
--- head/sys/boot/defs.mk	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/defs.mk	Mon Nov  6 15:21:39 2017	(r325478)
@@ -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__

Modified: head/sys/boot/libsa32/Makefile
==============================================================================
--- head/sys/boot/libsa32/Makefile	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/libsa32/Makefile	Mon Nov  6 15:21:39 2017	(r325478)
@@ -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
 

Modified: head/sys/boot/powerpc/Makefile.inc
==============================================================================
--- head/sys/boot/powerpc/Makefile.inc	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/powerpc/Makefile.inc	Mon Nov  6 15:21:39 2017	(r325478)
@@ -1,7 +1,3 @@
 # $FreeBSD$
 
-.if ${MACHINE_ARCH} == "powerpc64"
-CFLAGS+=	-m32 -mcpu=powerpc
-.endif
-
 .include "../Makefile.inc"

Modified: head/sys/boot/powerpc/kboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/kboot/Makefile	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/powerpc/kboot/Makefile	Mon Nov  6 15:21:39 2017	(r325478)
@@ -51,8 +51,8 @@ LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powe
 # 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} | \

Modified: head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- head/sys/boot/powerpc/ofw/Makefile	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/powerpc/ofw/Makefile	Mon Nov  6 15:21:39 2017	(r325478)
@@ -55,8 +55,8 @@ LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powe
 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} | \

Modified: head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- head/sys/boot/powerpc/ps3/Makefile	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/powerpc/ps3/Makefile	Mon Nov  6 15:21:39 2017	(r325478)
@@ -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
 

Modified: head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- head/sys/boot/powerpc/uboot/Makefile	Mon Nov  6 15:12:30 2017	(r325477)
+++ head/sys/boot/powerpc/uboot/Makefile	Mon Nov  6 15:21:39 2017	(r325478)
@@ -35,8 +35,8 @@ LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powe
 
 .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} | \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711061521.vA6FLetF036182>