提交 e8b71697 编写于 作者: B Bradford D. Boyle 提交者: Shaoqi Bai

Fix BLD_ARCH conditional

The format of the `findstring` function is `$(findstring find,in)` where
it searches `in` for occurences of `find`. The value of BLD_ARCH for
RHEL7 is rhel7_x86_64 and will never be found in `rhel6 rhel7`. This
commit changes the conditional to search for `rhel` in the value of
`BLD_ARCH` and if it is found, set the custom LDFLAGS.

[#171588911]
Co-authored-by: NBradford D. Boyle <bboyle@pivotal.io>
Co-authored-by: NXin Zhang <xzhang@pivotal.io>
上级 227614e9
......@@ -253,7 +253,9 @@ ifdef ADDON_DIR
CONFIGFLAGS+=ADDON_DIR=$(ADDON_DIR)
endif
ifneq "$(findstring $(BLD_ARCH),rhel6 rhel7)" ""
# if $BLD_ARCH is rhel6_x86_64 of rhel7_x86_64
# compile with relative rpath
ifeq "$(findstring rhel,$(BLD_ARCH))" "rhel"
CONFIGFLAGS+= --disable-rpath
CONFIGFLAGS+= LDFLAGS='-Wl,--enable-new-dtags -Wl,-rpath,\$$$$ORIGIN/../lib'
CONFIGFLAGS+= LDFLAGS_SL='-Wl,--enable-new-dtags -Wl,-rpath,\$$$$ORIGIN/../lib'
......@@ -340,10 +342,10 @@ BLD_GPDB_BUILDSET=$($(BLD_ARCH)_GPDB_BUILDSET)
# set default build steps
define BUILD_STEPS
@rm -rf $(INSTLOC)
if [ "$(findstring $(BLD_ARCH),rhel6 rhel7)" = "" ]; then \
cd $(BUILDDIR) && $(MAKE) $(PARALLEL_MAKE_OPTS) install; \
else \
if [ "$(findstring rhel,$(BLD_ARCH))" = "rhel" ]; then \
cd $(BUILDDIR) && PYGRESQL_LDFLAGS='-Wl,-rpath,\$$$$ORIGIN/../../../lib -Wl,--enable-new-dtags' $(MAKE) $(PARALLEL_MAKE_OPTS) install; \
else \
cd $(BUILDDIR) && $(MAKE) $(PARALLEL_MAKE_OPTS) install; \
fi \
#@$(MAKE) greenplum_path INSTLOC=$(INSTLOC)
#@$(MAKE) mgmtcopy INSTLOC=$(INSTLOC)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册