Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/linux-sunxi/sunxi-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Nortmann <bernhard.nortmann@web.de>2017-02-11 15:50:14 +0300
committerBernhard Nortmann <bernhard.nortmann@web.de>2017-02-11 16:02:33 +0300
commitd5f5d5d1ad70aae6cbd23ed1a39d58b5b4315f49 (patch)
treee6f8c43885cf4690c7f25fb11c352fbf3ab38264 /Makefile
parent5e8ea17382b2037f0cc85995be9851e8129048fc (diff)
Makefile: Improve auto-detection of ARM cross compiler
This patch moves the scan for an ARM gcc into a separate shell script. To prevent against recursion issues, the new script adds "-maxdepth 1" to the find invocation; and it now also correctly handles directories in $PATH that contain spaces in their name. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6234742..4e95726 100644
--- a/Makefile
+++ b/Makefile
@@ -56,8 +56,8 @@ MKSUNXIBOOT ?= mksunxiboot
PATH_DIRS := $(shell echo $$PATH | sed -e 's/:/ /g')
# Try to guess a suitable default ARM cross toolchain
CROSS_DEFAULT := arm-none-eabi-
-CROSS_COMPILE ?= $(or $(shell find $(PATH_DIRS) -executable -name 'arm*-gcc' -printf '%f\t' 2>/dev/null | cut -f 1 | sed -e 's/-gcc/-/'),$(CROSS_DEFAULT))
-CROSS_CC ?= $(CROSS_COMPILE)gcc
+CROSS_COMPILE ?= $(or $(shell ./find-arm-gcc.sh),$(CROSS_DEFAULT))
+CROSS_CC := $(CROSS_COMPILE)gcc
DESTDIR ?=
PREFIX ?= /usr/local