Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove cc-ldoption #342

Closed
nickdesaulniers opened this issue Jan 31, 2019 · 14 comments
Closed

remove cc-ldoption #342

nickdesaulniers opened this issue Jan 31, 2019 · 14 comments
Assignees
Labels
[BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2 [TOOL] lld The issue is relevant to LLD linker

Comments

@nickdesaulniers
Copy link
Member

Forked from: ClangBuiltLinux/continuous-integration#122

Some parts of the kernel invoke the linker via $(CC) using -Wl,... flags. This is problematic because setting LD=ld.lld is not enough for this to work correctly.

If compiling with Clang AND linking with LLD, -fuse-ld=lld needs to be added to KBUILD_CFLAGS.

The pixel kernels have a ld-name macro to distinguish between bfd and gold. I've extended them to support lld, but seems the base patch is not upstreamed.

cc @samitolvanen

@nickdesaulniers nickdesaulniers added [BUG] linux A bug that should be fixed in the mainline kernel. [TOOL] lld The issue is relevant to LLD linker labels Jan 31, 2019
@nickdesaulniers nickdesaulniers self-assigned this Jan 31, 2019
@nathanchance
Copy link
Member

Should be a fairly innocuous change to upstream as it isn't tied to upstreaming LTO support.

At the same time though, do we actually need an ld-name variable right now? Wouldn't this change work?

diff --git a/Makefile b/Makefile
index 141653226f3c..5e9781490ea6 100644
--- a/Makefile
+++ b/Makefile
@@ -500,6 +500,9 @@ ifneq ($(GCC_TOOLCHAIN),)
 CLANG_FLAGS	+= --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
 CLANG_FLAGS	+= -no-integrated-as
+ifneq ($(shell $(LD) --version 2>&1 | head -n 1 | grep LLD),)
+CLANG_FLAGS	+= -fuse-ld=lld
+endif
 KBUILD_CFLAGS	+= $(CLANG_FLAGS)
 KBUILD_AFLAGS	+= $(CLANG_FLAGS)
 export CLANG_FLAGS

If we do want to introduce something like ld-name, won't we want to mirror the CC_IS_ and _VERSION kconfig variables, since cc-name was been killed off in favor of those?

@nathanchance
Copy link
Member

Just FYI, the following diff builds and boots on arm64 in QEMU (I built with V=1 to make sure everything shows up as it should), which deals with #340, #341, this issue, and #343.

diff --git a/Makefile b/Makefile
index 18a02e4c611e..aa1d73084fe6 100644
--- a/Makefile
+++ b/Makefile
@@ -492,7 +492,7 @@ endif
 ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
 ifneq ($(CROSS_COMPILE),)
 CLANG_FLAGS    := --target=$(notdir $(CROSS_COMPILE:%-=%))
-GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))
+GCC_TOOLCHAIN_DIR := $(dir $(shell which $(AS)))
 CLANG_FLAGS    += --prefix=$(GCC_TOOLCHAIN_DIR)
 GCC_TOOLCHAIN  := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
 endif
@@ -500,6 +500,10 @@ ifneq ($(GCC_TOOLCHAIN),)
 CLANG_FLAGS    += --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
 CLANG_FLAGS    += -no-integrated-as
+ifneq ($(shell $(LD) --version 2>&1 | head -n 1 | grep LLD),)
+CLANG_FLAGS    += -fuse-ld=lld
+KBUILD_LDFLAGS += -O2
+endif
 KBUILD_CFLAGS  += $(CLANG_FLAGS)
 KBUILD_AFLAGS  += $(CLANG_FLAGS)
 export CLANG_FLAGS
diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
index b215c712d897..41a611256476 100644
--- a/arch/arm64/kernel/vdso/Makefile
+++ b/arch/arm64/kernel/vdso/Makefile
@@ -55,7 +55,7 @@ $(obj-vdso): %.o: %.S FORCE
 
 # Actual build commands
 quiet_cmd_vdsold = VDSOL   $@
-      cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $^ -o $@
+      cmd_vdsold = $(CC) $(c_flags) -Wl,-N -Wl,-T $^ -o $@
 quiet_cmd_vdsoas = VDSOA   $@
       cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $<
 

@nickdesaulniers
Copy link
Member Author

