Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Feb 2018 01:17:07 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r329146 - in stable/11/stand: . arm/uboot efi efi/fdt fdt i386 i386/gptzfsboot i386/libi386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/k...
Message-ID:  <201802120117.w1C1H7Xq077487@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Feb 12 01:17:06 2018
New Revision: 329146
URL: https://svnweb.freebsd.org/changeset/base/329146

Log:
  MFC r326038,r326069,r326072: More stand simplification and fixes
  
  r326038: Move some more common stuff up to Makefile.inc.
  
  r326069: Fix gptzfsboot for cases with GELI.
  
  r326072: Unbreak riscv build in universe.

Modified:
  stable/11/stand/Makefile.inc
  stable/11/stand/arm/uboot/Makefile
  stable/11/stand/efi/Makefile.inc
  stable/11/stand/efi/fdt/Makefile
  stable/11/stand/fdt/Makefile
  stable/11/stand/i386/Makefile.inc
  stable/11/stand/i386/gptzfsboot/Makefile
  stable/11/stand/i386/libi386/Makefile
  stable/11/stand/mips/beri/Makefile.inc
  stable/11/stand/mips/beri/boot2/Makefile
  stable/11/stand/mips/beri/loader/Makefile
  stable/11/stand/mips/uboot/Makefile
  stable/11/stand/ofw/libofw/Makefile
  stable/11/stand/powerpc/boot1.chrp/Makefile
  stable/11/stand/powerpc/kboot/Makefile
  stable/11/stand/powerpc/ofw/Makefile
  stable/11/stand/powerpc/ps3/Makefile
  stable/11/stand/powerpc/uboot/Makefile
  stable/11/stand/sparc64/Makefile.inc
  stable/11/stand/uboot/fdt/Makefile
  stable/11/stand/uboot/lib/Makefile
  stable/11/stand/usb/Makefile
  stable/11/stand/usb/Makefile.test
  stable/11/stand/userboot/userboot/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/stand/Makefile.inc
==============================================================================
--- stable/11/stand/Makefile.inc	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/Makefile.inc	Mon Feb 12 01:17:06 2018	(r329146)
@@ -9,6 +9,22 @@ CFLAGS+=-I${SASRC}
 
 SSP_CFLAGS=
 
