Skip to content

Commit b89673a

Browse files
xen0nchenhuacai
authored andcommitted
LoongArch: vDSO: Use CLANG_FLAGS instead of filtering out '--target='
This is a port of commit 76d7fff ("MIPS: VDSO: Use CLANG_FLAGS instead of filtering out '--target='") to arch/loongarch, for fixing cross-compilation with Clang. Reported-by: Nathan Chancellor <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Link: ClangBuiltLinux/linux#1787 (comment) Signed-off-by: WANG Xuerui <[email protected]> Signed-off-by: Huacai Chen <[email protected]>
1 parent 38b10b2 commit b89673a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

arch/loongarch/vdso/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ ccflags-vdso := \
1212
$(filter -E%,$(KBUILD_CFLAGS)) \
1313
$(filter -march=%,$(KBUILD_CFLAGS)) \
1414
$(filter -m%-float,$(KBUILD_CFLAGS)) \
15+
$(CLANG_FLAGS) \
1516
-D__VDSO__
1617

17-
ifeq ($(cc-name),clang)
18-
ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
19-
endif
20-
2118
cflags-vdso := $(ccflags-vdso) \
2219
-isystem $(shell $(CC) -print-file-name=include) \
2320
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \

0 commit comments

Comments
 (0)