!7 增加BIND_NOW安全编译选项

From: @gongzt
Reviewed-by: 
Signed-off-by:
This commit is contained in:
openeuler-ci-bot 2021-09-10 10:09:26 +00:00 committed by Gitee
commit eeedd510b9
2 changed files with 18 additions and 2 deletions

12
add_bind_now.patch Normal file
View File

@ -0,0 +1,12 @@
diff -Nur qrupdate-1.1.2/src/Makefile qrupdate-1.1.2.new/src/Makefile
--- qrupdate-1.1.2/src/Makefile 2010-01-19 19:35:49.000000000 +0800
+++ qrupdate-1.1.2.new/src/Makefile 2021-09-08 21:12:42.218504048 +0800
@@ -33,7 +33,7 @@
clup1up.f dlup1up.f slup1up.f zlup1up.f
OBJS = $(SRC:%.f=%.o)
-
+FFLAGS = -Wl,-z,now
lib: ../libqrupdate.a
ifeq ($(shell uname),Darwin)

View File

@ -1,6 +1,6 @@
Name: qrupdate
Version: 1.1.2
Release: 2
Release: 3
Summary: A Fortran library for fast updates of QR and Cholesky decompositions
License: GPLv3+
URL: http://qrupdate.sourceforge.net/
@ -8,6 +8,7 @@ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: qrupdate-gcc10.patch
Patch1: add_bind_now.patch
BuildRequires: gcc-gfortran
BuildRequires: openblas-devel
@ -31,7 +32,7 @@ This package contains the development libraries for %{name}.
sed -i 's|$(PREFIX)/lib/|$(DESTDIR)%{_libdir}/|g' src/Makefile
%build
%make_build solib FC=gfortran FFLAGS="%{optflags} -fimplicit-none -funroll-loops" BLAS="-lopenblas" LAPACK=
%make_build solib FC=gfortran FFLAGS="%{optflags} -Wl,-z,now -fimplicit-none -funroll-loops" BLAS="-lopenblas" LAPACK=
%install
make install-shlib LIBDIR=%{_libdir} PREFIX="%{buildroot}"
@ -53,6 +54,9 @@ make test FC=gfortran FFLAGS="%{optflags} -fimplicit-none -funroll-loops" BLAS="
%changelog
* Thurs Sep 09 2021 gongzhengtang<gongzhengtang@huawei.com> - 1.1.2-3
- add bind now
* Mon Aug 02 2021 wangyong<wangyong187@huawei.com> - 1.1.2-2
- Fix build error caused by GCC upgrade to GCC-10