diff options
author | David Lechner <david@pybricks.com> | 2019-12-21 14:22:26 -0600 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-12-27 23:53:16 +1100 |
commit | e79424d672919bfc59862d14f2d9e78e43e8582e (patch) | |
tree | 8be4a5782054d0bf3f8ab40378237cdd47a8fcea | |
parent | d56bc6e03d842b1a2c91c987ba936752d0c2fe1b (diff) |
ports: Allow overriding CROSS_COMPILE in a custom makefile.
Many ports already allow overriding CROSS_COMPILE. This modifies the
remaining ports to allow it as well.
-rw-r--r-- | ports/bare-arm/Makefile | 2 | ||||
-rw-r--r-- | ports/esp8266/Makefile | 2 | ||||
-rw-r--r-- | ports/minimal/Makefile | 2 | ||||
-rw-r--r-- | ports/nrf/Makefile | 2 | ||||
-rw-r--r-- | ports/pic16bit/Makefile | 2 | ||||
-rw-r--r-- | ports/powerpc/Makefile | 2 | ||||
-rwxr-xr-x | ports/stm32/mboot/Makefile | 2 | ||||
-rw-r--r-- | ports/teensy/Makefile | 4 |
8 files changed, 9 insertions, 9 deletions
diff --git a/ports/bare-arm/Makefile b/ports/bare-arm/Makefile index 7cb343281..800f4093d 100644 --- a/ports/bare-arm/Makefile +++ b/ports/bare-arm/Makefile @@ -6,7 +6,7 @@ QSTR_DEFS = qstrdefsport.h # include py core make definitions include $(TOP)/py/py.mk -CROSS_COMPILE = arm-none-eabi- +CROSS_COMPILE ?= arm-none-eabi- INC += -I. INC += -I$(TOP) diff --git a/ports/esp8266/Makefile b/ports/esp8266/Makefile index f534eb689..9a7476c10 100644 --- a/ports/esp8266/Makefile +++ b/ports/esp8266/Makefile @@ -39,7 +39,7 @@ PORT ?= /dev/ttyACM0 BAUD ?= 115200 FLASH_MODE ?= qio FLASH_SIZE ?= detect -CROSS_COMPILE = xtensa-lx106-elf- +CROSS_COMPILE ?= xtensa-lx106-elf- ESP_SDK = $(shell $(CC) -print-sysroot)/usr INC += -I. diff --git a/ports/minimal/Makefile b/ports/minimal/Makefile index f26a7ec97..d8afa068d 100644 --- a/ports/minimal/Makefile +++ b/ports/minimal/Makefile @@ -9,7 +9,7 @@ QSTR_DEFS = qstrdefsport.h include $(TOP)/py/py.mk ifeq ($(CROSS), 1) -CROSS_COMPILE = arm-none-eabi- +CROSS_COMPILE ?= arm-none-eabi- endif INC += -I. diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 2ac654911..836a89c20 100644 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -47,7 +47,7 @@ MICROPY_VFS_FAT ?= 0 MPY_CROSS = ../../mpy-cross/mpy-cross MPY_TOOL = ../../tools/mpy-tool.py -CROSS_COMPILE = arm-none-eabi- +CROSS_COMPILE ?= arm-none-eabi- INC += -I. INC += -I../.. diff --git a/ports/pic16bit/Makefile b/ports/pic16bit/Makefile index 8a931979d..fa6de38e3 100644 --- a/ports/pic16bit/Makefile +++ b/ports/pic16bit/Makefile @@ -7,7 +7,7 @@ QSTR_DEFS = qstrdefsport.h include $(TOP)/py/py.mk XC16 = /opt/microchip/xc16/v1.35 -CROSS_COMPILE = $(XC16)/bin/xc16- +CROSS_COMPILE ?= $(XC16)/bin/xc16- PARTFAMILY = dsPIC33F PART = 33FJ256GP506 diff --git a/ports/powerpc/Makefile b/ports/powerpc/Makefile index 30474df1d..d869ebc4f 100644 --- a/ports/powerpc/Makefile +++ b/ports/powerpc/Makefile @@ -9,7 +9,7 @@ include $(TOP)/py/py.mk ARCH = $(shell uname -m) ifneq ("$(ARCH)", "ppc64") ifneq ("$(ARCH)", "ppc64le") - CROSS_COMPILE = powerpc64le-linux- + CROSS_COMPILE ?= powerpc64le-linux- endif endif diff --git a/ports/stm32/mboot/Makefile b/ports/stm32/mboot/Makefile index 19635b918..9e5673300 100755 --- a/ports/stm32/mboot/Makefile +++ b/ports/stm32/mboot/Makefile @@ -34,7 +34,7 @@ OPENOCD ?= openocd OPENOCD_CONFIG ?= boards/openocd_stm32f4.cfg STARTUP_FILE ?= lib/stm32lib/CMSIS/STM32$(MCU_SERIES_UPPER)xx/Source/Templates/gcc/startup_$(CMSIS_MCU_LOWER).o -CROSS_COMPILE = arm-none-eabi- +CROSS_COMPILE ?= arm-none-eabi- INC += -I. INC += -I.. diff --git a/ports/teensy/Makefile b/ports/teensy/Makefile index 663a86fab..769b7e39d 100644 --- a/ports/teensy/Makefile +++ b/ports/teensy/Makefile @@ -20,10 +20,10 @@ endif ifeq ($(USE_ARDUINO_TOOLCHAIN),1) $(info Using ARDUINO toolchain) -CROSS_COMPILE = $(ARDUINO)/hardware/tools/arm-none-eabi/bin/arm-none-eabi- +CROSS_COMPILE ?= $(ARDUINO)/hardware/tools/arm-none-eabi/bin/arm-none-eabi- else $(info Using toolchain from PATH) -CROSS_COMPILE = arm-none-eabi- +CROSS_COMPILE ?= arm-none-eabi- endif CFLAGS_TEENSY = -DF_CPU=96000000 -DUSB_SERIAL -D__MK20DX256__ |