提交 60449fa2 编写于 作者: H Heikki Linnakangas

Use config.h from ORCA to determine GPOS_DEBUG and arch flags.

Starting with ORCA version 2.2, there's a gpos/config.h file that contains
flags describing the compile-time options used to build the ORCA library.
Those flags affect binary compatibility, so it's important that e.g. if
ORCA was built with GPOS_DEBUG, the code that uses it (src/backend/gpopt
in this case) is also built with GPOS_DEBUG. Use the new gpos/config.h
for that, instead of deriving them ourselves and hoping that we reach the
same conclusions as whoever built ORCA.

This requires ORCA v2.2, so update releng.mk to download that.
上级 9bb82592
......@@ -10542,16 +10542,16 @@ fi
done
for ac_header in gpos/assert.h
for ac_header in gpos/config.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "gpos/assert.h" "ac_cv_header_gpos_assert_h" "$ac_includes_default"
if test "x$ac_cv_header_gpos_assert_h" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "gpos/config.h" "ac_cv_header_gpos_config_h" "$ac_includes_default"
if test "x$ac_cv_header_gpos_config_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GPOS_ASSERT_H 1
#define HAVE_GPOS_CONFIG_H 1
_ACEOF
else
as_fn_error $? "gpos/assert.h GPOS header file is required for Greenplum Query Optimizer (orca)" "$LINENO" 5
as_fn_error $? "gpos/config.h GPOS header file is required for Greenplum Query Optimizer (orca)" "$LINENO" 5
fi
done
......
......@@ -1244,7 +1244,7 @@ fi
AS_IF([test "$enable_orca" = yes],
[ # then
AC_CHECK_HEADERS(gpopt/init.h, [], [AC_MSG_ERROR([gpopt/init.h GPOPT header file is required for Greenplum Query Optimizer (orca)])])
AC_CHECK_HEADERS(gpos/assert.h, [], [AC_MSG_ERROR([gpos/assert.h GPOS header file is required for Greenplum Query Optimizer (orca)])])
AC_CHECK_HEADERS(gpos/config.h, [], [AC_MSG_ERROR([gpos/config.h GPOS header file is required for Greenplum Query Optimizer (orca)])])
]) # fi
dnl sys/socket.h is required by AC_FUNC_ACCEPT_ARGTYPES
......
......@@ -124,7 +124,7 @@ sync_tools: opt_write_test /opt/releng/apache-ant
-Divyrepo.user=$(IVYREPO_USER) -Divyrepo.passwd="$(IVYREPO_PASSWD)" resolve);
@echo "Resolve finished";
wget -O - https://github.com/greenplum-db/gporca/releases/download/v2.1/bin_orca_centos5_release.tar.gz | tar zxf - -C $(BLD_TOP)/ext/$(BLD_ARCH)
wget -O - https://github.com/greenplum-db/gporca/releases/download/v2.2/bin_orca_centos5_release.tar.gz | tar zxf - -C $(BLD_TOP)/ext/$(BLD_ARCH)
clean_tools: opt_write_test
@cd releng/make/dependencies; \
......
......@@ -15,9 +15,6 @@ top_builddir = ../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
ifeq ($(enable_orca),yes)
include $(BLD_TOP)/releng/releng.mk
endif
ifdef ADDON_DIR
include $(BLD_TOP)/$(ADDON_DIR)/src/Makefile
......
......@@ -9,11 +9,6 @@ subdir = src/backend/gpopt
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
include $(BLD_TOP)/releng/releng.mk
include $(top_builddir)/src/backend/gpopt/gpopt.mk
SUBDIRS = config translate relcache utils
OBJS = CGPOptimizer.o gpdbwrappers.o
......
......@@ -9,11 +9,6 @@ subdir = src/backend/gpopt/config
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
include $(BLD_TOP)/releng/releng.mk
include $(top_builddir)/src/backend/gpopt/gpopt.mk
OBJS = CConfigParamMapping.o
include $(top_srcdir)/src/backend/common.mk
##-------------------------------------------------------------------------------------
##
## Copyright (C) 2012 EMC Corp.
##
## @doc: GP optimizer build
##
## @author: solimm1
##
##-------------------------------------------------------------------------------------
UNAME = $(shell uname)
UNAME_P = $(shell uname -p)
UNAME_M = $(shell uname -m)
ARCH_OS = GPOS_$(UNAME)
ARCH_CPU = GPOS_$(UNAME_P)
ifeq "$(BLD_TYPE)" "opt"
GPOPT_flags = -O3 -fno-omit-frame-pointer -g3
else
GPOPT_flags = -g3 -DGPOS_DEBUG
endif
ifeq (x86_64, $(UNAME_M))
ARCH_BIT = GPOS_64BIT
else
ARCH_BIT = GPOS_32BIT
endif
ifeq ($(ARCH_BIT), GPOS_32BIT)
ARCH_FLAGS = -m32
else
ARCH_FLAGS = -m64
endif
BLD_FLAGS = $(ARCH_FLAGS) -D$(ARCH_BIT) -D$(ARCH_CPU) -D$(ARCH_OS) $(GPOPT_flags)
override CPPFLAGS := -fPIC $(CPPFLAGS)
override CPPFLAGS := $(BLD_FLAGS) $(CPPFLAGS)
......@@ -9,11 +9,6 @@ subdir = src/backend/gpopt/relcache
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
include $(BLD_TOP)/releng/releng.mk
include $(top_builddir)/src/backend/gpopt/gpopt.mk
OBJS = CMDProviderRelcache.o
include $(top_srcdir)/src/backend/common.mk
......@@ -9,11 +9,6 @@ subdir = src/backend/gpopt/translate
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
include $(BLD_TOP)/releng/releng.mk
include $(top_builddir)/src/backend/gpopt/gpopt.mk
OBJS = CMappingColIdVar.o \
CMappingVarColId.o \
CMappingElementColIdParamId.o \
......
......@@ -9,11 +9,6 @@ subdir = src/backend/gpopt/utils
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
BLD_TOP = $(top_builddir)/gpAux
include $(BLD_TOP)/releng/releng.mk
include $(top_builddir)/src/backend/gpopt/gpopt.mk
OBJS = COptTasks.o CCatalogUtils.o CConstExprEvaluatorProxy.o funcs.o
include $(top_srcdir)/src/backend/common.mk
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册