diff --git a/configure b/configure
index fd23419fe4fccd7a4e5b863c33517b472d2efe5c..4bfa4167ceb09b58e36e2c4c8196588ee54abb34 100755
--- a/configure
+++ b/configure
@@ -314,7 +314,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB LORDER TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_zlib EGREP ELF_SYS LDFLAGS_SL AWK FLEX FLEXFLAGS LN_S LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB TAR STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB YACC YFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -4349,46 +4349,6 @@ else
   RANLIB="$ac_cv_prog_RANLIB"
 fi
 
-for ac_prog in lorder
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LORDER+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$LORDER"; then
-  ac_cv_prog_LORDER="$LORDER" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_LORDER="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-LORDER=$ac_cv_prog_LORDER
-if test -n "$LORDER"; then
-  echo "$as_me:$LINENO: result: $LORDER" >&5
-echo "${ECHO_T}$LORDER" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  test -n "$LORDER" && break
-done
-
 # Extract the first word of "tar", so it can be a program name with args.
 set dummy tar; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -23314,7 +23274,6 @@ s,@with_gnu_ld@,$with_gnu_ld,;t t
 s,@ld_R_works@,$ld_R_works,;t t
 s,@RANLIB@,$RANLIB,;t t
 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LORDER@,$LORDER,;t t
 s,@TAR@,$TAR,;t t
 s,@STRIP@,$STRIP,;t t
 s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
diff --git a/configure.in b/configure.in
index 0b52f67c6beafeb0dfe5166ddf96865ed5da7f3f..8e627b9ce5447dfcfb74cdeb55a3be3efd05bd9f 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-dnl $PostgreSQL: pgsql/configure.in,v 1.456 2006/04/07 17:50:03 adunstan Exp $
+dnl $PostgreSQL: pgsql/configure.in,v 1.457 2006/04/19 16:32:08 tgl Exp $
 dnl
 dnl Developers, please strive to achieve this order:
 dnl
@@ -559,7 +559,6 @@ case $host_os in sysv5*)
   AC_SUBST(ld_R_works)
 esac
 AC_PROG_RANLIB
-AC_CHECK_PROGS(LORDER, lorder)
 AC_PATH_PROG(TAR, tar)
 PGAC_CHECK_STRIP
 
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 8a8094f1124609114143f9432d77781a35e153f1..c935c4bf19bed711e4df74ddd6c52b75ebd32562 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
 # -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.221 2006/02/12 07:29:36 momjian Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.222 2006/04/19 16:32:08 tgl Exp $
 
 #------------------------------------------------------------------------------
 # All PostgreSQL makefiles include this file and use the variables it sets,
@@ -222,7 +222,6 @@ LDFLAGS_SL = @LDFLAGS_SL@
 LDREL = -r
 LDOUT = -o
 RANLIB = @RANLIB@
-LORDER = @LORDER@
 X = @EXEEXT@
 
 # Perl 
diff --git a/src/Makefile.shlib b/src/Makefile.shlib
index 6db29541975947236909736c7956e779215e75d2..732338caa431b2e6fa42781715908061c3df1702 100644
--- a/src/Makefile.shlib
+++ b/src/Makefile.shlib
@@ -6,7 +6,7 @@
 # Copyright (c) 1998, Regents of the University of California
 #
 # IDENTIFICATION
-#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.102 2006/01/05 03:01:34 momjian Exp $
+#    $PostgreSQL: pgsql/src/Makefile.shlib,v 1.103 2006/04/19 16:32:08 tgl Exp $
 #
 #-------------------------------------------------------------------------
 
@@ -266,17 +266,9 @@ all-static-lib: lib$(NAME).a
 
 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
 
diff --git a/src/makefiles/Makefile.aix b/src/makefiles/Makefile.aix
index a9c64d71c540c4f7004f498f5662462219f06cfb..2a75a24aeac957e040503179a5ae0eed26075d54 100644
--- a/src/makefiles/Makefile.aix
+++ b/src/makefiles/Makefile.aix
@@ -3,7 +3,6 @@
 MAKE_EXPORTS= true
 
 RANLIB= touch
-MK_NO_LORDER= true
 AROPT = crs
 
 DLSUFFIX = .so
diff --git a/src/makefiles/Makefile.freebsd b/src/makefiles/Makefile.freebsd
index 131c8716d455aa992f276c6ddfc82523fec090f8..f6e57608064e0bfc0c7c165880964ee602f73f95 100644
--- a/src/makefiles/Makefile.freebsd
+++ b/src/makefiles/Makefile.freebsd
@@ -21,7 +21,7 @@ else
 	$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
 	@echo building shared object $@
 	@rm -f $@.pic
-	@${AR} cq $@.pic `lorder $<.obj | tsort`
+	@${AR} cq $@.pic $<.obj
 	${RANLIB} $@.pic
 	@rm -f $@
 	$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
diff --git a/src/makefiles/Makefile.irix b/src/makefiles/Makefile.irix
index 9a219aee5cc67f76fcaf101d192c2e96aaa07be3..2a23c5a8fd4b72232ce15b63d7e9182996e59639 100644
--- a/src/makefiles/Makefile.irix
+++ b/src/makefiles/Makefile.irix
@@ -1,4 +1,3 @@
-MK_NO_LORDER= true
 AROPT = crs
 rpath = -Wl,-rpath,'$(rpathdir)'
 
diff --git a/src/makefiles/Makefile.netbsd b/src/makefiles/Makefile.netbsd
index 393511c48f34b227d00d1e1737ee2bae79116164..db33ebff78eefba8d8aa3cc4369845261468f1e1 100644
--- a/src/makefiles/Makefile.netbsd
+++ b/src/makefiles/Makefile.netbsd
@@ -23,7 +23,7 @@ else
 	$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
 	@echo building shared object $@
 	@rm -f $@.pic
-	@${AR} cq $@.pic `lorder $<.obj | tsort`
+	@${AR} cq $@.pic $<.obj
 	${RANLIB} $@.pic
 	@rm -f $@
 	$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic
diff --git a/src/makefiles/Makefile.openbsd b/src/makefiles/Makefile.openbsd
index a86c6e1619e585ca869f046463a584256f9c097f..24e201836e90db412ae63504d2b996d970736fc3 100644
--- a/src/makefiles/Makefile.openbsd
+++ b/src/makefiles/Makefile.openbsd
@@ -21,7 +21,7 @@ else
 	$(LD) $(LDREL) $(LDOUT) $<.obj -x $<
 	@echo building shared object $@
 	@rm -f $@.pic
-	@${AR} cq $@.pic `lorder $<.obj | tsort`
+	@${AR} cq $@.pic $<.obj
 	${RANLIB} $@.pic
 	@rm -f $@
 	$(LD) -x -Bshareable -Bforcearchive -o $@ $@.pic