@nathanchance , thanks for testing. If you stripped out the arm64 vdso stuff, I'd sign off on the Makefile change. I think there's more to do for arm64 vdso (both on the lld side, and maybe in that vdso's Makefile. If you could add those links to these separate issues, then give Rui (LLD maintainer) and I suggested by tags, that would be appreciated. Otherwise I will do so myself once I get back from FOSDEM/Brussels.

@nathanchance
Copy link
Member

I went ahead and tested arm32 as well, which now fails to build with LD=ld.lld: https://gist.github.com/9fffddefc50fa9d22983b59f4813145c

I think something is goofy with cc-option with -fuse-ld=lld.

Without that diff:

/usr/bin/ccache clang -Wp,-MD,arch/arm/vdso/.vgettimeofday.o.d  -nostdinc -isystem /home/nathan/cbl/usr/lib/clang/9.0.0/include -I/home/nathan/cbl/ln/arch/arm/include -I./arch/arm/include/generated  -I/home/nathan/cbl/ln/include -I./include -I/home/nathan/cbl/ln/arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I/home/nathan/cbl/ln/include/uapi -I./include/generated/uapi -include /home/nathan/cbl/ln/include/linux/kconfig.h -include /home/nathan/cbl/ln/include/linux/compiler_types.h  -I/home/nathan/cbl/ln/arch/arm/vdso -Iarch/arm/vdso -D__KERNEL__ -mlittle-endian -Qunused-arguments -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 --target=arm-linux-gnueabi --prefix=/home/nathan/cbl/usr/bin/ --gcc-toolchain=/home/nathan/cbl/usr -no-integrated-as -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mfpu=vfp -funwind-tables -marm -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -fno-delete-null-pointer-checks -O2 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -mno-global-merge -Wno-unused-const-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -fPIC -fno-common -fno-builtin -fno-stack-protector -DDISABLE_BRANCH_PROFILING -O2    -DKBUILD_BASENAME='"vgettimeofday"' -DKBUILD_MODNAME='"vgettimeofday"' -c -o arch/arm/vdso/vgettimeofday.o /home/nathan/cbl/ln/arch/arm/vdso/vgettimeofday.c

With that diff:

/usr/bin/ccache clang -Wp,-MD,arch/arm/vdso/.vgettimeofday.o.d  -nostdinc -isystem /home/nathan/cbl/usr/lib/clang/9.0.0/include -I/home/nathan/cbl/ln/arch/arm/include -I./arch/arm/include/generated  -I/home/nathan/cbl/ln/include -I./include -I/home/nathan/cbl/ln/arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I/home/nathan/cbl/ln/include/uapi -I./include/generated/uapi -include /home/nathan/cbl/ln/include/linux/kconfig.h -include /home/nathan/cbl/ln/include/linux/compiler_types.h  -I/home/nathan/cbl/ln/arch/arm/vdso -Iarch/arm/vdso -D__KERNEL__ -mlittle-endian -Qunused-arguments -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror-implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 --target=arm-linux-gnueabi --prefix=/home/nathan/cbl/usr/bin/ --gcc-toolchain=/home/nathan/cbl/usr -no-integrated-as -fuse-ld=lld -mabi=aapcs-linux -mfpu=vfp -funwind-tables -Wa,-mno-warn-deprecated -D__LINUX_ARM_ARCH__=7 -march=armv5t -Wa,-march=armv7-a -msoft-float -Uarm -O2 -fstack-protector-strong -Wno-format-invalid-specifier -Wno-gnu -Wno-address-of-packed-member -Wno-tautological-compare -mno-global-merge -Wno-unused-const-variable -fomit-frame-pointer -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -fno-strict-overflow -fno-merge-all-constants -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-unused-value -Wno-format -Wno-sign-compare -Wno-format-zero-length -Wno-uninitialized -fPIC -fno-common -fno-builtin -fno-stack-protector -DDISABLE_BRANCH_PROFILING -O2    -DKBUILD_BASENAME='"vgettimeofday"' -DKBUILD_MODNAME='"vgettimeofday"' -c -o arch/arm/vdso/vgettimeofday.o /home/nathan/cbl/ln/arch/arm/vdso/vgettimeofday.c

This particular error is coming from the lack of -march=armv7-a (instead, -march=armv5t -Wa,-march=armv7-a is present), which is cc-option'd:

arch-$(CONFIG_CPU_32v7) =-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)

@nathanchance
Copy link
Member

There's also this:

VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd)

Introduced by d2b30cd

@dileks
Copy link
Collaborator

dileks commented Feb 4, 2019

@nathanchance

Ah great. You had similiar ideas and a use-case/test-case. Makes sense to distinguish on $LD_FOR_BUILD aka ld.bfd, ld.gold and ld.lld.

@nickdesaulniers
Copy link
Member Author

