summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTae-Young Chung <ty83.chung@samsung.com>2020-01-14 12:51:06 +0900
committerTae-Young Chung <ty83.chung@samsung.com>2020-01-14 17:05:33 +0900
commit8182468ea030e1a204ad176fac8484e1bbdef66b (patch)
tree2a71d2065e95d833478eb0a4d38d0ebe95d866ba
parent572be316c51ca0939de5208508c24c204cb01a8f (diff)
downloadopenblas-8182468ea030e1a204ad176fac8484e1bbdef66b.tar.gz
openblas-8182468ea030e1a204ad176fac8484e1bbdef66b.tar.bz2
openblas-8182468ea030e1a204ad176fac8484e1bbdef66b.zip
Fix SIGSEGV; openblas failed to single, double, complex precision tests with "Segmentation fault - invalid memory reference" log message while building with x86_64. Change-Id: I4d3ce9608c34e81236c53057b2ce6efc92f6685a Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
-rw-r--r--packaging/openblas.spec20
1 files changed, 16 insertions, 4 deletions
diff --git a/packaging/openblas.spec b/packaging/openblas.spec
index 093155671..bc434ae8f 100644
--- a/packaging/openblas.spec
+++ b/packaging/openblas.spec
@@ -1,6 +1,6 @@
Name: openblas
Version: 0.2.20
-Release: 1
+Release: 2
Summary: An optimized BLAS library based on GotoBLAS2
License: BSD-3-Clause and MIT and Apache-2.0
Group: Productivity/Scientific/Math
@@ -162,13 +162,25 @@ export LDFLAGS+="-Wl,-z,noexecstack"
%endif
cd ..
+
+# Just to avoid duplication, global flags are passed with COMMON_OPT
+export CFLAGS=""
+export CXXFLAGS=""
+export FFLAGS=""
+
+BUILD_FLAGS="%{optflags}"
+%ifarch x86_64
+# On GCC9, the "-fno-omit-frame-pointer" option results in the segfault in case of x86_64.
+BUILD_FLAGS=$(echo $BUILD_FLAGS| sed 's/-fno-omit-frame-pointer/-fomit-frame-pointer/g')
+%endif
+
# Make serial, threaded and OpenMP versions
make -C serial %{?_smp_mflags} %{?openblas_target} USE_THREAD=0 USE_OPENMP=0 LIBNAMESUFFIX=serial \
- FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=64 V=1
+ FC=gfortran CC=gcc COMMON_OPT="${BUILD_FLAGS}" NUM_THREADS=64 V=1
make -C openmp %{?_smp_mflags} %{?openblas_target} USE_THREAD=1 USE_OPENMP=1 LIBNAMESUFFIX=openmp \
- FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=64 V=1
+ FC=gfortran CC=gcc COMMON_OPT="${BUILD_FLAGS}" NUM_THREADS=64 V=1
make -C pthreads %{?_smp_mflags} %{?openblas_target} USE_THREAD=1 USE_OPENMP=0 LIBNAMESUFFIX=pthreads \
- FC=gfortran CC=gcc COMMON_OPT="%{optflags}" NUM_THREADS=64 V=1
+ FC=gfortran CC=gcc COMMON_OPT="${BUILD_FLAGS}" NUM_THREADS=64 V=1
%install
cd ..