!22 Fix build error for gcc 12

From: @lyn1001 
Reviewed-by: @wang--ge 
Signed-off-by: @wang--ge
This commit is contained in:
openeuler-ci-bot 2023-08-04 08:14:32 +00:00 committed by Gitee
commit 9dc77a8980
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,6 @@
Name: rocksdb
Version: 6.8.1
Release: 5
Release: 6
Summary: A Persistent Key-Value Store for Flash and RAM Storage
License: GPLv2 and Apache 2.0 License
@ -60,6 +60,7 @@ cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} java/test-libs
export CFLAGS="%{optflags}"
# librocksdb*.so* has undefined symbols dlopen and so on, “-ldl” needs to be added here
export EXTRA_CXXFLAGS=" -std=c++11 %{optflags} -ldl"
export DISABLE_WARNING_AS_ERROR=1
%ifnarch riscv64
%make_build shared_lib
%else
@ -103,6 +104,9 @@ install -D -m 0644 java/target/%{name}jni-%{version}-linux$(getconf LONG_BIT).ja
%{_javadir}/%{name}jni/%{name}jni.jar
%changelog
* Fri Aug 4 2023 liyanan <thistleslyn@163.com> - 6.8.1-6
- Fix build error for gcc 12
* Mon Apr 10 2023 laokz <zhangkai@iscas.ac.cn> - 6.8.1-5
- Fix building on RISC-V by setting PORTABLE to 1