branch: development
commit 240816b3106f29d5e21139f631f96fa2efc5f3db
Author: Michael Haubenwallner <michael.haubenwall...@ssi-schaefer.com>
AuthorDate: Thu May 11 14:10:17 2017 +0200

    libtool.m4: For MS dumpbin drop CR first.
    
    On Cygwin, gawk-4.1.4-3 and newer do not treat the input stream as text
    any more, leaving us behind with carriage return in symbol names.
    * m4/libtool.m4 (lt_cv_sys_global_symbol_pipe): In AWK script for MS
    dumpbin drop CR first.
---
 m4/libtool.m4 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index c97fdd3b..bf9e780f 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -4191,8 +4191,10 @@ for ac_symprfx in "" "_"; do
     # Fake it for dumpbin and say T for any non-static function,
     # D for any global variable and I for any imported variable.
     # Also find C++ and __fastcall symbols from MSVC++ or ICC,
-    # which start with @ or ?.
+    # which start with @ or ?.  And Cygwin gawk-4.1.4-3 and newer
+    # treats input as binary, have to drop carriage return first.
     lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {sub(/\\r\$/,\"\")};"\
 "     {last_section=section; section=\$ 3};"\
 "     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
 "     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\

Reply via email to