fix changelog version error and add sw_64 support

(cherry picked from commit 8f5d326c86b373c08fc03aae9d002b8b31f256d3)
This commit is contained in:
panchenbo 2023-08-18 11:49:21 +08:00 committed by zhang_xubo
parent 18f4b4012c
commit 4f9bb33e1f
2 changed files with 1812 additions and 0 deletions

1789
3000-add-sw_64-support.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -37,6 +37,7 @@ Patch50: openssl3-adptor.patch
Patch51: compile_2309.patch
Patch3000: 3000-add-sw_64-support.patch
BuildRequires: cmake gcc gcc-c++ openssl-devel python
BuildRequires: cjson lz4-devel protobuf-devel snappy-devel zstd-devel boost-devel
BuildRequires: libcgroup-devel libcurl-devel unixODBC-devel jemalloc-devel krb5-devel
@ -45,6 +46,9 @@ BuildRequires: bison flex DCF
%ifnarch aarch64 %{arm}
BuildRequires: numactl-devel
%endif
%ifarch sw_64
BuildRequires: libatomic
%endif
%global _privatelibs lib(cjson|ecpg|z|pg|pq)\\.so*
%global __provides_exclude %{_privatelibs}
@ -92,6 +96,9 @@ pushd %{orc_name}-%{orc_version}
popd
%patch41 -p1
%ifarch sw_64
%patch3000 -p1
%endif
%build
########### build cjson ###########
build_target=$(pwd)/deps_binarylibs
@ -107,12 +114,18 @@ CONFIGURE_EXTRA_FLAG="--64"
%ifarch aarch64
CONFIGURE_EXTRA_FLAG=""
%endif
%ifarch sw_64
CONFIGURE_EXTRA_FLAG=""
%endif
./configure ${CONFIGURE_EXTRA_FLAG} --prefix=${build_target}/zlib
sed -i '21a CFLAGS += -fPIC' Makefile
MAKE_EXTRA_FLAG="-m64"
%ifarch aarch64
MAKE_EXTRA_FLAG=""
%endif
%ifarch sw_64
MAKE_EXTRA_FLAG=""
%endif
make CFLAGS="-fPIE -fPIC" SFLAGS="-O2 -fPIC -fstack-protector-strong -Wl,-z,noexecstack -Wl,-z,relro,-z,now ${MAKE_EXTRA_FLAG} -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN" %{?_smp_mflags}
make install
cd contrib/minizip/
@ -160,7 +173,11 @@ popd
pushd openGauss-server-%{version}
chmod +x ./configure
./configure \
%ifarch sw_64
CC=g++ CFLAGS='-O0' \
%else
CC=g++ CFLAGS='-O2' \
%endif
--prefix=%{apppath} \
--3rd=${build_target} \
--enable-thread-safety \
@ -308,9 +325,15 @@ fi
%changelog
* Fri Aug 18 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-11
- add sw_64 support
* Mon Aug 14 2023 zhangxubo <zhangxubo1@huawei.com> - 2.1.0-10
- Fix bugs: #I7QJRO
* Tue Jun 6 2023 dillon chen<dillon.chen@gmail.com> - 2.1.0-8
- Fix bugs: #I677QX add lsof
* Mon Apr 10 2023 panchenbo <panchenbo@kylinsec.com.cn> - 2.1.0-9
- add /etc/kylinsec-release support for KylinSec