It seems mingw accepts the -Wl,--version-script parameters, but it does
not seem to do anything.  In particular, a 'local: *;' statement does
not remove internal symbols from the resulting DLL.  The m4 test could
be improved to detect this problem, by building a DLL and then building
a program that attempts to access an internal symbol in the DLL, but
that seems rather difficult.  So meanwhile I pushed the comment below.

/Simon

>From 87fbe6f301542875360b02c7762810fdafc23ba4 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <si...@josefsson.org>
Date: Fri, 3 Apr 2009 14:22:06 +0200
Subject: [PATCH] lib-symbol-versions: Add comment about false positive on mingw.

---
 ChangeLog               |    4 ++++
 m4/ld-version-script.m4 |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index aeba6b7..ba15752 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-03  Simon Josefsson  <si...@josefsson.org>
+
+       * m4/ld-version-script.m4: Add FIXME comment.
+
 2009-04-02  Simon Josefsson  <si...@josefsson.org>
 
        * doc/ld-output-def.texi: Use DLL_VERSION instead of confusing
diff --git a/m4/ld-version-script.m4 b/m4/ld-version-script.m4
index e321347..a97888f 100644
--- a/m4/ld-version-script.m4
+++ b/m4/ld-version-script.m4
@@ -6,6 +6,11 @@ dnl with or without modifications, as long as this notice is 
preserved.
 
 dnl From Simon Josefsson
 
+# FIXME: The test below returns a false positive for mingw
+# cross-compiles, 'local:' statements does not reduce number of
+# exported symbols in a DLL.  Use --disable-ld-version-script to work
+# around the problem.
+
 # gl_LD_VERSION_SCRIPT
 # --------------------
 # Check if LD supports linker scripts, and define automake conditional
-- 
1.5.6.5



Reply via email to