Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Mar 2021 09:44:07 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 01fe4cac28d0 - main - kern.mk: Fix wrong variable being used for linker path after 172a624f0
Message-ID:  <202103080944.1289i7uY024208@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3

commit 01fe4cac28d0b5ab2b8f4ef081fd3c81dcbb4df3
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-03-08 09:37:39 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-03-08 09:37:46 +0000

    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")
---
 sys/conf/kern.mk | 4 ++--
 1 file 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103080944.1289i7uY024208>