Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102115788
D31047.id92418.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31047.id92418.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D31047: Fix build of stand/ when building world with ASAN
Attached
Detach File
Event Timeline
Log In to Comment