# Author: Damyan Ivanov <dmn@debian.org>
# Forwarded: not-needed
# Description: disable rpath usage
#  On Debian all libraries are in /usr/lib
--- a/builds/posix/make.defaults
+++ b/builds/posix/make.defaults
@@ -253,7 +253,7 @@ LINK_FBINTL_SYMBOLS = $(LIB_LINK_MAPFILE
 LINK_IBUTIL_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/ib_util.vers
 LINK_EMPTY_SYMBOLS = $(LIB_LINK_MAPFILE)$(ROOT)/builds/posix/empty.vers
 
-LIB_PLATFORM_RPATH = -Wl,-rpath,$(1)
+LIB_PLATFORM_RPATH =
 ifeq ($(strip @BINRELOC_CFLAGS@),)
 LIB_LINK_RPATH = $(call LIB_PLATFORM_RPATH,$(if $(subst intl,,$(1)),@FB_LIBDIR@,@FB_INTLDIR@))
 else
--- a/builds/posix/prefix.freebsd
+++ b/builds/posix/prefix.freebsd
@@ -20,8 +20,6 @@
 
 OS_ServerFiles=inet_server.cpp
 
-LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib
-
 PROD_FLAGS=-O -fno-builtin -DNDEBUG -DFREEBSD -pipe -MMD -fPIC
 DEV_FLAGS=-ggdb -DFREEBSD -pipe -MMD -p -fPIC -Wall
 EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
--- a/builds/posix/prefix.freebsd_amd64
+++ b/builds/posix/prefix.freebsd_amd64
@@ -20,8 +20,6 @@
 
 OS_ServerFiles=inet_server.cpp
 
-LINK_OPTS+=-Wl,-rpath,../gen/firebird/lib
-
 PROD_FLAGS=-O -fno-builtin -DFREEBSD -DAMD64 -pipe -MMD -fPIC
 DEV_FLAGS=-ggdb -DFREEBSD -DAMD64 -pipe -MMD -p -fPIC -Wall -Wno-non-virtual-dtor
 EMBED_UTIL_TARGETS=gstat gsec fbguard nbackup fb_lock_print fbsvcmgr fbtracemgr
