]> granicus.if.org Git - postgresql/commitdiff
Clean up rpath handling for HPUX --- we can't use the cc-style rpath
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Nov 2004 21:27:42 +0000 (21:27 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 Nov 2004 21:27:42 +0000 (21:27 +0000)
switch syntax when calling ld directly.

src/Makefile.shlib
src/makefiles/Makefile.hpux

index 1890182c800895ebdaefa6ed3ac7071a4e6028c4..6653b270e918d61636aace66717d7f27853c2512 100644 (file)
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.88 2004/11/17 17:08:15 tgl Exp $
+#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.89 2004/11/19 21:27:42 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -154,9 +154,15 @@ ifeq ($(PORTNAME), hpux)
     SHLIB_LINK         += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
   endif
   ifeq ($(with_gnu_ld), yes)
-    LINK.shared                = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname) -Wl,+b -Wl,$(libdir)
+    LINK.shared                = $(CC) $(LDFLAGS) -shared -Wl,-h -Wl,$(soname)
   else
-    LINK.shared                = $(LD) +h $(soname) -b +b $(libdir)
+    # can't use the CC-syntax rpath pattern here
+    rpath =
+    ifeq ($(enable_rpath), yes)
+      LINK.shared      = $(LD) +h $(soname) -b +b $(rpathdir)
+    else
+      LINK.shared      = $(LD) +h $(soname) -b
+    endif
   endif
 endif
 
index 4a1e551ec148456f8585689698bc4d22fd61fb62..4c4071055825abc3221559bc5cc1d44224131bfa 100644 (file)
@@ -19,9 +19,9 @@ LIBS := -lxnet $(LIBS)
 # Set up rpath so that the executables don't need SHLIB_PATH to be set.
 # (Note: --disable-rpath is a really bad idea on this platform...)
 ifeq ($(with_gnu_ld), yes)
-   rpath = -Wl,-rpath,$(rpathdir)
+   rpath = -Wl,-rpath -Wl,$(rpathdir)
 else
-   rpath = -Wl,+b,$(rpathdir)
+   rpath = -Wl,+b -Wl,$(rpathdir)
 endif
 
 # catch null pointer dereferences