提交 a4561d2f 编写于 作者: H Heikki Linnakangas

Make static compilation of ORCA work.

Reorder -lgpopt, -lnaucrates, -lgpdbcost, -lgpos, to make static
compilation of ORCA to work. When linking with dynamic libraries, the order
doesn't matter, but with static libraries, the options need to be given in
dependency order.

This doesn't change the way those libraries are actually linked. Whether
we link with static or shared versions depends on which ones are found
at link time.
上级 1c1bc219
......@@ -67,13 +67,18 @@ LIBS := $(filter-out -lpgport, $(LIBS)) $(LDAP_LIBS_BE) $(CONNECTEMCLIB)
# The backend doesn't need everything that's in LIBS, however
LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses, $(LIBS))
# adding orca libraries
# Add ORCA libraries
ifeq ($(enable_orca),yes)
LIBS := $(LIBS) -L$(LIBGPOS)/$(OBJDIR_DEFAULT) -lgpos
LIBS := $(LIBS) -L$(XERCES_LIBDIR) -lxerces-c-3.1
LIBS := $(LIBS) -L$(OPTIMIZER)/libnaucrates/$(OBJDIR_DEFAULT) -lnaucrates
LIBS := $(LIBS) -L$(OPTIMIZER)/libgpdbcost/$(OBJDIR_DEFAULT) -lgpdbcost
LIBS := $(LIBS) -L$(OPTIMIZER)/libgpopt/$(OBJDIR_DEFAULT) -lgpopt
LIBS := $(LIBS) -L$(LIBGPOS)/$(OBJDIR_DEFAULT)
LIBS := $(LIBS) -L$(OPTIMIZER)/libnaucrates/$(OBJDIR_DEFAULT)
LIBS := $(LIBS) -L$(OPTIMIZER)/libgpdbcost/$(OBJDIR_DEFAULT)
LIBS := $(LIBS) -L$(OPTIMIZER)/libgpopt/$(OBJDIR_DEFAULT)
LIBS := $(LIBS) -L$(XERCES_LIBDIR)
# The order of the libraries is significant, when building against static
# ORCA libraries.
LIBS := $(LIBS) -lgpopt -lnaucrates -lgpdbcost -lgpos
LIBS := $(LIBS) -lxerces-c-3.1
endif
# adding codegen libraries
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册