sys/boot: Define _STANDALONE while building.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 20 Nov 2019 07:21:21 +0000 (09:21 +0200)
committerzrj <rimvydas.jasinskas@gmail.com>
Thu, 21 Nov 2019 12:45:13 +0000 (14:45 +0200)
 It will be used to limit visibility.  Do the same for lib/libstand.

lib/libstand/Makefile
sys/boot/dloader/Makefile
sys/boot/efi/Makefile.inc
sys/boot/pc32/Makefile.inc

index 8aef675..1aa6dec 100644 (file)
@@ -21,6 +21,7 @@ LIBSTAND_ARCH?=       ${MACHINE_ARCH}
 LIBC_SRC=      ${LIBSTAND_SRC}/../libc
 
 CFLAGS+=-D_LIBSTAND_
+CFLAGS+=       -D_STANDALONE
 
 # Mostly OK, some of the libc imports are a bit noisy
 CFLAGS+=       -ffreestanding
index 70fc8fb..cf37f69 100644 (file)
@@ -13,6 +13,7 @@ CFLAGS+=      -fno-stack-protector
 .if ${MACHINE_ARCH} != "i386"
 CFLAGS+=       -fPIC -mno-red-zone
 CFLAGS+=       -ffreestanding
+CFLAGS+=       -D_STANDALONE
 .endif
 
 .if ${MACHINE_ARCH} == "x86_64"
index 2f0bba4..9e206dd 100644 (file)
@@ -5,6 +5,7 @@ BINDIR?=        /boot
 # Options used when building app-specific efi components
 # See conf/kern.mk for the correct set of these
 CFLAGS+=       -O
+CFLAGS+=       -D_STANDALONE
 CFLAGS+=       -ffreestanding -Wformat
 CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
 LDFLAGS+=      -nostdlib
index 19de89a..730a3f5 100644 (file)
@@ -5,6 +5,7 @@ __pc32__:
 
 LOADER_ADDRESS?= 0x200000
 WORLD_CCOPTLEVEL=      1 # Force -O1, -O2 implodes
+CFLAGS+=       -D_STANDALONE
 CFLAGS+=       -ffreestanding -fno-omit-frame-pointer
 CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float