+# Add in the no float / no SIMD stuff and announce we're freestanding
+# aarch64 and riscv don't have -msoft-float, but all others do. riscv
+# currently has no /boot/loader, but may soon.
+CFLAGS+=	-ffreestanding ${CFLAGS_NO_SIMD}
+.if ${MACHINE_CPUARCH} == "aarch64"
+CFLAGS+=	-mgeneral-regs-only
+.elif ${MACHINE_CPUARCH} != "riscv"
+CFLAGS+=	-msoft-float
+.endif
+
+.if ${MACHINE_CPUARCH} == "i386" || (${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 1)
+CFLAGS+=	-march=i386
+CFLAGS.gcc+=	-mpreferred-stack-boundary=2
+.endif
+
+
 .if ${MACHINE_CPUARCH} == "arm"
 # Do not generate movt/movw, because the relocation fixup for them does not
 # translate to the -Bsymbolic -pie format required by self_reloc() in loader(8).

Modified: stable/11/stand/arm/uboot/Makefile
==============================================================================
--- stable/11/stand/arm/uboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/arm/uboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -33,8 +33,6 @@ HELP_FILES+=	 help.uboot ${BOOTSRC}/fdt/help.fdt
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
 
-CFLAGS+=	-ffreestanding -msoft-float
-
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
 LDFLAGS+=	-Wl,-znotext
 

Modified: stable/11/stand/efi/Makefile.inc
==============================================================================
--- stable/11/stand/efi/Makefile.inc	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/efi/Makefile.inc	Mon Feb 12 01:17:06 2018	(r329146)
@@ -1,23 +1,13 @@
 # $FreeBSD$
 
-.if ${MACHINE_CPUARCH} == "i386"
-CFLAGS+=        -march=i386
-CFLAGS+=	-mno-aes
-.endif
-
 # Options used when building app-specific efi components
 # See conf/kern.mk for the correct set of these
-CFLAGS+=	-ffreestanding -Wformat ${CFLAGS_NO_SIMD}
+CFLAGS+=	-Wformat
 LDFLAGS+=	-nostdlib
 
-.if ${MACHINE_CPUARCH} != "aarch64"
-CFLAGS+=	-msoft-float
-.endif
-
 .if ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=	-fshort-wchar
 CFLAGS+=	-mno-red-zone
-CFLAGS+=	-mno-aes
 .endif
 
 .if ${MACHINE_CPUARCH} == "aarch64"

Modified: stable/11/stand/efi/fdt/Makefile
==============================================================================
--- stable/11/stand/efi/fdt/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/efi/fdt/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -10,13 +10,6 @@ WARNS?=		6
 
 SRCS=		efi_fdt.c
 
-CFLAGS+=	-ffreestanding
-.if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+=	-mgeneral-regs-only
-.else
-CFLAGS+=	-msoft-float
-.endif
-
 # EFI library headers
 CFLAGS+=	-I${EFISRC}/include
 CFLAGS+=	-I${EFISRC}/include/${MACHINE}

Modified: stable/11/stand/fdt/Makefile
==============================================================================
--- stable/11/stand/fdt/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/fdt/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -16,12 +16,6 @@ SRCS+=		fdt_loader_cmd.c
 
 CFLAGS+=	-I${SYSDIR}/contrib/libfdt/ -I${LDRSRC}
 
-CFLAGS+=	-ffreestanding
-
-.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips"
-CFLAGS+=	-msoft-float
-.endif
-
 CFLAGS+=	-Wformat -Wall
 
 .include <bsd.stand.mk>

Modified: stable/11/stand/i386/Makefile.inc
==============================================================================
--- stable/11/stand/i386/Makefile.inc	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/i386/Makefile.inc	Mon Feb 12 01:17:06 2018	(r329146)
@@ -3,9 +3,6 @@
 # $FreeBSD$
 
 LOADER_ADDRESS?=0x200000
-CFLAGS+=	-march=i386 -ffreestanding
-CFLAGS.gcc+=	-mpreferred-stack-boundary=2
-CFLAGS+=	${CFLAGS_NO_SIMD} -msoft-float
 LDFLAGS+=	-nostdlib
 
 # BTX components

Modified: stable/11/stand/i386/gptzfsboot/Makefile
==============================================================================
--- stable/11/stand/i386/gptzfsboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/i386/gptzfsboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-HAVE_GPT=	yes
+HAVE_GELI=	yes
 
 .include <bsd.init.mk>
 
@@ -70,12 +70,12 @@ gptldr.out: gptldr.o
 	${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
 
 CLEANFILES+=	gptzfsboot.bin gptzfsboot.out zfsboot.o sio.o cons.o \
-		drv.o gpt.o util.o ${OPENCRYPTO_XTS}
+		drv.o gpt.o ${OPENCRYPTO_XTS}
 
 gptzfsboot.bin: gptzfsboot.out
 	${OBJCOPY} -S -O binary gptzfsboot.out ${.TARGET}
 
-gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o util.o \
+gptzfsboot.out: ${BTXCRT} zfsboot.o sio.o gpt.o drv.o cons.o \
 	${OPENCRYPTO_XTS}
 	${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBZFSBOOT} ${LIBSA32}
 

Modified: stable/11/stand/i386/libi386/Makefile
==============================================================================
--- stable/11/stand/i386/libi386/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/i386/libi386/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-HAVE_GPT=		yes
 HAVE_GELI=		yes
 
 .include <bsd.init.mk>

Modified: stable/11/stand/mips/beri/Makefile.inc
==============================================================================
--- stable/11/stand/mips/beri/Makefile.inc	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/mips/beri/Makefile.inc	Mon Feb 12 01:17:06 2018	(r329146)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-CFLAGS+=	-ffreestanding
 LDFLAGS+=	-nostdlib
 
 .include "../Makefile.inc"

Modified: stable/11/stand/mips/beri/boot2/Makefile
==============================================================================
--- stable/11/stand/mips/beri/boot2/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/mips/beri/boot2/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -47,15 +47,13 @@ MAN=
 
 AFLAGS=		-G0
 
-CFLAGS=		-ffreestanding			\
-		-I${.CURDIR}			\
+CFLAGS+=	-I${.CURDIR}			\
 		-I${SASRC}			\
 		-I${LDRSRC}			\
 		-D_KERNEL			\
 		-Wall				\
 		-G0 				\
 		-fno-pic -mno-abicalls		\
-		-msoft-float			\
 		-g
 
 LDFLAGS=	-nostdlib			\

Modified: stable/11/stand/mips/beri/loader/Makefile
==============================================================================
--- stable/11/stand/mips/beri/loader/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/mips/beri/loader/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -83,7 +83,6 @@ CFLAGS+=	-I${.CURDIR}
 CFLAGS+=	-G0					\
 		-fno-pic				\
 		-mno-abicalls				\
-		-msoft-float				\
 		-g
 
 LDFLAGS=	-nostdlib				\

Modified: stable/11/stand/mips/uboot/Makefile
==============================================================================
--- stable/11/stand/mips/uboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/mips/uboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -29,7 +29,7 @@ HELP_FILES+=	help.uboot ${BOOTSRC}/fdt/help.fdt
 # Always add MI sources
 .include	"${BOOTSRC}/loader.mk"
 
-CFLAGS+=	-ffreestanding -msoft-float -g
+CFLAGS+=	-g
 
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
 

Modified: stable/11/stand/ofw/libofw/Makefile
==============================================================================
--- stable/11/stand/ofw/libofw/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/ofw/libofw/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -14,9 +14,7 @@ SRCS+=  devicename_stubs.c
 # Pick up the bootstrap header for some interface items
 CFLAGS+=	-I${LDRSRC}
 
-CFLAGS+=	-ffreestanding
 .if ${MACHINE_CPUARCH} == "powerpc"
-CFLAGS+=	-msoft-float
 SRCS+=		ppc64_elf_freebsd.c
 .endif
 

Modified: stable/11/stand/powerpc/boot1.chrp/Makefile
==============================================================================
--- stable/11/stand/powerpc/boot1.chrp/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/powerpc/boot1.chrp/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -13,9 +13,7 @@ SRCS=		boot1.c ashldi3.c syncicache.c
 
 MAN=
 
-CFLAGS= -ffreestanding -msoft-float \
-	-I${LDRSRC} -I${SYSDIR} -I${SASRC} \
-	-D_STANDALONE
+CFLAGS= -I${LDRSRC} -I${SYSDIR} -I${SASRC} -D_STANDALONE
 LDFLAGS=-nostdlib -static -Wl,-N
 
 .PATH:  ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}

Modified: stable/11/stand/powerpc/kboot/Makefile
==============================================================================
--- stable/11/stand/powerpc/kboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/powerpc/kboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -32,7 +32,7 @@ HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
 
-CFLAGS+=	-Wall -ffreestanding -msoft-float -DAIM
+CFLAGS+=	-Wall -DAIM
 # load address. set in linker script
 RELOC?=		0x0
 CFLAGS+=	-DRELOC=${RELOC}

Modified: stable/11/stand/powerpc/ofw/Makefile
==============================================================================
--- stable/11/stand/powerpc/ofw/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/powerpc/ofw/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -34,7 +34,6 @@ HELP_FILES+=	${FDTSRC}/help.fdt
 
 .PATH:		${SYSDIR}/libkern
 
-CFLAGS+=	-ffreestanding -msoft-float
 # load address. set in linker script
 RELOC?=		0x1C00000
 CFLAGS+=	-DRELOC=${RELOC}

Modified: stable/11/stand/powerpc/ps3/Makefile
==============================================================================
--- stable/11/stand/powerpc/ps3/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/powerpc/ps3/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -30,7 +30,7 @@ HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
 
-CFLAGS+=	-Wall -ffreestanding -msoft-float -DAIM
+CFLAGS+=	-Wall -DAIM
 # load address. set in linker script
 RELOC?=		0x0
 CFLAGS+=	-DRELOC=${RELOC}

Modified: stable/11/stand/powerpc/uboot/Makefile
==============================================================================
--- stable/11/stand/powerpc/uboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/powerpc/uboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -25,8 +25,6 @@ HELP_FILES=	# Disable
 .include	"${BOOTSRC}/loader.mk"
 .PATH:		${SYSDIR}/libkern
 
-CFLAGS+=	-ffreestanding
-
 LDFLAGS=	-nostdlib -static -T ${.CURDIR}/ldscript.powerpc
 
 .include	"${BOOTSRC}/uboot.mk"

Modified: stable/11/stand/sparc64/Makefile.inc
==============================================================================
--- stable/11/stand/sparc64/Makefile.inc	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/sparc64/Makefile.inc	Mon Feb 12 01:17:06 2018	(r329146)
@@ -1,6 +1,5 @@
 # $FreeBSD$
 
-CFLAGS+=	-ffreestanding
 LDFLAGS+=	-nostdlib
 
 .include "../Makefile.inc"

Modified: stable/11/stand/uboot/fdt/Makefile
==============================================================================
--- stable/11/stand/uboot/fdt/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/uboot/fdt/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -10,8 +10,6 @@ WARNS?=		2
 
 SRCS=		uboot_fdt.c
 
-CFLAGS+=	-ffreestanding -msoft-float
-
 # U-Boot library headers
 CFLAGS+=	-I${UBOOTSRC}/lib
 

Modified: stable/11/stand/uboot/lib/Makefile
==============================================================================
--- stable/11/stand/uboot/lib/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/uboot/lib/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -11,8 +11,6 @@ WARNS?=		2
 SRCS=	console.c copy.c devicename.c elf_freebsd.c glue.c
 SRCS+=	module.c net.c reboot.c time.c
 
-CFLAGS+=	-ffreestanding -msoft-float
-
 .if ${LOADER_DISK_SUPPORT:Uyes} == "yes"
 SRCS+= disk.c
 .endif

Modified: stable/11/stand/usb/Makefile
==============================================================================
--- stable/11/stand/usb/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/usb/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -36,15 +36,10 @@ INTERNALLIB=
 
 CFLAGS+=	-DBOOTPROG=\"usbloader\"
 CFLAGS+=	-ffunction-sections -fdata-sections
-CFLAGS+=	-ffreestanding
 CFLAGS+=	-Wformat -Wall
 CFLAGS+=	-g
 CFLAGS+=	-fno-pic
 
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+=	-march=i386
-CFLAGS.gcc+=	-mpreferred-stack-boundary=2
-.endif
 .if ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=	-m32
 .endif

Modified: stable/11/stand/usb/Makefile.test
==============================================================================
--- stable/11/stand/usb/Makefile.test	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/usb/Makefile.test	Mon Feb 12 01:17:06 2018	(r329146)
@@ -38,10 +38,6 @@ SRCS= 
 CFLAGS+= -Wall
 CFLAGS+= -g
 
-.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS+=	-march=i386
-CFLAGS.gcc+=	-mpreferred-stack-boundary=2
-.endif
 .if ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=	-m32
 .endif

Modified: stable/11/stand/userboot/userboot/Makefile
==============================================================================
--- stable/11/stand/userboot/userboot/Makefile	Mon Feb 12 01:08:44 2018	(r329145)
+++ stable/11/stand/userboot/userboot/Makefile	Mon Feb 12 01:17:06 2018	(r329146)
@@ -36,7 +36,6 @@ SRCS+=		vers.c
 
 CFLAGS+=	-Wall
 CFLAGS+=	-I${BOOTSRC}/userboot
-CFLAGS+=	-ffreestanding
 
 CWARNFLAGS.main.c += -Wno-implicit-function-declaration
 



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