]> granicus.if.org Git - postgresql/commitdiff
Sort $(wildcard) output where needed for reproducible build output.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Jan 2016 20:47:05 +0000 (15:47 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 Jan 2016 20:47:05 +0000 (15:47 -0500)
The order of inclusion of .o files makes a difference in linker output;
not a functional difference, but still a bitwise difference, which annoys
some packagers who would like reproducible builds.

Report and patch by Christoph Berg

contrib/hstore_plperl/Makefile
contrib/hstore_plpython/Makefile
contrib/ltree_plpython/Makefile
src/bin/pg_xlogdump/Makefile

index 8f7b171bcd611abc68f28dcecc9212ea87a4b536..b3b8654bc80d068528002452a3bba66da3efc7c1 100644 (file)
@@ -32,7 +32,7 @@ endif
 ifeq ($(PORTNAME), win32)
 # these settings are the same as for plperl
 override CPPFLAGS += -DPLPERL_HAVE_UID_GID -Wno-comment
-SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plperl/libperl*.a)
+SHLIB_LINK += ../hstore/libhstore.a $(sort $(wildcard ../../src/pl/plperl/libperl*.a))
 endif
 
 ifeq ($(PORTNAME), cygwin)
index 2de00a2c43c9ce83a34787a2f086a487ae5f78d8..c4dad6f1119c255b5d60a8078fb25f60bf21d87c 100644 (file)
@@ -27,10 +27,10 @@ endif
 # dependency.  This does preclude pgxs builds.
 ifeq ($(PORTNAME), aix)
 rpathdir = $(pkglibdir):$(python_libdir)
-SHLIB_LINK += ../hstore/libhstore.exp $(python_libspec) $(python_additional_libs) $(wildcard ../../src/pl/plpython/libplpython*.exp)
+SHLIB_LINK += ../hstore/libhstore.exp $(python_libspec) $(python_additional_libs) $(sort $(wildcard ../../src/pl/plpython/libplpython*.exp))
 endif
 ifeq ($(PORTNAME), win32)
-SHLIB_LINK += ../hstore/libhstore.a $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
+SHLIB_LINK += ../hstore/libhstore.a $(sort $(wildcard ../../src/pl/plpython/libpython*.a)) $(sort $(wildcard ../../src/pl/plpython/libplpython*.a))
 endif
 
 ifeq ($(PORTNAME), cygwin)
index 7eacb40115944deb4647b621f0c07d303074deae..08186f19a139e22ad753452709898646e4edc116 100644 (file)
@@ -27,10 +27,10 @@ endif
 # dependency.  This does preclude pgxs builds.
 ifeq ($(PORTNAME), aix)
 rpathdir = $(pkglibdir):$(python_libdir)
-SHLIB_LINK += $(python_libspec) $(python_additional_libs) $(wildcard ../../src/pl/plpython/libplpython*.exp)
+SHLIB_LINK += $(python_libspec) $(python_additional_libs) $(sort $(wildcard ../../src/pl/plpython/libplpython*.exp))
 endif
 ifeq ($(PORTNAME), win32)
-SHLIB_LINK += $(wildcard ../../src/pl/plpython/libpython*.a) $(wildcard ../../src/pl/plpython/libplpython*.a)
+SHLIB_LINK += $(sort $(wildcard ../../src/pl/plpython/libpython*.a)) $(sort $(wildcard ../../src/pl/plpython/libplpython*.a))
 endif
 
 ifeq ($(PORTNAME), cygwin)
index 315e869ffe0b67d72724837a67d001677387e046..11df47d51697448eb368479efe771527b399cc02 100644 (file)
@@ -12,7 +12,7 @@ OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
 
 override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
 
-RMGRDESCSOURCES = $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c))
+RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
 RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))