Skip to content
This repository has been archived by the owner on Dec 28, 2020. It is now read-only.

Commit

Permalink
vdso32: Invoke clang with correct path to GCC toolchain
Browse files Browse the repository at this point in the history
Clang needs to have access to a GCC toolchain which we advertise using
the command line option --gcc-toolchain=. Clang previously picked the
wrong toolchain which resulted in the following error message:

/..//bin/as: unrecognized option '-EL'

Bug: 123422077
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Change-Id: I3e339dd446b71e2c75eb9e2c186eba715b3771cd
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
  • Loading branch information
danielmentzgoogle authored and 0ctobot committed Jun 7, 2019
1 parent a0ac121 commit 3ca50b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions arch/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ ifeq ($(CONFIG_COMPAT_VDSO), y)
else ifeq ($(cc-name),clang)
export CLANG_TRIPLE_ARM32 ?= $(CROSS_COMPILE_ARM32)
export CLANG_TARGET_ARM32 := --target=$(notdir $(CLANG_TRIPLE_ARM32:%-=%))
export GCC_TOOLCHAIN32_DIR := $(dir $(shell which $(CROSS_COMPILE_ARM32)ld))
export GCC_TOOLCHAIN32 := $(realpath $(GCC_TOOLCHAIN32_DIR)/..)
export CLANG_PREFIX32 := --prefix=$(GCC_TOOLCHAIN32_DIR)
export CLANG_GCC32_TC := --gcc-toolchain=$(GCC_TOOLCHAIN32)
export CONFIG_VDSO32 := y
vdso32 := -DCONFIG_VDSO32=1
else ifeq ($(shell which $(CROSS_COMPILE_ARM32)$(cc-name) 2> /dev/null),)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kernel/vdso32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# A mix between the arm64 and arm vDSO Makefiles.

ifeq ($(cc-name),clang)
CC_ARM32 := $(CC) $(CLANG_TARGET_ARM32) -no-integrated-as
CC_ARM32 := $(CC) $(CLANG_TARGET_ARM32) -no-integrated-as $(CLANG_GCC32_TC) $(CLANG_PREFIX32)
else
CC_ARM32 := $(CROSS_COMPILE_ARM32)$(cc-name)
endif
Expand Down

0 comments on commit 3ca50b6

Please sign in to comment.