轻量版适配openEuler 22.03 LTS
This commit is contained in:
@ -454,6 +454,10 @@ function install_gaussdb()
|
|||||||
export DEBUG_TYPE=debug
|
export DEBUG_TYPE=debug
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -e "/etc/openEuler-release" && "$(cat /etc/openEuler-release | awk '{print $3}')" == "22.03" ]]; then
|
||||||
|
CMAKE_OPT="$CMAKE_OPT -DENABLE_OPENEULER_MAJOR=ON"
|
||||||
|
fi
|
||||||
|
echo "CMAKE_OPT----> $CMAKE_OPT"
|
||||||
echo "Begin run cmake for gaussdb server" >> "$LOG_FILE" 2>&1
|
echo "Begin run cmake for gaussdb server" >> "$LOG_FILE" 2>&1
|
||||||
echo "CMake options: ${CMAKE_OPT}" >> "$LOG_FILE" 2>&1
|
echo "CMake options: ${CMAKE_OPT}" >> "$LOG_FILE" 2>&1
|
||||||
echo "CMake release: ${DEBUG_TYPE}" >> "$LOG_FILE" 2>&1
|
echo "CMake release: ${DEBUG_TYPE}" >> "$LOG_FILE" 2>&1
|
||||||
|
@ -94,6 +94,7 @@ option(HAVE_LIBM "enable -lm, this set to default -lm" ON)
|
|||||||
option(HAVE_POSIX_SIGNALS "enable posix signals, this set to default" ON)
|
option(HAVE_POSIX_SIGNALS "enable posix signals, this set to default" ON)
|
||||||
option(HAVE_GCC_INT_ATOMICS "enable gcc buildin atomics operations, this set to default" ON)
|
option(HAVE_GCC_INT_ATOMICS "enable gcc buildin atomics operations, this set to default" ON)
|
||||||
option(FLEXIBLE_ARRAY_MEMBER "pq_ce need" ON)
|
option(FLEXIBLE_ARRAY_MEMBER "pq_ce need" ON)
|
||||||
|
option(ENABLE_OPENEULER_MAJOR "support openEuler 22.03 LTS, this set to default" OFF)
|
||||||
|
|
||||||
# we will differ compile flags and definitions by different vars
|
# we will differ compile flags and definitions by different vars
|
||||||
set(DB_COMMON_DEFINE "")
|
set(DB_COMMON_DEFINE "")
|
||||||
@ -141,8 +142,12 @@ if(${ENABLE_LITE_MODE} STREQUAL "ON")
|
|||||||
set(KRB5 OFF)
|
set(KRB5 OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(${ENABLE_OPENEULER_MAJOR} STREQUAL "ON")
|
||||||
|
add_definitions(-DOPENEULER_MAJOR)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(PROTECT_OPTIONS -fwrapv -std=c++14 -fnon-call-exceptions ${OPTIMIZE_LEVEL})
|
set(PROTECT_OPTIONS -fwrapv -std=c++14 -fnon-call-exceptions ${OPTIMIZE_LEVEL})
|
||||||
set(WARNING_OPTIONS -Wall -Wendif-labels -Werror -Wformat-security)
|
set(WARNING_OPTIONS -Wall -Wendif-labels -Wformat-security)
|
||||||
set(OPTIMIZE_OPTIONS -pipe -pthread -fno-aggressive-loop-optimizations -fno-expensive-optimizations -fno-omit-frame-pointer -fno-strict-aliasing -freg-struct-return)
|
set(OPTIMIZE_OPTIONS -pipe -pthread -fno-aggressive-loop-optimizations -fno-expensive-optimizations -fno-omit-frame-pointer -fno-strict-aliasing -freg-struct-return)
|
||||||
set(CHECK_OPTIONS -Wmissing-format-attribute -Wno-attributes -Wno-unused-but-set-variable -Wno-write-strings -Wpointer-arith)
|
set(CHECK_OPTIONS -Wmissing-format-attribute -Wno-attributes -Wno-unused-but-set-variable -Wno-write-strings -Wpointer-arith)
|
||||||
set(MACRO_OPTIONS -D_GLIBCXX_USE_CXX11_ABI=0 -DENABLE_GSTRACE -D_GNU_SOURCE -DPGXC -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSTREAMPLAN -D_THREAD_SAFE ${DB_COMMON_DEFINE})
|
set(MACRO_OPTIONS -D_GLIBCXX_USE_CXX11_ABI=0 -DENABLE_GSTRACE -D_GNU_SOURCE -DPGXC -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -DSTREAMPLAN -D_THREAD_SAFE ${DB_COMMON_DEFINE})
|
||||||
|
5
configure
vendored
5
configure
vendored
@ -709,6 +709,7 @@ with_selinux
|
|||||||
krb_srvtab
|
krb_srvtab
|
||||||
with_python
|
with_python
|
||||||
with_openeuler_os
|
with_openeuler_os
|
||||||
|
with_openeuler_major
|
||||||
enable_thread_safety
|
enable_thread_safety
|
||||||
INCLUDES
|
INCLUDES
|
||||||
TAS
|
TAS
|
||||||
@ -828,6 +829,7 @@ enable_nls
|
|||||||
with_pgport
|
with_pgport
|
||||||
with_gs_version
|
with_gs_version
|
||||||
with_openeuler_os
|
with_openeuler_os
|
||||||
|
with_openeuler_major
|
||||||
enable_shared
|
enable_shared
|
||||||
enable_rpath
|
enable_rpath
|
||||||
enable_jemalloc
|
enable_jemalloc
|
||||||
@ -3272,6 +3274,9 @@ _ACEOF
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(cat /etc/system-release)" == "openEuler release 22.03 LTS" ]; then
|
||||||
|
with_openeuler_major=yes
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# --enable-coverage enables generation of code coverage metrics with gcov
|
# --enable-coverage enables generation of code coverage metrics with gcov
|
||||||
|
@ -211,6 +211,7 @@ TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
|
|||||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||||
with_openeuler_os = @with_openeuler_os@
|
with_openeuler_os = @with_openeuler_os@
|
||||||
|
with_openeuler_major = @with_openeuler_major@
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
@ -728,6 +729,11 @@ endif
|
|||||||
ifeq ($(with_openeuler_os), yes)
|
ifeq ($(with_openeuler_os), yes)
|
||||||
override CPPFLAGS := $(CPPFLAGS) -DWITH_OPENEULER_OS
|
override CPPFLAGS := $(CPPFLAGS) -DWITH_OPENEULER_OS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(with_openeuler_major), yes)
|
||||||
|
override CPPFLAGS := $(CPPFLAGS) -DOPENEULER_MAJOR
|
||||||
|
endif
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
GCC = @GCC@
|
GCC = @GCC@
|
||||||
C = gcc
|
C = gcc
|
||||||
|
@ -31,10 +31,10 @@
|
|||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#ifndef WITH_OPENEULER_OS
|
#if (defined WITH_OPENEULER_OS) || (defined OPENEULER_MAJOR)
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#else
|
|
||||||
#include <linux/sysctl.h>
|
#include <linux/sysctl.h>
|
||||||
|
#else
|
||||||
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include <asm/ptrace.h>
|
#include <asm/ptrace.h>
|
||||||
|
@ -54,10 +54,10 @@
|
|||||||
#include <sys/poll.h>
|
#include <sys/poll.h>
|
||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#ifndef WITH_OPENEULER_OS
|
#if (defined WITH_OPENEULER_OS) || (defined OPENEULER_MAJOR)
|
||||||
#include <sys/sysctl.h>
|
|
||||||
#else
|
|
||||||
#include <linux/sysctl.h>
|
#include <linux/sysctl.h>
|
||||||
|
#else
|
||||||
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
@ -28,6 +28,10 @@
|
|||||||
|
|
||||||
#define PAGE_SIZE 4096
|
#define PAGE_SIZE 4096
|
||||||
#define BBOX_PROC_PATH_LEN 128
|
#define BBOX_PROC_PATH_LEN 128
|
||||||
|
#ifdef MINSIGSTKSZ
|
||||||
|
#undef MINSIGSTKSZ
|
||||||
|
#endif
|
||||||
|
#define MINSIGSTKSZ 5120
|
||||||
|
|
||||||
#define BBOX_ALT_STACKSIZE (MINSIGSTKSZ + 4096 * 32)
|
#define BBOX_ALT_STACKSIZE (MINSIGSTKSZ + 4096 * 32)
|
||||||
|
|
||||||
|
@ -30,7 +30,9 @@
|
|||||||
#include "typed_statistics_generator.h"
|
#include "typed_statistics_generator.h"
|
||||||
|
|
||||||
#include "sys/times.h"
|
#include "sys/times.h"
|
||||||
|
#ifndef OPENEULER_MAJOR
|
||||||
#include "sys/vtimes.h"
|
#include "sys/vtimes.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace MOT {
|
namespace MOT {
|
||||||
/**
|
/**
|
||||||
|
@ -164,7 +164,7 @@ extern ErrorLevel min_debug_level;
|
|||||||
#define MAX_CONTINUOUS_COUNT 10
|
#define MAX_CONTINUOUS_COUNT 10
|
||||||
#define INIT_TX_ALLOC_BUFF_NUM 5
|
#define INIT_TX_ALLOC_BUFF_NUM 5
|
||||||
|
|
||||||
#ifndef WITH_OPENEULER_OS
|
#if (!defined WITH_OPENEULER_OS) && (!defined OPENEULER_MAJOR)
|
||||||
extern int gettimeofday(struct timeval* tp, struct timezone* tzp);
|
extern int gettimeofday(struct timeval* tp, struct timezone* tzp);
|
||||||
#endif
|
#endif
|
||||||
//extern THR_LOCAL knl_thrd_context t_thrd;
|
//extern THR_LOCAL knl_thrd_context t_thrd;
|
||||||
|
Reference in New Issue
Block a user