With the followihg LDFLAGS: LDFLAGS="-Wl,-rpath,'\$\$ORIGIN/../lib' -Wl,-rpath,'\$\$ORIGIN/../lib64' -Wl,-rpath,'\$\$ORIGIN/../../lib' -Wl,-rpath,'\$\$ORIGIN/../../lib64' -Wl,-rpath,'/lib' -L/path/to/lib -L/path/to/lib64 -Wl,-z,origin -Wl,--enable-new-dtags" Extra quoting is needed for the echogs commands, which strip off a layer of quotes, to preserve the literal dollar sihn in the $ORIGIN keyword (man ld): into the embedded RPATH using LDFLAGS: **************************** start patch *********************************** --- Makefile.in 2009-05-17 23:36:38.000000000 -0400 +++ Makefile.in.new 2009-05-17 23:36:29.000000000 -0400 @@ -279,6 +279,8 @@ LDFLAGS=@LDFLAGS@ $(XLDFLAGS) +ECHOGS_LDFLAGS=$(subst $$ORIGIN,"\$$\$$ORIGIN", $(LDFLAGS)) + # Define any extra libraries to link into the executable. # ISC Unix 2.2 wants -linet. # SCO Unix needs -lsocket if you aren't including the X11 driver. --- unixlink.mak 2009-05-17 23:38:17.000000000 -0400 +++ unixlink.mak.new 2009-05-17 23:38:14.000000000 -0400 @@ -50,7 +50,7 @@ # which has limited environment space. ldt_tr=$(PSOBJ)ldt.tr $(GS_XE): $(ld_tr) $(ECHOGS_XE) $(XE_ALL) $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) - $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(LDFLAGS) -o $(GS_XE) + $(ECHOGS_XE) -w $(ldt_tr) -n - $(CCLD) $(ECHOGS_LDFLAGS) -o $(GS_XE) $(ECHOGS_XE) -a $(ldt_tr) -n -s $(PSOBJ)gsromfs$(COMPILE_INITS).$(OBJ) $(PSOBJ)gs.$(OBJ) -s cat $(ld_tr) >>$(ldt_tr) $(ECHOGS_XE) -a $(ldt_tr) -s - $(EXTRALIBS) $(STDLIBS) **************************** end patch ************************************* Similar changes may be needed for other echogs commands.
oops, too many dollar signs. Instead of +ECHOGS_LDFLAGS=$(subst $$ORIGIN,"\$$\$$ORIGIN", $(LDFLAGS)) try +ECHOGS_LDFLAGS=$(subst $$ORIGIN,"\$$ORIGIN", $(LDFLAGS))
Confirm and re-assign bugs with attached/in-line patches for another person to review.