Page MenuHomeFreeBSD

D31047.id92418.diff
No OneTemporary

D31047.id92418.diff

Index: stand/defs.mk
===================================================================
--- stand/defs.mk
+++ stand/defs.mk
@@ -24,6 +24,12 @@
# enough to make that hassle worth chasing.
_CPUCFLAGS=
+.if ${LDFLAGS:M-nostdlib}
+# Sanitizers won't work unless we link against libc (e.g. in userboot/test).
+MK_ASAN:= no
+MK_UBSAN:= no
+.endif
+
.include <src.opts.mk>
.include <bsd.linker.mk>
Index: stand/userboot/userboot/Makefile
===================================================================
--- stand/userboot/userboot/Makefile
+++ stand/userboot/userboot/Makefile
@@ -6,6 +6,9 @@
LOADER_EXT2FS_SUPPORT?= no
PIC=yes
+# Note: -nostdlib needs to be added to LDFLAGS before including defs.mk
+LDFLAGS+= -nostdlib -Wl,-Bsymbolic
+
.include <bsd.init.mk>
SHLIB_NAME= userboot_${LOADER_INTERP}.so
@@ -39,8 +42,6 @@
CFLAGS.gfx_fb.c+= -I$(SRCTOP)/sys/teken -I${SRCTOP}/contrib/pnglite
CWARNFLAGS.main.c += -Wno-implicit-function-declaration
-LDFLAGS+= -nostdlib -Wl,-Bsymbolic
-
NEWVERSWHAT= "User boot ${LOADER_INTERP}" ${MACHINE_CPUARCH}
VERSION_FILE= ${.CURDIR}/../userboot/version

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 7:42 PM (18 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14541545
Default Alt Text
D31047.id92418.diff (1 KB)

Event Timeline