From: jakub Date: Tue, 5 Mar 2002 21:12:17 +0000 (+0000) Subject: * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version X-Git-Tag: upstream/4.9.2~88296 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a294d6c3c2d8981ac3641041aa764f5fc4aec9c9;p=platform%2Fupstream%2Flinaro-gcc.git * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version script globbing in ld. * aclocal.m4: Rebuilt. * configure: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50330 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 55e64bc..5b871f6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2002-03-05 Jakub Jelinek + + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version + script globbing in ld. + * aclocal.m4: Rebuilt. + * configure: Rebuilt. + 2002-03-05 Benjamin Kosnik * docs/html/17_intro/RELEASE-NOTES: Update. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 95fdc9d..c780011 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2082,10 +2082,27 @@ glibcpp_min_gnu_ld_version=21200 # above. if test $enable_symvers = yes ; then if test $with_gnu_ld = yes && - test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version && test $glibcpp_shared_libgcc = yes ; then - enable_symvers=gnu + if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then + enable_symvers=gnu + else + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS='-shared -Wl,--version-script,conftest.map' + enable_symvers=no + changequote(,) + echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map + changequote([,]) + AC_TRY_LINK([int foo;],, enable_symvers=gnu) + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + else + # this is the suspicious part + CFLAGS='' + fi + rm -f conftest.map + fi else # just fail for now enable_symvers=no diff --git a/libstdc++-v3/aclocal.m4 b/libstdc++-v3/aclocal.m4 index f8f9b5b..bd5689e 100644 --- a/libstdc++-v3/aclocal.m4 +++ b/libstdc++-v3/aclocal.m4 @@ -2094,10 +2094,27 @@ glibcpp_min_gnu_ld_version=21200 # above. if test $enable_symvers = yes ; then if test $with_gnu_ld = yes && - test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version && test $glibcpp_shared_libgcc = yes ; then - enable_symvers=gnu + if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then + enable_symvers=gnu + else + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS='-shared -Wl,--version-script,conftest.map' + enable_symvers=no + changequote(,) + echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map + changequote([,]) + AC_TRY_LINK([int foo;],, enable_symvers=gnu) + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + else + # this is the suspicious part + CFLAGS='' + fi + rm -f conftest.map + fi else # just fail for now enable_symvers=no diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index eeeb63a..10b7d22 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -19349,10 +19349,42 @@ glibcpp_min_gnu_ld_version=21200 # above. if test $enable_symvers = yes ; then if test $with_gnu_ld = yes && - test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version && test $glibcpp_shared_libgcc = yes ; then - enable_symvers=gnu + if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then + enable_symvers=gnu + else + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS='-shared -Wl,--version-script,conftest.map' + enable_symvers=no + + echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map + + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + enable_symvers=gnu +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + else + # this is the suspicious part + CFLAGS='' + fi + rm -f conftest.map + fi else # just fail for now enable_symvers=no