From 22b9c2747dec5d7b6749daaf6961b94efbdd07ed Mon Sep 17 00:00:00 2001 From: Shivraj Patil Date: Fri, 22 Jul 2016 18:45:06 +0530 Subject: [PATCH] P6600/I6400 Build fix. Reverted the changes which was done to support for MIPS n32 ABI Signed-off-by: Shivraj Patil --- Makefile.system | 27 ++++++++++++++++++--------- c_check | 13 ++++--------- f_check | 7 +------ 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/Makefile.system b/Makefile.system index 1c48a251c..e3abb5723 100644 --- a/Makefile.system +++ b/Makefile.system @@ -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 diff --git a/c_check b/c_check index 9f457dfec..4569d842a 100644 --- a/c_check +++ b/c_check @@ -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")) { diff --git a/f_check b/f_check index c7ad964e0..171c91f95 100644 --- a/f_check +++ b/f_check @@ -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 ($?); }