[PATCH] openpcd[master]: firmware: Makefiles: enable changing toolchain

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Oct 5 01:27:43 UTC 2017


Review at  https://gerrit.osmocom.org/4140

firmware: Makefiles: enable changing toolchain

Without that the user was expected to either patch
the Makefiles or to get a toolchain with the arm-elf-
prefix.

Change-Id: I0c362cde7afd6de025e8fe2c1e9abe3d3a1e04a6
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
M firmware/Makefile
M firmware/Makefile.dfu
2 files changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openpcd refs/changes/40/4140/1

diff --git a/firmware/Makefile b/firmware/Makefile
index 350b0dc..1581a1f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -352,12 +352,13 @@
 
 # Define programs and commands.
 SHELL = sh
-CC = arm-elf-gcc
-CPP = arm-elf-g++
-OBJCOPY = arm-elf-objcopy
-OBJDUMP = arm-elf-objdump
-SIZE = arm-elf-size
-NM = arm-elf-nm
+CROSS_COMPILE ?= arm-elf-
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CROSS_COMPILE)g++
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
+SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
 REMOVE = rm -f
 COPY = cp
 
diff --git a/firmware/Makefile.dfu b/firmware/Makefile.dfu
index 3c797ef..1e9e71c 100644
--- a/firmware/Makefile.dfu
+++ b/firmware/Makefile.dfu
@@ -303,12 +303,13 @@
 
 # Define programs and commands.
 SHELL = sh
-CC = arm-elf-gcc
-CPP = arm-elf-g++
-OBJCOPY = arm-elf-objcopy
-OBJDUMP = arm-elf-objdump
-SIZE = arm-elf-size
-NM = arm-elf-nm
+CROSS_COMPILE ?= arm-elf-
+CC = $(CROSS_COMPILE)gcc
+CPP = $(CROSS_COMPILE)g++
+OBJCOPY = $(CROSS_COMPILE)objcopy
+OBJDUMP = $(CROSS_COMPILE)objdump
+SIZE = $(CROSS_COMPILE)size
+NM = $(CROSS_COMPILE)nm
 REMOVE = rm -f
 COPY = cp
 

-- 
To view, visit https://gerrit.osmocom.org/4140
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c362cde7afd6de025e8fe2c1e9abe3d3a1e04a6
Gerrit-PatchSet: 1
Gerrit-Project: openpcd
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list