Allow the mips tool chain to be picked via command argument (#1532)

* makefile change

* move variable
This commit is contained in:
louist103 2024-01-14 10:48:07 -05:00 committed by GitHub
parent a5400fbde5
commit 697e73f995
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -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