P6600/I6400 Build fix. Reverted the changes which was done to support for MIPS n32 ABI

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
This commit is contained in:
Shivraj Patil 2016-07-22 18:45:06 +05:30
parent beb1d076a4
commit 22b9c2747d
3 changed files with 23 additions and 24 deletions

View File

@ -502,15 +502,12 @@ endif
ifdef NO_BINARY_MODE
ifeq ($(ARCH), $(filter $(ARCH),mips64))
ifeq ($(ARCH), $(filter $(ARCH),mips64 mips))
ifdef BINARY64
CCOMMON_OPT += -mabi=64
else
CCOMMON_OPT += -mabi=n32
endif
BINARY_DEFINED = 1
else ifeq ($(ARCH), $(filter $(ARCH),mips))
CCOMMON_OPT += -mabi=32
endif
BINARY_DEFINED = 1
endif
@ -602,15 +599,13 @@ ifneq ($(NO_LAPACK), 1)
EXTRALIB += -lgfortran
endif
ifdef NO_BINARY_MODE
ifeq ($(ARCH), $(filter $(ARCH),mips64))
ifeq ($(ARCH), $(filter $(ARCH),mips64 mips))
ifdef BINARY64
FCOMMON_OPT += -mabi=64
else
FCOMMON_OPT += -mabi=n32
endif
else ifeq ($(ARCH), $(filter $(ARCH),mips))
FCOMMON_OPT += -mabi=32
endif
endif
else
ifdef BINARY64
FCOMMON_OPT += -m64
@ -693,6 +688,20 @@ endif
endif
endif
ifeq ($(filter $(ARCH),mips64 mips))
ifndef BINARY64
FCOMMON_OPT += -m32
else
FCOMMON_OPT += -m64
endif
else
ifdef BINARY64
FCOMMON_OPT += -mabi=64
else
FCOMMON_OPT += -mabi=32
endif
endif
ifeq ($(USE_OPENMP), 1)
FCOMMON_OPT += -mp
endif

13
c_check
View File

@ -79,15 +79,10 @@ if ($os eq "AIX") {
$defined = 1;
}
if ($architecture eq "mips") {
$compiler_name .= " -mabi=32";
$defined = 1;
}
if ($architecture eq "mips64") {
$compiler_name .= " -mabi=n32" if ($binary eq "32");
$compiler_name .= " -mabi=64" if ($binary eq "64");
$defined = 1;
if (($architecture eq "mips") || ($architecture eq "mips64")) {
$compiler_name .= " -mabi=32" if ($binary eq "32");
$compiler_name .= " -mabi=64" if ($binary eq "64");
$defined = 1;
}
if (($architecture eq "arm") || ($architecture eq "arm64")) {

View File

@ -223,12 +223,7 @@ if (!$?) {
}
#For gfortran MIPS
if ($?) {
$mips_data = `$compiler_bin -E -dM - < /dev/null`;
if ($mips_data =~ /_MIPS_ISA_MIPS64/) {
$link = `$compiler $openmp -mabi=n32 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
} else {
$link = `$compiler $openmp -mabi=32 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
}
$link = `$compiler $openmp -mabi=32 -v ftest2.f 2>&1 && rm -f a.out a.exe`;
}
$binary = "" if ($?);
}