gcc -L/usr/local/dept/lib \
-shared \
-O2 \
-g \
-pipe \
-Wall \
-Wp,-D_FORTIFY_SOURCE=2 \
-fexceptions \
-fstack-protector \
--param=ssp-buffer-size=4 \
-m64 \
-mtune=generic Sybase.o dbdimp.o \
-o blib/arch/auto/DBD/Sybase/Sybase.so
####
$ sh -x relink && readelf -d blib/arch/auto/DBD/Sybase/Sybase.so | grep -i rpath
+ gcc -L/usr/local/dept/lib -Wl,-R/usr/local/dept/lib -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so
0x000000000000000f (RPATH) Library rpath: [/usr/local/dept/lib]
####
$ perl Makefile.PL PREFIX=$DEPT/perl LDDLFLAGS=-Wl,-R$DEPT/lib < answers && rm -f nohup.out && nohup make || grep ^gcc nohup.out | tail -1
Unknown Client Library version - assuming FreeTDS.
...
Writing Makefile for DBD::Sybase
nohup: appending output to `nohup.out'
gcc -Wl,-R/usr/local/dept/lib Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so