summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2023-06-01 11:46:33 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 19:54:25 +0100
commite4ccf8ec27613262fbb5966979e11cdc8117463d (patch)
tree5edcdb12e92cf0f28184dfbbca2425e7d94fef90 /arch
parent1234c16941e824585dc9434b314b1072af0e07ac (diff)
downloadlinux-e4ccf8ec27613262fbb5966979e11cdc8117463d.tar.gz
linux-e4ccf8ec27613262fbb5966979e11cdc8117463d.tar.bz2
linux-e4ccf8ec27613262fbb5966979e11cdc8117463d.zip
powerpc/vdso: Include CLANG_FLAGS explicitly in ldflags-y
[ Upstream commit a7e5eb53bf9b800d086e2ebcfebd9a3bb16bd1b0 ] A future change will move CLANG_FLAGS from KBUILD_{A,C}FLAGS to KBUILD_CPPFLAGS so that '--target' is available while preprocessing. When that occurs, the following error appears when building the compat PowerPC vDSO: clang: error: unsupported option '-mbig-endian' for target 'x86_64-pc-linux-gnu' make[3]: *** [.../arch/powerpc/kernel/vdso/Makefile:76: arch/powerpc/kernel/vdso/vdso32.so.dbg] Error 1 Explicitly add CLANG_FLAGS to ldflags-y, so that '--target' will always be present. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Stable-dep-of: d677ce521334 ("powerpc/vdso: Drop -mstack-protector-guard flags in 32-bit files with clang") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/vdso/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/vdso/Makefile b/arch/powerpc/kernel/vdso/Makefile
index 7e69e87fbf74..84a513c1af33 100644
--- a/arch/powerpc/kernel/vdso/Makefile
+++ b/arch/powerpc/kernel/vdso/Makefile
@@ -53,7 +53,7 @@ UBSAN_SANITIZE := n
KASAN_SANITIZE := n
ccflags-y := -fno-common -fno-builtin
-ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack
+ldflags-y := -Wl,--hash-style=both -nostdlib -shared -z noexecstack $(CLANG_FLAGS)
ldflags-$(CONFIG_LD_IS_LLD) += $(call cc-option,--ld-path=$(LD),-fuse-ld=lld)
# Filter flags that clang will warn are unused for linking
ldflags-y += $(filter-out $(CC_FLAGS_FTRACE) -Wa$(comma)%, $(KBUILD_CFLAGS))