On some HPUX versions/hardware, it seems we need to include libgcc.a in
authorTom Lane
Sat, 20 Nov 2004 03:52:00 +0000 (03:52 +0000)
committerTom Lane
Sat, 20 Nov 2004 03:52:00 +0000 (03:52 +0000)
the regression test shared libraries.

src/makefiles/Makefile.hpux

index 4c4071055825abc3221559bc5cc1d44224131bfa..f8be012b9fa53bd21cbeda7942135eb6f9cb5742 100644 (file)
@@ -53,10 +53,18 @@ endif
 # Rule for building shared libs (currently used only for regression test
 # shlib ... should go away, since this is not really enough knowledge)
 %$(DLSUFFIX): %.o
-ifeq ($(with_gnu_ld), yes)
-   $(CC) $(LDFLAGS) -shared -o $@ $<
+ifeq ($(GCC), yes)
+  ifeq ($(with_gnu_ld), yes)
+   $(CC) $(LDFLAGS) -shared -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
+  else
+   $(LD) -b -o $@ $< `$(CC) $(LDFLAGS) -print-libgcc-file-name`
+  endif
 else
+  ifeq ($(with_gnu_ld), yes)
+   $(CC) $(LDFLAGS) -shared -o $@ $<
+  else
    $(LD) -b -o $@ $<
+  endif
 endif
 
 sqlmansect = 5