Browse Source

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

git-svn-id: trunk@46877 -
pierre 5 năm trước cách đây
mục cha
commit
660cfc49e8
2 tập tin đã thay đổi với 201 bổ sung160 xóa
  1. 181 160
      utils/fpcm/fpcmake.inc
  2. 20 0
      utils/fpcm/fpcmake.ini

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 181 - 160
utils/fpcm/fpcmake.inc


+ 20 - 0
utils/fpcm/fpcmake.ini

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

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác