librt is missing from link on RHEL 6.

librt was on added to TRICK_EXEC_LINK_LIBS but it was overwritten.  Changed
librt to be added to a different variable name, PLATFORM_LIBS and that
variable is added to TRICK_EXEC_LINK_LIBS.

refs #83
This commit is contained in:
Alex Lin 2015-07-13 10:06:51 -05:00
parent a4f1da2b14
commit 0b99667d9b
3 changed files with 7 additions and 10 deletions

View File

@ -37,7 +37,7 @@ export TRICK_ICG_NOCOMMENT
export TRICK_SWIG_EXCLUDE
export TRICK_GTE_EXT
export TRICK_HOST_CPU := $(shell export TRICK_CC=$(TRICK_CC) && $(TRICK_HOME)/bin/trick-gte TRICK_HOST_CPU)
export TRICK_EXEC_LINK_LIBS = ${PTHREAD_LIBS} $(PYTHON_LIB)
export TRICK_EXEC_LINK_LIBS = ${PTHREAD_LIBS} $(PYTHON_LIB) $(PLATFORM_LIBS) -lm -ldl -lz
export TRICK_LIBS = ${RPATH} -L${TRICK_LIB_DIR} -ltrick -ltrick_pyip -ltrick_comm -ltrick_math -ltrick_units -ltrick_mm
IO_SRC_DIR := io_src/

View File

@ -12,7 +12,4 @@ RPATH = -Wl,-rpath,${TRICK_LIB_DIR}
TRICK_LDFLAGS +=
LD_WHOLE_ARCHIVE := -Wl,-all_load
LD_NO_WHOLE_ARCHIVE :=
ifeq ($(MAKELEVEL),0)
TRICK_EXEC_LINK_LIBS += -lm -ldl -lz
endif

View File

@ -26,35 +26,35 @@ RPATH = -Wl,-rpath=${TRICK_LIB_DIR}
ifeq ($(MAKELEVEL),0)
export TRICK_LDFLAGS += -Wl,--export-dynamic
TRICK_EXEC_LINK_LIBS += -lm -lrt -ldl -lz
endif
PLATFORM_LIBS = -lrt
LD_WHOLE_ARCHIVE := -Wl,-whole-archive
LD_NO_WHOLE_ARCHIVE := -Wl,-no-whole-archive
ifneq ($(DMTCP),)
TRICK_EXEC_LINK_LIBS += -L$(DMTCP)/dmtcpaware -ldmtcpaware
PLATFORM_LIBS += -L$(DMTCP)/dmtcpaware -ldmtcpaware
endif
ifneq ($(TPROCTE),)
TRICK_ADDITIONAL_CXXFLAGS += -D_TPRO_CTE -I$(TPROCTE)/h
TRICK_EXEC_LINK_LIBS += $(TPROCTE)/lib/libtpro.a
PLATFORM_LIBS += $(TPROCTE)/lib/libtpro.a
endif
ifneq ($(BC635),)
# BC635 driver ver 118 and earlier do not have proper include and lib dirs.
TRICK_ADDITIONAL_CXXFLAGS += -D_BC635 -DLINUX -I$(BC635)/sample
TRICK_EXEC_LINK_LIBS += $(BC635)/sample/bcsdklib.a
PLATFORM_LIBS += $(BC635)/sample/bcsdklib.a
endif
ifeq ($(HAVE_ZEROCONF),1)
TRICK_EXEC_LINK_LIBS += -lavahi-client
PLATFORM_LIBS += -lavahi-client
endif
# Check BFD library version
ifneq ($(BFD_HOME),)
HAVE_BFD := 1
TRICK_EXEC_LINK_LIBS += -lbfd
PLATFORM_LIBS += -lbfd
endif
# determine if -std=c++0x or -std=c++11 compile flags are desired