diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2022-05-04 14:17:38 +0200 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2022-05-04 14:17:38 +0200 |
commit | b7bd9863dc2f0a055e0c4bc065e071c4b1863647 (patch) | |
tree | da9f78c0b810bfacf10da02b69225e22c52da13c /Makefile | |
parent | 8ac22f79c47205d017ee2a83bb56ad9a5569f032 (diff) | |
parent | a5d36574fc787e96e56671eb1b0eaef58e980ca8 (diff) | |
download | arm-trusted-firmware-b7bd9863dc2f0a055e0c4bc065e071c4b1863647.tar.gz |
Merge changes from topic "hm/make-refactor" into integration
* changes:
docs(prerequisites): use LLVM utilities to build with clang
build(make): use clang binutils to compile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -263,24 +263,24 @@ ENABLE_FEAT_RNG = $(if $(findstring rng,${arch-features}),1,0) # Determine if FEAT_SB is supported ENABLE_FEAT_SB = $(if $(findstring sb,${arch-features}),1,0) -ifneq ($(findstring armclang,$(notdir $(CC))),) -TF_CFLAGS_aarch32 = -target arm-arm-none-eabi $(march32-directive) -TF_CFLAGS_aarch64 = -target aarch64-arm-none-eabi $(march64-directive) -LD = $(LINKER) -AS = $(CC) -c -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) -CPP = $(CC) -E $(TF_CFLAGS_$(ARCH)) -PP = $(CC) -E $(TF_CFLAGS_$(ARCH)) -else ifneq ($(findstring clang,$(notdir $(CC))),) -CLANG_CCDIR = $(if $(filter-out ./,$(dir $(CC))),$(dir $(CC)),) -TF_CFLAGS_aarch32 = $(target32-directive) $(march32-directive) -TF_CFLAGS_aarch64 = -target aarch64-elf $(march64-directive) -LD = $(CLANG_CCDIR)ld.lld -ifeq (, $(shell which $(LD))) -$(error "No $(LD) in PATH, make sure it is installed or set LD to a different linker") -endif -AS = $(CC) -c -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) -CPP = $(CC) -E -PP = $(CC) -E +ifneq ($(findstring clang,$(notdir $(CC))),) + ifneq ($(findstring armclang,$(notdir $(CC))),) + TF_CFLAGS_aarch32 := -target arm-arm-none-eabi $(march32-directive) + TF_CFLAGS_aarch64 := -target aarch64-arm-none-eabi $(march64-directive) + LD := $(LINKER) + else + TF_CFLAGS_aarch32 := $(target32-directive) $(march32-directive) + TF_CFLAGS_aarch64 := -target aarch64-elf $(march64-directive) + LD := $(shell $(CC) --print-prog-name ld.lld) + + AR := $(shell $(CC) --print-prog-name llvm-ar) + OD := $(shell $(CC) --print-prog-name llvm-objdump) + OC := $(shell $(CC) --print-prog-name llvm-objcopy) + endif + + CPP := $(CC) -E $(TF_CFLAGS_$(ARCH)) + PP := $(CC) -E $(TF_CFLAGS_$(ARCH)) + AS := $(CC) -c -x assembler-with-cpp $(TF_CFLAGS_$(ARCH)) else ifneq ($(findstring gcc,$(notdir $(CC))),) TF_CFLAGS_aarch32 = $(march32-directive) TF_CFLAGS_aarch64 = $(march64-directive) |