aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson@FreeBSD.org>2021-03-08 09:37:39 +0000
committerAlex Richardson <arichardson@FreeBSD.org>2021-03-08 09:37:46 +0000
commit01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3 (patch)
treea7c43460f7d1ffda9927f6fcdac77618b7f6c7f4
parente0fd837a30bd9e6b0046db9d459fce8b2fc89cce (diff)
downloadsrc-01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3.tar.gz
src-01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3.zip
kern.mk: Fix wrong variable being used for linker path after 172a624f0
When I synchronized kern.mk with bsd.sys.mk, I accidentally changed CCLDFLAGS to LDFLAGS which is not used by the kernel builds. This commit should unbreak the GitHub actions cross-build CI. I didn't notice it locally because cheribuild already passes -fuse-ld in the linker flags as it predates this being done in the makefiles. Reported By: Jose Luis Duran Fixes: 172a624f0 ("Silence annoying and incorrect non-default linker warning with GCC")
-rw-r--r--sys/conf/kern.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk
index 8cc79e6645ad..b0a26cd1680c 100644
--- a/sys/conf/kern.mk
+++ b/sys/conf/kern.mk
@@ -283,9 +283,9 @@ CFLAGS+= -std=${CSTD}
.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}
+CCLDFLAGS+= --ld-path=${LD:[1]:S/^ld.//1W}
.else
-LDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}
+CCLDFLAGS+= -fuse-ld=${LD:[1]:S/^ld.//1W}
.endif
.else
# GCC does not support an absolute path for -fuse-ld so we just print this