From 41051c8df5fc46894297da795dea44af2a9b0fa3 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 24 Sep 2023 02:39:44 +0000 Subject: [PATCH] support clang build Signed-off-by: luofeng14 --- 0001-1.patch | 38 ++++++++++++++++++++++++++++++++++++++ arm-trusted-firmware.spec | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 0001-1.patch diff --git a/0001-1.patch b/0001-1.patch new file mode 100644 index 0000000..6e21d35 --- /dev/null +++ b/0001-1.patch @@ -0,0 +1,38 @@ +From 719c0679847492876912994bcee010d5c13fb338 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Sun, 24 Sep 2023 10:25:26 +0800 +Subject: [PATCH] 1 + +--- + Makefile | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2c5748f..0a91c5d 100644 +--- a/Makefile ++++ b/Makefile +@@ -186,10 +186,10 @@ endif + # Toolchain + ################################################################################ + +-HOSTCC := gcc ++HOSTCC := ${CC} + export HOSTCC + +-CC := ${CROSS_COMPILE}gcc ++# CC := ${CROSS_COMPILE}gcc + CPP := ${CROSS_COMPILE}cpp + AS := ${CROSS_COMPILE}gcc + AR := ${CROSS_COMPILE}ar +@@ -206,6 +206,8 @@ ifneq ($(strip $(wildcard ${LD}.bfd) \ + LINKER := ${LINKER}.bfd + endif + ++@echo STATUS "=====LD============ ${LINKER}" ++ + ifeq (${ARM_ARCH_MAJOR},7) + target32-directive = -target arm-none-eabi + # Will set march32-directive from platform configuration +-- +2.19.1 + diff --git a/arm-trusted-firmware.spec b/arm-trusted-firmware.spec index 5bbb5bd..6b5079f 100644 --- a/arm-trusted-firmware.spec +++ b/arm-trusted-firmware.spec @@ -10,6 +10,8 @@ Source0: https://github.com/ARM-software/arm-trusted-firmware/archive/v%{v ExclusiveArch: aarch64 BuildRequires: dtc +Patch: 0001-1.patch + %description Trusted Firmware-A is a reference implementation of secure world software for Arm A-Profile architectures (Armv8-A and Armv7-A), including an Exception Level 3 (EL3) Secure Monitor. -- Gitee