]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Fix detection of ld version with parentheses.
authorOlivier Blin <olivier.blin@softathome.com>
Wed, 9 Oct 2013 21:33:39 +0000 (14:33 -0700)
committerBrooks Moses <bmoses@google.com>
Wed, 9 Oct 2013 21:33:39 +0000 (14:33 -0700)
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

m4/libtool.m4

index 3a87714eadc8dd275af968b21db998c3e4c6d3bf..3cc1a4bf247ed723f987ee482371708debfa91e0 100644 (file)
@@ -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 ...