heads/patches/coreboot-4.8.1/0010-cross-compiler-support.patch

28 lines
1021 B
Diff
Raw Normal View History

--- clean/coreboot-4.8.1/Makefile 2018-05-16 21:00:17.000000000 +0200
+++ coreboot-4.8.1/Makefile 2020-01-08 17:01:32.998287979 +0100
@@ -152,6 +152,24 @@
-include .xcompile
+ifneq "$(CROSS)" ""
+ $(info coreboot: Using $(CROSS)gcc)
+ CROSS_COMPILE_x86_32 := $(CROSS)
+ CC_x86_32 := $(CROSS_COMPILE_x86_32)gcc
+ CPP_x86_32 := $(CROSS_COMPILE_x86_32)cpp
+ AS_x86_32 := $(CROSS_COMPILE_x86_32)as --32
+ LD_x86_32 := $(CROSS_COMPILE_x86_32)ld.bfd -b elf32-i386 -melf_i386
+ NM_x86_32 := $(CROSS_COMPILE_x86_32)nm
+ OBJCOPY_x86_32 := $(CROSS_COMPILE_x86_32)objcopy
+ OBJDUMP_x86_32 := $(CROSS_COMPILE_x86_32)objdump
+ READELF_x86_32 := $(CROSS_COMPILE_x86_32)readelf
+ STRIP_x86_32 := $(CROSS_COMPILE_x86_32)strip
+ AR_x86_32 := $(CROSS_COMPILE_x86_32)ar
+ GNATBIND_x86_32 := $(CROSS_COMPILE_x86_32)gnatbind
+ COMPILER_RT_x86_32 := $(shell $(CC_x86_32) --print-libgcc-file-name)
+endif
+
+
ifneq ($(XCOMPILE_COMPLETE),1)
$(shell rm -f .xcompile)
$(error .xcompile deleted because it's invalid. \