forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lld, the LLVM linker, can link recent mainline Linux kernel. This commit adds lld support to lkl for x86_64 Linux host with clang. To build with lld, invoke make like below: make -C tools/lkl CC=clang LD=ld.lld Signed-off-by: Akira Moroo <[email protected]>
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
export OUTPUT_FORMAT=$(shell $(LD) -r -print-output-format) | ||
ifneq ($(shell $(LD) --version 2>&1 | head -n 1 | grep LLD),) | ||
CC_TARGET=$(shell $(CC) --version 2>&1 | grep Target | cut -d " " -f2) | ||
ifeq ($(CC_TARGET),x86_64-unknown-linux-gnu) | ||
export OUTPUT_FORMAT=elf64-x86-64 | ||
endif | ||
else | ||
export OUTPUT_FORMAT=$(shell $(LD) -r -print-output-format) | ||
endif | ||
export EXEC_FORMAT=$(shell echo $(OUTPUT_FORMAT) | cut -d - -f1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters