8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 22:43:03 +01:00

Add rpath to empbuild in MacOS.

This commit is contained in:
Adriano dos Santos Fernandes 2021-12-17 07:40:04 -03:00
parent f5038a84ba
commit c9cbd8eb3d
7 changed files with 22 additions and 33 deletions

View File

@ -422,7 +422,7 @@ $(LIBFBINTL_SO): $(INTL_Objects) $(COMMON_LIB)
gpre: $(GPRE) databases
$(GPRE): $(GPRE_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
HELP_FDB = $(FIREBIRD)/help/help.fdb
SECURITY_FDB = $(FIREBIRD)/security4.fdb
@ -496,62 +496,62 @@ utilities: firebird_server fb_lock_print fbguard fbsvcmgr fbtracemgr gbak gfix g
firebird_server: $(FB_DAEMON)
$(FB_DAEMON): $(Remote_Server_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
fb_lock_print: $(LOCKPRINT)
$(LOCKPRINT): $(LOCKPRINT_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
fbguard: $(FBGUARD)
$(FBGUARD): $(FBGUARD_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
fbsvcmgr: $(FBSVCMGR)
$(FBSVCMGR): $(FBSVCMGR_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
fbtracemgr: $(FBTRACEMGR)
$(FBTRACEMGR): $(FBTRACEMGR_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gbak: $(GBAK)
$(GBAK): $(GBAK_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gsplit: $(GSPLIT)
$(GSPLIT): $(GSPLIT_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gfix: $(GFIX)
$(GFIX): $(GFIX_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gsec: $(GSEC)
$(GSEC): $(GSEC_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gstat: $(GSTAT)
$(GSTAT): $(GSTAT_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
isql: $(ISQL)
$(ISQL): $(ISQL_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LIBEDITLINE) $(TERMLIB) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LIBEDITLINE) $(TERMLIB) $(LINK_LIBS)
nbackup: $(NBACKUP)
$(NBACKUP): $(NBACKUP_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
#___________________________________________________________________________
@ -642,7 +642,7 @@ gen_codes: $(CODES) msg.timestamp
$(CODES) $(SRC_ROOT)/include/gen $(LNG_ROOT)
$(CODES): $(CODES_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
#___________________________________________________________________________
# all the rest we need to build
@ -662,7 +662,7 @@ cross_rest: qli gbak_files
qli: $(QLI)
$(QLI): $(QLI_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
examples: include_generic
$(MAKE) -f Makefile.examples -C $(GEN_ROOT)/examples/
@ -681,7 +681,7 @@ $(FIREBIRD)/tzdata: $(ROOT)/extern/icu/tzdata/$(TZDATA_ZIP)
unzip -o $(ROOT)/extern/icu/tzdata/$(TZDATA_ZIP) -d $(FIREBIRD)/tzdata
$(BUILD_FILE): $(BUILD_Objects) $(COMMON_LIB)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS) $(call LINK_DARWIN_RPATH,..)
$(EXE_LINK) $(EXE_LINK_OPTIONS) $(LSB_UNDEF) $^ -o $@ $(FIREBIRD_LIBRARY_LINK) $(LINK_LIBS)
gbak_files: $(GBAK_FILES)

View File

@ -60,6 +60,7 @@ export PATH
GPRE_FLAGS= -m -z -n
LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),$(LIB),$(LIB)/../intl))
LINK_DARWIN_RPATH = -Wl,-rpath,@loader_path/../$(TARGET)/firebird
LIB_LINK_MAPFILE =
EXAMPLES_DEST= $(GEN_ROOT)/examples

View File

@ -344,7 +344,7 @@ LIB_LINK_SONAME= -Wl,-soname,$(1)
LIB_LINK_MAPFILE= -Wl,--version-script,$(1)
FIREBIRD_LIBRARY_LINK= -L$(LIB) -lfbclient $(MATHLIB) $(CRYPTLIB)
EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(LINK_EMPTY_SYMBOLS)
EXE_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) $(call LINK_DARWIN_RPATH,..) $(LINK_EMPTY_SYMBOLS)
LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -shared
FB_DAEMON = $(BIN)/firebird$(EXEC_EXT)

View File

@ -24,10 +24,7 @@
# 2. dnl the CPU_TYPE
# 3. edit extern/icu/source/config and set the right 32bit flags (-arch i386)
# 4. for CFLAGS, CXXFLAGS, LDFLAGS export '-m32 -arch i386'
# 5. export MACOSX_DEPLOYMENT_TARGET=10.7
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
# 5. export MACOSX_DEPLOYMENT_TARGET=10.7
MACOSX_DEPLOYMENT_TARGET=10.7
export MACOSX_DEPLOYMENT_TARGET
@ -36,7 +33,7 @@ PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -arch i386 -mmacosx-version
DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-common -Wall -arch i386 -mmacosx-version-min=10.7 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -fno-weak
EXE_LINK_OPTIONS:=-m32
EXE_LINK_OPTIONS+=-m32
LD_FLAGS+=-m32 -arch i386
include $(ROOT)/gen/darwin.defaults

View File

@ -17,9 +17,6 @@
# Start of file prefix.darwin: $(VERSION) @PLATFORM@
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
MACOSX_DEPLOYMENT_TARGET=10.2
export MACOSX_DEPLOYMENT_TARGET
@ -27,6 +24,4 @@ PROD_FLAGS=-DDARWIN -pipe -p -MMD -fPIC -fno-common -arch ppc -mmacosx-version-m
DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -arch ppc -mmacosx-version-min=10.2 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -fno-weak
EXE_LINK_OPTIONS:=
include $(ROOT)/gen/darwin.defaults

View File

@ -18,7 +18,7 @@
# 2 Oct 2002, Nickolay Samofatov - Major Cleanup
# To use this file to build 64bit version of Firebird for MacOS 10.5 (Leopard)
# Can only be built on MacOSX 10.5 (Leopard) due to lack of 64bit support in
# Can only be built on MacOSX 10.5 (Leopard) due to lack of 64bit support in
# Carbon in previous versions of MacOSX
# 1. edit configure.in so that MAKEFILE_PREFIX=darwin_ppc64
# 2. uncomment the CPU_TYPE
@ -29,9 +29,6 @@
# 6. export LDFLAGS='-arch ppc_64'
# 7. export MACOSX_DEPLOYMENT_TARGET=10.5
DYLD_LIBRARY_PATH=$(FIREBIRD)/lib
export DYLD_LIBRARY_PATH
MACOSX_DEPLOYMENT_TARGET=10.5
export MACOSX_DEPLOYMENT_TARGET
@ -39,7 +36,7 @@ PROD_FLAGS=-O3 -DDARWIN -pipe -p -MMD -fPIC -fno-common -mmacosx-version-min=10.
DEV_FLAGS=-ggdb -DDARWIN -pipe -p -MMD -fPIC -fno-common -Wall -mmacosx-version-min=10.5 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden
EXE_LINK_OPTIONS:=-arch ppc64
EXE_LINK_OPTIONS+=-arch ppc64
LD_FLAGS+=-arch ppc64
include $(ROOT)/gen/darwin.defaults

View File

@ -35,7 +35,6 @@ PROD_FLAGS=-O1 -DDARWIN -pipe -MMD -fPIC -fno-common -mmacosx-version-min=10.7
DEV_FLAGS=-ggdb -DDARWIN -pipe -MMD -fPIC -fno-omit-frame-pointer -fno-common -Wall -fno-optimize-sibling-calls -mmacosx-version-min=10.7 -Wno-non-virtual-dtor
CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden -stdlib=libc++ -msse4
EXE_LINK_OPTIONS:=
LD_FLAGS+=-liconv
FIREBIRD_LIBRARY_LINK+=-liconv
UNDEF_PLATFORM=