for older RHEL7 versions because of backward compatibility problems with RPM. Remove the exception in CONFIG_SITE.Common.linuxCommon for release 7.0.8! Create links with full version shared library names to allow programs built against previous rpm version to run.
59 lines
2.3 KiB
Plaintext
59 lines
2.3 KiB
Plaintext
# CONFIG.Common.linuxCommon
|
|
#
|
|
# Definitions for linux target builds
|
|
# Sites may override these definitions in CONFIG_SITE.Common.linuxCommon
|
|
#-------------------------------------------------------
|
|
|
|
# Include definitions common to all Unix targets
|
|
include $(CONFIG)/os/CONFIG.Common.UnixCommon
|
|
|
|
OS_CLASS = Linux
|
|
|
|
# Define _GNU_SOURCE and _DEFAULT_SOURCE for maximum portability
|
|
POSIX_CPPFLAGS = -D_GNU_SOURCE -D_DEFAULT_SOURCE
|
|
POSIX_LDLIBS = -lpthread
|
|
|
|
OP_SYS_CPPFLAGS += -Dlinux
|
|
OP_SYS_LDLIBS += -lrt -ldl
|
|
# Use -rdynamic to maximize symbols available for stacktrace
|
|
OP_SYS_LDFLAGS += -rdynamic
|
|
|
|
# Linker flags for static & shared-library builds
|
|
STATIC_LDFLAGS_YES= -Wl,-Bstatic
|
|
STATIC_LDFLAGS_NO=
|
|
STATIC_LDLIBS_YES= -Wl,-Bdynamic
|
|
|
|
# Set runtime path for shared libraries if LINKER_USE_RPATH=YES
|
|
SHRLIBDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(SHRLIB_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
|
SHRLIBDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(SHRLIB_DEPLIB_DIRS))
|
|
SHRLIBDIR_LDFLAGS += \
|
|
$(SHRLIBDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
|
|
|
# Set runtime path for products if LINKER_USE_RPATH=YES
|
|
PRODDIR_RPATH_LDFLAGS_YES = $(subst $(abspath $(LINKER_ORIGIN_ROOT)),$(FINAL_LOCATION),$(PROD_DEPLIB_DIRS:%=-Wl,-rpath,%))
|
|
PRODDIR_RPATH_LDFLAGS_ORIGIN = $(shell $(MAKERPATH) -O '\$$ORIGIN' -F $(FINAL_DIR) -R $(LINKER_ORIGIN_ROOT) $(PROD_DEPLIB_DIRS))
|
|
PRODDIR_LDFLAGS += \
|
|
$(PRODDIR_RPATH_LDFLAGS_$(LINKER_USE_RPATH))
|
|
|
|
# Make sure hosts tools find their libraries during build even if
|
|
# FINAL_LOCATION differs from INSTALL_LOCATION
|
|
ifneq ($(LINKER_USE_RPATH:NO=),)
|
|
ifeq ($(T_A),$(EPICS_HOST_ARCH))
|
|
ifneq ($(FINAL_LOCATION:$(INSTALL_LOCATION)=),)
|
|
export LD_LIBRARY_PATH:=$(LD_LIBRARY_PATH:%=%:)$(INSTALL_LIB)
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# Link libraries controlled by COMMANDLINE_LIBRARY
|
|
# The newest Linux versions only need readline, older ones need both
|
|
# readline and ncurses, and the oldest need readline and curses
|
|
LDLIBS_READLINE = -lreadline
|
|
LDLIBS_READLINE_NCURSES = -lreadline -lncurses
|
|
LDLIBS_READLINE_CURSES = -lreadline -lcurses
|
|
|
|
#--------------------------------------------------
|
|
# Allow site overrides
|
|
-include $(CONFIG)/os/CONFIG_SITE.Common.linuxCommon
|
|
-include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).linuxCommon
|