From 697e73f9951e6e54fce59f21bf53e1d7aeefba91 Mon Sep 17 00:00:00 2001 From: louist103 <35883445+louist103@users.noreply.github.com> Date: Sun, 14 Jan 2024 10:48:07 -0500 Subject: [PATCH] Allow the mips tool chain to be picked via command argument (#1532) * makefile change * move variable --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 9741d456ce..22860ccde1 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,8 @@ OBJDUMP_BUILD ?= 0 ASM_PROC_FORCE ?= 0 # Number of threads to disassmble, extract, and compress with N_THREADS ?= $(shell nproc) - +#MIPS toolchain +MIPS_BINUTILS_PREFIX ?= mips-linux-gnu- #### Setup #### # Ensure the map file being created using English localization @@ -64,11 +65,8 @@ else endif #### Tools #### - -ifeq ($(shell type mips-linux-gnu-ld >/dev/null 2>/dev/null; echo $$?), 0) - MIPS_BINUTILS_PREFIX := mips-linux-gnu- -else - $(error Please install or build mips-linux-gnu) +ifneq ($(shell type $(MIPS_BINUTILS_PREFIX)ld >/dev/null 2>/dev/null; echo $$?), 0) + $(error Unable to find $(MIPS_BINUTILS_PREFIX)ld. Please install or build MIPS binutils, commonly mips-linux-gnu. (or set MIPS_BINUTILS_PREFIX if your MIPS binutils install uses another prefix)) endif CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc