mirror of
https://github.com/postgres/postgres.git
synced 2025-11-22 12:22:45 +03:00
Make use of system-specific linker option to embed shared library search
path into executables and shared libraries (-rpath or -R for most). Can be disabled with --disable-rpath, since some binary packaging standards do not like this option.
This commit is contained in:
@@ -2,6 +2,7 @@ AROPT = cq
|
||||
|
||||
ifdef ELF_SYSTEM
|
||||
export_dynamic = -export-dynamic
|
||||
rpath = -R$(libdir)
|
||||
endif
|
||||
|
||||
DLSUFFIX = .so
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
# which we do by linking -lc before -lcurses. (Unfortunately we can't
|
||||
# just not use libcurses.) This also ensures that we get the POSIX signal
|
||||
# routines in libc, not the BSD-like ones in libBSD.
|
||||
LDFLAGS:= -lc $(LDFLAGS)
|
||||
LIBS := -lc $(LIBS)
|
||||
|
||||
# On the other hand, if we don't have POSIX signals, we need to use the
|
||||
# libBSD signal routines. (HPUX 9 and early HPUX 10 releases don't have
|
||||
# POSIX signals.) Make sure libBSD comes before libc in that case.
|
||||
ifeq ($(HAVE_POSIX_SIGNALS), no)
|
||||
LDFLAGS:= -lBSD $(LDFLAGS)
|
||||
LIBS := -lBSD $(LIBS)
|
||||
endif
|
||||
|
||||
# On HPUX 9, rint() is provided only in the PA1.1 version of libm.
|
||||
@@ -19,11 +19,15 @@ ifneq ($(HPUXMATHLIB),)
|
||||
LDFLAGS:= -L /lib/pa1.1 $(LDFLAGS)
|
||||
endif
|
||||
|
||||
# On all HPUX versions, embed `libdir' as the shared library search path
|
||||
# so that the executables don't need SHLIB_PATH to be set, specify -z
|
||||
# to catch null pointer dereferences, and specify -E to make all symbols
|
||||
# visible to dynamically linked shared libraries.
|
||||
LDFLAGS+= -Wl,+b -Wl,$(libdir) -Wl,-z
|
||||
# Embed 'libdir' as the shared library search path so that the executables
|
||||
# don't need SHLIB_PATH to be set. (We do not observe the --enable-rpath
|
||||
# switch here because you'd get rather bizarre behavior if you leave this
|
||||
# option off.)
|
||||
LDFLAGS += -Wl,+b -Wl,$(libdir)
|
||||
|
||||
# catch null pointer dereferences
|
||||
LDFLAGS += -Wl,-z
|
||||
|
||||
export_dynamic = -Wl,-E
|
||||
|
||||
AROPT = crs
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
RANLIB= touch
|
||||
MK_NO_LORDER= true
|
||||
AROPT = crs
|
||||
rpath = -Wl,-rpath,$(libdir)
|
||||
|
||||
DLSUFFIX = .so
|
||||
CFLAGS_SL =
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
AROPT = crs
|
||||
export_dynamic = -export-dynamic
|
||||
rpath = -Wl,-rpath,$(libdir)
|
||||
DLSUFFIX = .so
|
||||
CFLAGS_SL = -fpic
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ AROPT = cq
|
||||
|
||||
ifdef ELF_SYSTEM
|
||||
export_dynamic = -Wl,-E
|
||||
rpath = -Wl,-R$(libdir)
|
||||
endif
|
||||
|
||||
DLSUFFIX = .so
|
||||
|
||||
@@ -2,6 +2,7 @@ AROPT = cq
|
||||
|
||||
ifdef ELF_SYSTEM
|
||||
export_dynamic = -Wl,-E
|
||||
rpath = -R$(libdir)
|
||||
endif
|
||||
|
||||
DLSUFFIX = .so
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
AROPT = crs
|
||||
DLSUFFIX = .so
|
||||
CFLAGS_SL =
|
||||
rpath = -rpath $(libdir)
|
||||
|
||||
%.so: %.o
|
||||
$(LD) -shared -expect_unresolved '*' -o $@ $<
|
||||
|
||||
LDFLAGS += -rpath $(libdir)
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.3 2000/10/21 22:36:13 petere Exp $
|
||||
# $Header: /cvsroot/pgsql/src/makefiles/Makefile.solaris,v 1.4 2000/10/27 23:59:39 petere Exp $
|
||||
|
||||
AROPT = crs
|
||||
|
||||
ifeq ($(with_gnu_ld), yes)
|
||||
export_dynamic = -Wl,-E
|
||||
rpath = -Wl,-rpath,$(libdir)
|
||||
else
|
||||
rpath = -Wl,-R$(libdir)
|
||||
endif
|
||||
|
||||
|
||||
DLSUFFIX = .so
|
||||
ifeq ($(GCC), yes)
|
||||
CFLAGS_SL = -fPIC
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
AROPT = crs
|
||||
export_dynamic = -Wl,-Bexport
|
||||
rpath = -Wl,-R$(libdir)
|
||||
DLSUFFIX = .so
|
||||
ifeq ($(GCC), yes)
|
||||
CFLAGS_SL = -fpic
|
||||
|
||||
Reference in New Issue
Block a user