mirror of https://github.com/citusdata/citus.git
Revert "Merge pull request #3626 from citusdata/vendor-new-directory"
This reverts commitignore-gnu-variable-sized-type-debug30ada54f6a
, reversing changes made to6ff79c5ea9
.
parent
30819af9d6
commit
fcbe7ddf70
|
@ -4,7 +4,6 @@ for f in $(git ls-tree -r HEAD --name-only); do
|
||||||
if [ "$f" = "${f%.out}" ] &&
|
if [ "$f" = "${f%.out}" ] &&
|
||||||
[ "$f" = "${f%.data}" ] &&
|
[ "$f" = "${f%.data}" ] &&
|
||||||
[ "$f" = "${f%.png}" ] &&
|
[ "$f" = "${f%.png}" ] &&
|
||||||
[ -f "$f" ] &&
|
|
||||||
[ "$(echo "$f" | cut -d / -f1)" != "vendor" ] &&
|
[ "$(echo "$f" | cut -d / -f1)" != "vendor" ] &&
|
||||||
[ "$(dirname "$f")" != "src/test/regress/output" ]
|
[ "$(dirname "$f")" != "src/test/regress/output" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -7,6 +7,13 @@ safestringlib_builddir = $(citus_top_builddir)/vendor/safestringlib/build
|
||||||
safestringlib_a = $(safestringlib_builddir)/libsafestring_static.a
|
safestringlib_a = $(safestringlib_builddir)/libsafestring_static.a
|
||||||
safestringlib_sources = $(wildcard $(safestringlib_srcdir)/safeclib/*)
|
safestringlib_sources = $(wildcard $(safestringlib_srcdir)/safeclib/*)
|
||||||
|
|
||||||
|
# Use cmake3 if it exists, otherwise just use the string "cmake" and let bash
|
||||||
|
# figure out its exact path later.
|
||||||
|
# Using "which cmake" instead will make the error very hard to understand if
|
||||||
|
# you have neither "cmake3" or "cmake" in path. In that case the "CMAKE3"
|
||||||
|
# variable would be an empty string.
|
||||||
|
CMAKE3 = $(shell which cmake3 || echo cmake)
|
||||||
|
|
||||||
MODULE_big = citus
|
MODULE_big = citus
|
||||||
EXTENSION = citus
|
EXTENSION = citus
|
||||||
|
|
||||||
|
@ -16,11 +23,7 @@ generated_sql_files = $(patsubst %,$(citus_abs_srcdir)/build/%,$(template_sql_fi
|
||||||
DATA_built = $(generated_sql_files)
|
DATA_built = $(generated_sql_files)
|
||||||
|
|
||||||
# directories with source files
|
# directories with source files
|
||||||
SUBDIRS = . commands connection ddl deparser executor master metadata planner progress relay safeclib test transaction utils worker
|
SUBDIRS = . commands connection ddl deparser executor master metadata planner progress relay test transaction utils worker
|
||||||
|
|
||||||
# Symlinks are not copied over to the build directory if a separete build
|
|
||||||
# directory is used during configure (such as on CI)
|
|
||||||
ENSURE_SUBDIRS_EXIST := $(shell mkdir -p $(SUBDIRS))
|
|
||||||
|
|
||||||
# That patsubst rule searches all directories listed in SUBDIRS for .c
|
# That patsubst rule searches all directories listed in SUBDIRS for .c
|
||||||
# files, and adds the corresponding .o files to OBJS
|
# files, and adds the corresponding .o files to OBJS
|
||||||
|
@ -47,11 +50,23 @@ utils/citus_version.o: $(CITUS_VERSION_INVALIDATE)
|
||||||
|
|
||||||
SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS))
|
SHLIB_LINK += $(filter -lssl -lcrypto -lssleay32 -leay32, $(LIBS))
|
||||||
|
|
||||||
|
override LDFLAGS += $(safestringlib_a)
|
||||||
override CPPFLAGS += -I$(libpq_srcdir) -I$(safestringlib_srcdir)/include
|
override CPPFLAGS += -I$(libpq_srcdir) -I$(safestringlib_srcdir)/include
|
||||||
|
|
||||||
SQL_DEPDIR=.deps/sql
|
SQL_DEPDIR=.deps/sql
|
||||||
SQL_BUILDDIR=build/sql
|
SQL_BUILDDIR=build/sql
|
||||||
|
|
||||||
|
$(safestringlib_a): $(safestringlib_sources)
|
||||||
|
rm -rf $(safestringlib_builddir)
|
||||||
|
mkdir -p $(safestringlib_builddir)
|
||||||
|
@# exports of LDFLAGS and CPPFLAGS are to make sure the ones from this
|
||||||
|
@# Makefile are not used
|
||||||
|
+cd $(safestringlib_builddir) && \
|
||||||
|
export LDFLAGS='' && export CPPFLAGS='' && \
|
||||||
|
$(CMAKE3) $(safestringlib_srcdir) && make
|
||||||
|
|
||||||
|
citus.so: $(safestringlib_a)
|
||||||
|
|
||||||
$(generated_sql_files): $(citus_abs_srcdir)/build/%: %
|
$(generated_sql_files): $(citus_abs_srcdir)/build/%: %
|
||||||
@mkdir -p $(citus_abs_srcdir)/$(SQL_DEPDIR) $(citus_abs_srcdir)/$(SQL_BUILDDIR)
|
@mkdir -p $(citus_abs_srcdir)/$(SQL_DEPDIR) $(citus_abs_srcdir)/$(SQL_BUILDDIR)
|
||||||
cd $(citus_abs_srcdir) && cpp -undef -w -P -MMD -MP -MF$(SQL_DEPDIR)/$(*F).Po -MT$@ $< > $@
|
cd $(citus_abs_srcdir) && cpp -undef -w -P -MMD -MP -MF$(SQL_DEPDIR)/$(*F).Po -MT$@ $< > $@
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
../../../vendor/safestringlib/safeclib/
|
|
|
@ -6,5 +6,5 @@ git clone https://github.com/intel/safestringlib
|
||||||
rm -rf safestringlib/{.git,unittests}
|
rm -rf safestringlib/{.git,unittests}
|
||||||
git add safestringlib/
|
git add safestringlib/
|
||||||
git commit -m "Update safestringlib"
|
git commit -m "Update safestringlib"
|
||||||
git cherry-pick -x dc2a371d9f8b28ad0e68c5230bb998b4463d8131
|
git cherry-pick -x 92d7a40d1de472d23d05967be9b77eda30af85cb
|
||||||
```
|
```
|
||||||
|
|
|
@ -145,14 +145,14 @@ set_target_properties(${PROJECT_NAME}_objlib
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME}_objlib PRIVATE -DSTDC_HEADERS)
|
target_compile_definitions(${PROJECT_NAME}_objlib PRIVATE -DSTDC_HEADERS)
|
||||||
|
|
||||||
|
target_compile_options(${PROJECT_NAME}_objlib
|
||||||
|
PRIVATE -Wall -Wextra -Wsign-compare -Wformat-security)
|
||||||
target_compile_options(${PROJECT_NAME}_objlib
|
target_compile_options(${PROJECT_NAME}_objlib
|
||||||
PRIVATE -Wno-unknown-pragmas -Wno-unused-parameter)
|
PRIVATE -Wno-unknown-pragmas -Wno-unused-parameter)
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 7)
|
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 7)
|
||||||
target_compile_options(${PROJECT_NAME}_objlib
|
target_compile_options(${PROJECT_NAME}_objlib
|
||||||
PRIVATE -Wno-implicit-fallthrough)
|
PRIVATE -Wno-implicit-fallthrough)
|
||||||
endif()
|
endif()
|
||||||
target_compile_options(${PROJECT_NAME}_objlib
|
|
||||||
PRIVATE -Wall -Wextra -Wsign-compare -Wformat-security)
|
|
||||||
target_compile_options(${PROJECT_NAME}_objlib
|
target_compile_options(${PROJECT_NAME}_objlib
|
||||||
PRIVATE -Wstack-protector -Winit-self)
|
PRIVATE -Wstack-protector -Winit-self)
|
||||||
target_compile_options(${PROJECT_NAME}_objlib
|
target_compile_options(${PROJECT_NAME}_objlib
|
||||||
|
@ -166,7 +166,10 @@ target_compile_options(${PROJECT_NAME}_objlib PRIVATE -fPIE -fPIC)
|
||||||
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
|
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 6)
|
||||||
target_compile_options(${PROJECT_NAME}_objlib PRIVATE -mmitigate-rop)
|
target_compile_options(${PROJECT_NAME}_objlib PRIVATE -mmitigate-rop)
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack -z relro -z now")
|
if(APPLE)
|
||||||
|
elseif(UNIX)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z noexecstack -z relro -z now")
|
||||||
|
endif()
|
||||||
|
|
||||||
option(BUILD_ERROR_ON_WARNING "Fail compilation on warning" OFF)
|
option(BUILD_ERROR_ON_WARNING "Fail compilation on warning" OFF)
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
|
|
||||||
#include "mem_primitives_lib.h"
|
#include "mem_primitives_lib.h"
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
|
||||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
|
||||||
/*
|
/*
|
||||||
* mem_primitives_lib.c provides unguarded memory routines
|
* mem_primitives_lib.c provides unguarded memory routines
|
||||||
* that are used by the safe_mem_library. These routines
|
* that are used by the safe_mem_library. These routines
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#ifndef __SAFECLIB_PRIVATE_H__
|
#ifndef __SAFECLIB_PRIVATE_H__
|
||||||
#define __SAFECLIB_PRIVATE_H__
|
#define __SAFECLIB_PRIVATE_H__
|
||||||
|
|
||||||
#include "citus_config.h"
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
/* linux kernel environment */
|
/* linux kernel environment */
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@
|
||||||
|
|
||||||
#define CHK_FORMAT(X,Y) (((X)==(Y))?1:0)
|
#define CHK_FORMAT(X,Y) (((X)==(Y))?1:0)
|
||||||
|
|
||||||
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
parse_format(const char *format, char pformatList[], unsigned int maxFormats)
|
parse_format(const char *format, char pformatList[], unsigned int maxFormats)
|
||||||
|
|
Loading…
Reference in New Issue