Add gcc specific options -mabi=32/-mabi=64 for mips CPU

git-svn-id: trunk@46877 -
This commit is contained in:
pierre 2020-09-16 12:41:44 +00:00
parent d1cd26592a
commit 660cfc49e8
2 changed files with 442 additions and 400 deletions

File diff suppressed because it is too large Load Diff

View File

@ -871,11 +871,16 @@ ifneq ($(findstring sparc64,$(shell uname -a)),)
ifeq ($(BINUTILSPREFIX),)
GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
else
# gcc mips seems not to recognize -m32/-m64
ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),)
CROSSGCCOPT=-mabi=32
else
CROSSGCCOPT=-m32
endif
endif
endif
endif
endif
# Check if FPCFPMAKE compiler is same target as FPC
ifdef FPCFPMAKE
@ -883,6 +888,21 @@ FPCFPMAKE_CPU_TARGET=$(shell $(FPCFPMAKE) -iTP)
ifeq ($(CPU_TARGET),$(FPCFPMAKE_CPU_TARGET))
# In that case use GCCLIBDIR value for FPCMAKEGCCLIBDIR
FPCMAKEGCCLIBDIR:=$(GCCLIBDIR)
else
ifneq ($(findstring $(FPCFPMAKE_CPU_TARGET),aarch64 powerpc64 riscv64 sparc64 x86_64),)
FPCMAKE_CROSSGCCOPT=-m64
else
ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips64 mips64el),)
FPCMAKE_CROSSGCCOPT=-mabi=64
else
ifneq ($(findstring $(FPCFPMAKE_CPU_OPT),mips mipsel),)
FPCMAKE_CROSSGCCOPT=-mabi=32
else
FPCMAKE_CROSSGCCOPT=-m32
endif
endif
endif
FPCMAKEGCCLIBDIR:=$(shell dirname `gcc $(FPCMAKE_CROSSGCCOPT) -print-libgcc-file-name`)
endif
endif