Use --disable-auto-import linker switch in Mingw builds, too.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 12 Feb 2014 17:03:53 +0000 (12:03 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 12 Feb 2014 17:03:53 +0000 (12:03 -0500)
This is evidently the default on buildfarm member narwhal, but that
is a pretty ancient Mingw version, and there is reason to think that
more recent versions of GNU ld have this feature turned on by default.
Since we are trying to achieve consistency of link behavior across
all Windows toolchains, let's just make sure here.

src/template/win32

index 71f5fa1c1bf62d811a5eb336c2b31668c356d86c..dc5b77ec0768a5a90388ce74cf2a59d2b3335965 100644 (file)
@@ -1,3 +1,6 @@
+# src/template/win32
+
 # --allow-multiple-definition is required to link pg_dump because it finds
-# pg_toupper() in both libpq and pgport
-LDFLAGS="-Wl,--allow-multiple-definition"
+# pg_toupper() etc. in both libpq and pgport
+# --disable-auto-import is to ensure we get MSVC-like linking behavior
+LDFLAGS="-Wl,--allow-multiple-definition -Wl,--disable-auto-import"