From: Olivier Blin Date: Wed, 9 Oct 2013 21:33:39 +0000 (-0700) Subject: libtool: Fix detection of ld version with parentheses. X-Git-Tag: v2.4.2.418~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f51e6182e458ae70479590efbe322a27ee8844a;p=thirdparty%2Flibtool.git libtool: Fix detection of ld version with parentheses. ld from crosstool-NG reports a version string with an extra version number in a parenthetical note: GNU ld (crosstool-NG 1.13.0) 2.21.1 This made libtool assume that the ld version was the crosstool-NG version (1.13.0) instead of the real ld version (2.21.1). To fix the ld version string, this patch filters out any string between parentheses that is followed by a space. Because of this bug, filtering of exported symbols was not taking place with crosstool-NG toolchains. This issue has bee noticed when building pango, which exported harfbuzz symbols that should have remained hidden. Copyright-paperwork-exempt: Yes --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 3a87714ea..3cc1a4bf2 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -4818,7 +4818,7 @@ dnl Note also adjust exclude_expsyms for C++ above. _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no - case `$LD -v 2>&1` in + case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...