]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool.m4: For MS dumpbin drop CR first.
authorMichael Haubenwallner <michael.haubenwallner@ssi-schaefer.com>
Thu, 11 May 2017 12:10:17 +0000 (14:10 +0200)
committerIleana Dumitrescu <ileanadumitrescu95@gmail.com>
Thu, 7 Aug 2025 17:20:02 +0000 (20:20 +0300)
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

index c97fdd3bb0fc01aa48c86fea39ec04a669598650..bf9e780f3a2c340844eef9ece1aaf48f06d3161a 100644 (file)
@@ -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};"\