Page MenuHomeFreeBSD

D52330.id161355.diff
No OneTemporary

D52330.id161355.diff

diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -368,9 +368,11 @@
.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".
.if ${COMPILER_TYPE} == "clang"
-# Note: Clang does not like relative paths for ld so we map ld.lld -> lld.
-.if ${COMPILER_VERSION} >= 120000
-LDFLAGS+= --ld-path=${LD:[1]:S/^ld.//1W}
+# Note: old Clang does not like relative paths for ld so we map ld.lld -> lld.
+.if ${COMPILER_VERSION} >= 200000
+# noop: we are fine
+.elseif ${COMPILER_VERSION} >= 120000
+LDFLAGS+= --ld-path=${LD:[1]:S/^//1W}
.else
LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}
.endif
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -383,8 +383,10 @@
.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".
.if ${COMPILER_TYPE} == "clang"
-# Note: Clang does not like relative paths for ld so we map ld.lld -> lld.
-.if ${COMPILER_VERSION} >= 120000
+# Note: old Clang does not like relative paths for ld so we map ld.lld -> lld.
+.if ${COMPILER_VERSION} >= 200000
+# noop: we are fine
+.elseif ${COMPILER_VERSION} >= 120000
CCLDFLAGS+= --ld-path=${LD:[1]:S/^ld.//1W}
.else
CCLDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}

File Metadata

Mime Type
text/plain
Expires
Sun, May 17, 9:24 PM (10 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33210446
Default Alt Text
D52330.id161355.diff (1 KB)

Event Timeline