This should solve the build failure on i386.
This commit is contained in:
parent
058c89d58c
commit
fec3a8e183
125
openblas-0.2.9-i386.patch
Normal file
125
openblas-0.2.9-i386.patch
Normal file
@ -0,0 +1,125 @@
|
||||
From 438002204d79a0393999ae4fe8bc9b5125c45d97 Mon Sep 17 00:00:00 2001
|
||||
From: wernsaar <wernsaar@googlemail.com>
|
||||
Date: Sat, 21 Jun 2014 12:29:23 +0200
|
||||
Subject: [PATCH] Ref #393: fix for INTERFACE64=0 and ARCH_X86 in divtable
|
||||
|
||||
---
|
||||
Makefile | 2 +-
|
||||
Makefile.system | 18 +++++++++---------
|
||||
driver/others/divtable.c | 2 +-
|
||||
3 files changed, 11 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2f5d032..ab8602f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -36,7 +36,7 @@ ifndef BINARY64
|
||||
else
|
||||
@echo " BINARY ... 64bit "
|
||||
endif
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
@echo " Use 64 bits int (equivalent to \"-i8\" in Fortran) "
|
||||
endif
|
||||
@echo " C compiler ... $(C_COMPILER) (command line : $(CC))"
|
||||
diff --git a/Makefile.system b/Makefile.system
|
||||
index ade4f93..5d5f0f9 100644
|
||||
--- a/Makefile.system
|
||||
+++ b/Makefile.system
|
||||
@@ -52,7 +52,7 @@ ifdef TARGET_CORE
|
||||
GETARCH_FLAGS := -DFORCE_$(TARGET_CORE)
|
||||
endif
|
||||
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
GETARCH_FLAGS += -DUSE64BITINT
|
||||
endif
|
||||
|
||||
@@ -502,7 +502,7 @@ endif
|
||||
else
|
||||
ifdef BINARY64
|
||||
FCOMMON_OPT += -m64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -fdefault-integer-8
|
||||
endif
|
||||
else
|
||||
@@ -516,7 +516,7 @@ endif
|
||||
|
||||
ifeq ($(F_COMPILER), INTEL)
|
||||
CCOMMON_OPT += -DF_INTERFACE_INTEL
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -i8
|
||||
endif
|
||||
ifdef USE_OPENMP
|
||||
@@ -536,7 +536,7 @@ CCOMMON_OPT += -DF_INTERFACE_IBM
|
||||
# FCOMMON_OPT += -qarch=440
|
||||
ifdef BINARY64
|
||||
FCOMMON_OPT += -q64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -qintsize=8
|
||||
endif
|
||||
else
|
||||
@@ -551,7 +551,7 @@ ifeq ($(F_COMPILER), PGI)
|
||||
CCOMMON_OPT += -DF_INTERFACE_PGI
|
||||
COMMON_PROF += -DPGICOMPILER
|
||||
ifdef BINARY64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -i8
|
||||
endif
|
||||
FCOMMON_OPT += -tp p7-64
|
||||
@@ -566,7 +566,7 @@ endif
|
||||
ifeq ($(F_COMPILER), PATHSCALE)
|
||||
CCOMMON_OPT += -DF_INTERFACE_PATHSCALE
|
||||
ifdef BINARY64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -i8
|
||||
endif
|
||||
endif
|
||||
@@ -593,7 +593,7 @@ endif
|
||||
ifeq ($(F_COMPILER), OPEN64)
|
||||
CCOMMON_OPT += -DF_INTERFACE_OPEN64
|
||||
ifdef BINARY64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
FCOMMON_OPT += -i8
|
||||
endif
|
||||
endif
|
||||
@@ -681,7 +681,7 @@ endif
|
||||
endif
|
||||
|
||||
ifdef BINARY64
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
CCOMMON_OPT +=
|
||||
#-DUSE64BITINT
|
||||
endif
|
||||
@@ -871,7 +871,7 @@ endif
|
||||
|
||||
LAPACK_CFLAGS = $(CFLAGS)
|
||||
LAPACK_CFLAGS += -DHAVE_LAPACK_CONFIG_H
|
||||
-ifdef INTERFACE64
|
||||
+ifneq ($(INTERFACE64), 0)
|
||||
LAPACK_CFLAGS += -DLAPACK_ILP64
|
||||
endif
|
||||
ifdef OS_WINDOWS
|
||||
diff --git a/driver/others/divtable.c b/driver/others/divtable.c
|
||||
index 7a191db..d50b091 100644
|
||||
--- a/driver/others/divtable.c
|
||||
+++ b/driver/others/divtable.c
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "common.h"
|
||||
|
||||
#ifdef SMP
|
||||
-#ifndef USE64BITINT
|
||||
+#if !defined(USE64BITINT) || defined(ARCH_X86)
|
||||
unsigned int blas_quick_divide_table[] = {
|
||||
0x00000000, 0x00000001, 0x80000001, 0x55555556,
|
||||
0x40000001, 0x33333334, 0x2aaaaaab, 0x24924925,
|
||||
--
|
||||
1.9.3
|
||||
|
@ -12,6 +12,8 @@ Patch0: openblas-0.2.9-system_lapack.patch
|
||||
Patch1: openblas-0.2.5-libname.patch
|
||||
# Don't test link against functions in lapacke 3.5.0 if only 3.4.0 is available
|
||||
Patch2: openblas-0.2.9-lapacke.patch
|
||||
# Fix build on i386: https://github.com/wernsaar/OpenBLAS/commit/438002204d79a0393999ae4fe8bc9b5125c45d97.patch
|
||||
Patch3: openblas-0.2.9-i386.patch
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
BuildRequires: gcc-gfortran
|
||||
@ -154,6 +156,7 @@ cd OpenBLAS-%{version}
|
||||
%if 0%{?fedora} > 0 && 0%{?fedora} < 21
|
||||
%patch2 -p1 -b .lapacke
|
||||
%endif
|
||||
%patch3 -p1 -b .i386
|
||||
|
||||
# Get rid of bundled LAPACK sources
|
||||
rm -rf lapack-netlib
|
||||
|
Loading…
Reference in New Issue
Block a user