Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168371708
D26591.id77646.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
811 B
Referenced Files
None
Subscribers
None
D26591.id77646.diff
View Options
Index: share/mk/bsd.sys.mk
===================================================================
--- share/mk/bsd.sys.mk
+++ share/mk/bsd.sys.mk
@@ -296,10 +296,13 @@
# Please keep this if in sync with kern.mk
.if ${LD} != "ld" && (${CC:[1]:H} != ${LD:[1]:H} || ${LD:[1]:T} != "ld")
# Add -fuse-ld=${LD} if $LD is in a different directory or not called "ld".
-# Note: Clang 12+ will prefer --ld-path= over -fuse-ld=.
.if ${COMPILER_TYPE} == "clang"
+.if ${COMPILER_VERSION} >= 120000
+LDFLAGS+= --ld-path=${LD:[1]:S/^ld.//1W}
+.else
# Note: Clang does not like relative paths in -fuse-ld so we map ld.lld -> lld.
LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}
+.endif
.else
# GCC does not support an absolute path for -fuse-ld so we just print this
# warning instead and let the user add the required symlinks.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Aug 28, 8:12 PM (4 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37481458
Default Alt Text
D26591.id77646.diff (811 B)
Attached To
Mode
D26591: Prefer --ld-path=/path/to/ld on clang >= 12.
Attached
Detach File
Event Timeline
Log In to Comment