Skip to content

Commit

Permalink
LoongArch: vDSO: Use CLANG_FLAGS instead of filtering out '--target='
Browse files Browse the repository at this point in the history
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 <nathan@kernel.org>
Link: ClangBuiltLinux#1787 (comment)
Signed-off-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
  • Loading branch information
xen0n authored and skzn committed Sep 17, 2023
1 parent f6452e9 commit 2acb53f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/loongarch/vdso/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ ccflags-vdso := \
$(filter -E%,$(KBUILD_CFLAGS)) \
$(filter -march=%,$(KBUILD_CFLAGS)) \
$(filter -m%-float,$(KBUILD_CFLAGS)) \
$(CLANG_FLAGS) \
-D__VDSO__

ifeq ($(cc-name),clang)
ccflags-vdso += $(filter --target=%,$(KBUILD_CFLAGS))
endif

cflags-vdso := $(ccflags-vdso) \
-isystem $(shell $(CC) -print-file-name=include) \
$(filter -W%,$(filter-out -Wa$(comma)%,$(KBUILD_CFLAGS))) \
Expand Down

0 comments on commit 2acb53f

Please sign in to comment.