I wrote:
> Well, I vote we take it out, which would eliminate these warnings
> instead of just shorten them.  On a platform where tsorting a non-shared
> library's contents is actually essential, libpq.a would be useless
> anyway because of the circular internal references.  Presumably,
> anyone who's using Postgres on such a platform only cares about the .so
> library.  So I don't see any point in including the tsort step.
> (AFAIK we inherited the tsort stuff from Berkeley; it may have been
> useful once upon a time, but that was a long time ago.)

Attached is a proposed patch that removes all trace of lorder and tsort
from our source tree.  The one part of it that I'm not too sure about is
the change to the non-ELF build rule in Makefile.*bsd.  Anyone have a
non-ELF BSD system sitting around that they can test on?

                        regards, tom lane

Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql/configure.in,v
retrieving revision 1.456
diff -c -r1.456 configure.in
*** configure.in        7 Apr 2006 17:50:03 -0000       1.456
--- configure.in        15 Apr 2006 19:13:57 -0000
***************
*** 559,565 ****
    AC_SUBST(ld_R_works)
  esac
  AC_PROG_RANLIB
- AC_CHECK_PROGS(LORDER, lorder)
  AC_PATH_PROG(TAR, tar)
  PGAC_CHECK_STRIP
  
--- 559,564 ----
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.221
diff -c -r1.221 Makefile.global.in
*** src/Makefile.global.in      12 Feb 2006 07:29:36 -0000      1.221
--- src/Makefile.global.in      15 Apr 2006 19:13:58 -0000
***************
*** 222,228 ****
  LDREL = -r
  LDOUT = -o
  RANLIB = @RANLIB@
- LORDER = @LORDER@
  X = @EXEEXT@
  
  # Perl 
--- 222,227 ----
Index: src/Makefile.shlib
===================================================================
RCS file: /cvsroot/pgsql/src/Makefile.shlib,v
retrieving revision 1.102
diff -c -r1.102 Makefile.shlib
*** src/Makefile.shlib  5 Jan 2006 03:01:34 -0000       1.102
--- src/Makefile.shlib  15 Apr 2006 19:13:59 -0000
***************
*** 266,282 ****
  
  all-shared-lib: $(shlib)
  
- ifndef LORDER
- MK_NO_LORDER := true
- endif
- 
  ifndef haslibarule
  lib$(NAME).a: $(OBJS)
- ifdef MK_NO_LORDER
        $(LINK.static) $@ $^
- else
-       $(LINK.static) $@ `$(LORDER) $^ | tsort`
- endif
        $(RANLIB) $@
  endif #haslibarule
  
--- 266,274 ----
Index: src/makefiles/Makefile.aix
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.aix,v
retrieving revision 1.24
diff -c -r1.24 Makefile.aix
*** src/makefiles/Makefile.aix  19 Jan 2006 21:19:12 -0000      1.24
--- src/makefiles/Makefile.aix  15 Apr 2006 19:13:59 -0000
***************
*** 3,9 ****
  MAKE_EXPORTS= true
  
  RANLIB= touch
- MK_NO_LORDER= true
  AROPT = crs
  
  DLSUFFIX = .so
--- 3,8 ----
Index: src/makefiles/Makefile.freebsd
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.freebsd,v
retrieving revision 1.22
diff -c -r1.22 Makefile.freebsd
*** src/makefiles/Makefile.freebsd      9 Dec 2005 21:19:36 -0000       1.22
--- src/makefiles/Makefile.freebsd      15 Apr 2006 19:13:59 -0000
***************
*** 21,27 ****
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] `lorder $<.obj | tsort`
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
--- 21,27 ----
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] $<.obj
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
Index: src/makefiles/Makefile.irix
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.irix,v
retrieving revision 1.4
diff -c -r1.4 Makefile.irix
*** src/makefiles/Makefile.irix 9 Dec 2005 21:19:36 -0000       1.4
--- src/makefiles/Makefile.irix 15 Apr 2006 19:13:59 -0000
***************
*** 1,4 ****
- MK_NO_LORDER= true
  AROPT = crs
  rpath = -Wl,-rpath,'$(rpathdir)'
  
--- 1,3 ----
Index: src/makefiles/Makefile.netbsd
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.netbsd,v
retrieving revision 1.12
diff -c -r1.12 Makefile.netbsd
*** src/makefiles/Makefile.netbsd       9 Dec 2005 21:19:36 -0000       1.12
--- src/makefiles/Makefile.netbsd       15 Apr 2006 19:13:59 -0000
***************
*** 23,29 ****
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] `lorder $<.obj | tsort`
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
--- 23,29 ----
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] $<.obj
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
Index: src/makefiles/Makefile.openbsd
===================================================================
RCS file: /cvsroot/pgsql/src/makefiles/Makefile.openbsd,v
retrieving revision 1.12
diff -c -r1.12 Makefile.openbsd
*** src/makefiles/Makefile.openbsd      9 Dec 2005 21:19:36 -0000       1.12
--- src/makefiles/Makefile.openbsd      15 Apr 2006 19:13:59 -0000
***************
*** 21,27 ****
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] `lorder $<.obj | tsort`
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
--- 21,27 ----
        $(LD) $(LDREL) $(LDOUT) $<.obj -x $<
        @echo building shared object $@
        @rm -f [EMAIL PROTECTED]
!       @${AR} cq [EMAIL PROTECTED] $<.obj
        ${RANLIB} [EMAIL PROTECTED]
        @rm -f $@
        $(LD) -x -Bshareable -Bforcearchive -o $@ [EMAIL PROTECTED]
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to