diff options
author | Bernhard Nortmann <bernhard.nortmann@web.de> | 2017-02-11 15:50:14 +0300 |
---|---|---|
committer | Bernhard Nortmann <bernhard.nortmann@web.de> | 2017-02-11 16:02:33 +0300 |
commit | d5f5d5d1ad70aae6cbd23ed1a39d58b5b4315f49 (patch) | |
tree | e6f8c43885cf4690c7f25fb11c352fbf3ab38264 /Makefile | |
parent | 5e8ea17382b2037f0cc85995be9851e8129048fc (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-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |