Expose MIPS_BINUTILS_PREFIX for building on alternative platforms (#1076)

* Define MIPS_BINUTILS_PREFIX for crossdev generated binaries (mips-gentoo-linux-gnu)

* Update error message to reflect binutils prefix

* Add documentation around MIPS_BINUTILS_PREFIX

* Clear up documentation

* Update Makefile

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update Makefile

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update Makefile

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update Makefile

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

* Update Makefile

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>

Co-authored-by: fig02 <fig02srl@gmail.com>
Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
Tyler Phillips 2022-01-19 18:57:39 -05:00 committed by GitHub
parent 6479913daa
commit 4b4099e84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,10 @@ NON_MATCHING ?= 0
# If ORIG_COMPILER is 1, compile with QEMU_IRIX and the original compiler
ORIG_COMPILER ?= 0
# Set prefix to mips binutils binaries (mips-linux-gnu-ld => 'mips-linux-gnu-') - Change at your own risk!
# In nearly all cases, not having 'mips-linux-gnu-*' binaries on the PATH is indicative of missing dependencies
MIPS_BINUTILS_PREFIX ?= mips-linux-gnu-
ifeq ($(NON_MATCHING),1)
CFLAGS := -DNON_MATCHING
CPPFLAGS := -DNON_MATCHING
@ -37,10 +41,8 @@ endif
N_THREADS ?= $(shell nproc)
#### 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 Please install or build $(MIPS_BINUTILS_PREFIX))
endif
CC := tools/ido_recomp/$(DETECTED_OS)/7.1/cc