nickdesaulniers commented Feb 7, 2019

https://lore.kernel.org/r/[email protected]/

Nathan, please file a separate bug for arm(32) vdso.

@nickdesaulniers nickdesaulniers added the [PATCH] Submitted A patch has been submitted for review label Feb 7, 2019
@nathanchance
Copy link
Member

Done: #356 and #357.

Also, handy trick from the LLD documentation for verifying if something was linked with LLD:

$ readelf --string-dump .comment /mnt/build/kernel/vmlinux

String dump of section '.comment':
  [     0]  Linker: LLD 9.0.0
  [    12]  clang version 9.0.0 (https://github.com/llvm/llvm-project 5c086c310615873a4e6a83e0981c9e680d695819)

kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 18, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 20, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 20, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 20, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
kdrag0n pushed a commit to kdrag0n/proton_bluecross that referenced this issue Feb 20, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
mawrick26 pushed a commit to mawrick26/SDM845_P_9.0 that referenced this issue Feb 21, 2019
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: Eliminater74 <[email protected]>
mawrick26 pushed a commit to mawrick26/SDM845_P_9.0 that referenced this issue Feb 21, 2019
Ripped from Nathan's patch on GitHub by kdrag0n: ClangBuiltLinux/linux#342 (comment)

Signed-off-by: kdrag0n <[email protected]>
Signed-off-by: Eliminater74 <[email protected]>
duhansysl pushed a commit to duhansysl/exynos9810-kernel-V2 that referenced this issue Oct 1, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
Signed-off-by: Chenyang Zhong <[email protected]>
duhansysl pushed a commit to duhansysl/exynos9810-kernel-V2 that referenced this issue Oct 5, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
Signed-off-by: Chenyang Zhong <[email protected]>
ghost pushed a commit to Kurumi-Tokito/lineage_kernel_nokia_sdm660 that referenced this issue Oct 11, 2024
kbuild: Allow forcing the alternative LLD linker via Kconfig

LLD is a relatively new linker from the LLVM Project that aims to be a
faster and more modern alternative to the GNU gold and bfd linkers from
binutils: https://lld.llvm.org/

I've also found that it offers more insightful diagnostics when
something goes wrong, e.g. when there are undefined references. It does
also appear to speed up the overall build time by 4-10s as compared to
ld.bfd.

These new config options will only allow fully-working configurations:
  - gold/lld when Clang LTO is enabled
  - bfd/lld otherwise

Signed-off-by: Danny Lin <[email protected]>
Signed-off-by: Adam W. Willis <[email protected]>
Signed-off-by: Yaroslav Furman <[email protected]>

BACKPORT: FROMLIST: Makefile: lld: set -O2 linker flag when linking w…

…ith LLD

For arm64:
0.34% size improvement with lld -O2 over lld for vmlinux.
3.3% size improvement with lld -O2 over lld for Image.lz4-dtb.

Link: ClangBuiltLinux/linux#343
Suggested-by: Rui Ueyama <[email protected]>
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
(am from https://patchwork.kernel.org/patch/10806729/)
Signed-off-by: Adam W. Willis <[email protected]>
Signed-off-by: Yaroslav Furman <[email protected]>

BACKPORT: FROMLIST: Makefile: lld: tell clang to use lld

This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld={bfd,gold,lld,<absolute path to linker>}.  This
is problematic especially for cc-ldoption, which checks for linker flag
support via invoking the compiler, rather than the BACKPORT: FROMLIST: Makefile: lld: tell clang to use lld

This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld={bfd,gold,lld,<absolute path to linker>}.  This
is problematic especially for cc-ldoption, which checks for linker flag
support via invoking the compiler, rather than the linker.

Select the linker via absolute path from $PATH via `which`. This allows
you to build with:

$ make LD=ld.lld
$ make LD=ld.lld-8
$ make LD=/path/to/ld.lld

Add -Qunused-arguments to KBUILD_CPPFLAGS sooner, as otherwise
Clang likes to complain about -fuse-lld= being unused when compiling but
not linking (-c) such as when cc-option is used. There's no need to
guard with cc-option.

Link: ClangBuiltLinux/linux#342
Link: ClangBuiltLinux/linux#366
Link: ClangBuiltLinux/linux#357
Suggested-by: Nathan Chancellor <[email protected]>
Suggested-by: Masahiro Yamada <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Reviewed-by: Nathan Chancellor <natechancellor@gmail
Signed-off-by: Divyanshu-Modi <[email protected]>
Signed-off-by: Kunmun <[email protected]>
Hadenix pushed a commit to xiaomi-mt6765-devs/android_kernel_xiaomi_mt6765 that referenced this issue Oct 13, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Hadenix pushed a commit to xiaomi-mt6765-devs/android_kernel_xiaomi_mt6765 that referenced this issue Oct 16, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
MocaRafee pushed a commit to Mocaness/WhyredKernel that referenced this issue Nov 9, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
MocaRafee pushed a commit to Mocaness/WhyredKernel that referenced this issue Nov 9, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
MocaRafee pushed a commit to Mocaness/WhyredKernel that referenced this issue Nov 9, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
MocaRafee pushed a commit to Mocaness/WhyredKernel that referenced this issue Nov 9, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
MocaRafee pushed a commit to Mocaness/WhyredKernel that referenced this issue Nov 9, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
k4ngcaribug pushed a commit to k4ngcaribug/kernel_xiaomi_ysl that referenced this issue Nov 15, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Hadenix pushed a commit to xiaomi-mt6765-devs/android_kernel_xiaomi_mt6765 that referenced this issue Nov 22, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
log1cs pushed a commit to log1cs/msm-3.18 that referenced this issue Dec 6, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Signed-off-by: Yousef Algadri <[email protected]>
Signed-off-by: Raphiel Rollerscaperers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_sydney that referenced this issue Dec 17, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_sydney that referenced this issue Dec 18, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Hadenix pushed a commit to xiaomi-mt6765-devs/android_kernel_xiaomi_mt6765 that referenced this issue Dec 27, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Hadenix pushed a commit to xiaomi-mt6765-devs/android_kernel_xiaomi_mt6765 that referenced this issue Dec 27, 2024
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_kirin710 that referenced this issue Jan 3, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_kirin710 that referenced this issue Jan 3, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_kirin710 that referenced this issue Jan 4, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Huawei-Dev pushed a commit to Huawei-Dev/android_kernel_huawei_kirin710 that referenced this issue Jan 4, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
GhostMaster69-dev pushed a commit to AOSP-Silicon/kernel_xiaomi_tulip that referenced this issue Jan 27, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: ironman-reborn <[email protected]>
Signed-off-by: GhostMaster69-dev <[email protected]>
GhostMaster69-dev pushed a commit to AOSP-Silicon/kernel_xiaomi_tulip that referenced this issue Jan 27, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: ironman-reborn <[email protected]>
Signed-off-by: GhostMaster69-dev <[email protected]>
GhostMaster69-dev pushed a commit to AOSP-Silicon/kernel_xiaomi_tulip that referenced this issue Jan 27, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: ironman-reborn <[email protected]>
Signed-off-by: GhostMaster69-dev <[email protected]>
GhostMaster69-dev pushed a commit to AOSP-Silicon/kernel_xiaomi_tulip that referenced this issue Jan 27, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: ironman-reborn <[email protected]>
Signed-off-by: GhostMaster69-dev <[email protected]>
GhostMaster69-dev pushed a commit to AOSP-Silicon/kernel_xiaomi_tulip that referenced this issue Jan 27, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Signed-off-by: ironman-reborn <[email protected]>
Signed-off-by: GhostMaster69-dev <[email protected]>
eun0115 pushed a commit to eun0115/android_kernel_samsung_wisdom that referenced this issue Feb 3, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
eun0115 pushed a commit to eun0115/android_kernel_samsung_wisdom that referenced this issue Feb 3, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
eun0115 pushed a commit to eun0115/android_kernel_samsung_wisdom that referenced this issue Feb 3, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
ItsVixano pushed a commit to hisi-oss/android_kernel_huawei_hi3660 that referenced this issue Feb 6, 2025
This is needed because clang doesn't select which linker to use based on
$LD but rather -fuse-ld=lld. This is problematic especially for
cc-ldoption, which checks for linker flag support via invoking the
compiler, rather than the linker.

(am from https://lkml.org/lkml/2019/2/11/1947)

Bug: 63740206
Change-Id: I3edf2f0f6c0bac842bef22194bd48a993fc0e3c0
Link: ClangBuiltLinux/linux#342
Suggested-by: Nathan Chancellor <[email protected]>
Reviewed-by: Nathan Chancellor <[email protected]>
Tested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Nick Desaulniers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[BUG] linux A bug that should be fixed in the mainline kernel. [FIXED][LINUX] 5.2 This bug was fixed in Linux 5.2 [TOOL] lld The issue is relevant to LLD linker
Projects
None yet
Development

No branches or pull requests

3 participants