diff options
-rw-r--r-- | Makefile.toolchain | 1 | ||||
-rw-r--r-- | core/cortex-m/build.mk | 12 | ||||
-rw-r--r-- | core/cortex-m0/build.mk | 11 |
3 files changed, 19 insertions, 5 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index 6f52c374ca..c2e952d43b 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -31,7 +31,6 @@ ifeq ($(cc-name),gcc) cxx-name:=g++ else cxx-name:=clang++ -CROSS_COMPILE_arm:=arm-none-eabi- endif # Try not to assume too much about optional tools and prefixes diff --git a/core/cortex-m/build.mk b/core/cortex-m/build.mk index cab5fab0f4..bcffe16e8d 100644 --- a/core/cortex-m/build.mk +++ b/core/cortex-m/build.mk @@ -6,10 +6,18 @@ # Cortex-M4 core OS files build # -# Use coreboot-sdk + +ifeq ($(cc-name),gcc) +# coreboot sdk +CROSS_COMPILE_ARM_DEFAULT:=/opt/coreboot-sdk/bin/arm-eabi- +else +# llvm sdk +CROSS_COMPILE_ARM_DEFAULT:=armv7m-cros-eabi- +endif + $(call set-option,CROSS_COMPILE,\ $(CROSS_COMPILE_arm),\ - /opt/coreboot-sdk/bin/arm-eabi-) + $(CROSS_COMPILE_ARM_DEFAULT)) # FPU compilation flags CFLAGS_FPU-$(CONFIG_FPU)=-mfloat-abi=hard diff --git a/core/cortex-m0/build.mk b/core/cortex-m0/build.mk index 6777e8edda..eab2a1eb1c 100644 --- a/core/cortex-m0/build.mk +++ b/core/cortex-m0/build.mk @@ -6,10 +6,17 @@ # Cortex-M0 core OS files build # -# Use coreboot-sdk +ifeq ($(cc-name),gcc) +# coreboot sdk +CROSS_COMPILE_ARM_DEFAULT:=/opt/coreboot-sdk/bin/arm-eabi- +else +# llvm sdk +CROSS_COMPILE_ARM_DEFAULT:=arm-none-eabi- +endif + $(call set-option,CROSS_COMPILE,\ $(CROSS_COMPILE_arm),\ - /opt/coreboot-sdk/bin/arm-eabi-) + $(CROSS_COMPILE_ARM_DEFAULT)) # CPU specific compilation flags CFLAGS_CPU+=-mthumb |