Commit 1f93f687 by Jakub Jelinek Committed by Jakub Jelinek

re PR libstdc++/38092 (libstdc++ doesn't build with GNU ld 2.19 and Sun as: no .symver support)

	PR libstdc++/38092
	* acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New test.
	* src/compatibility.cc: Don't use .symver directives if
	_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE is not defined.
	* config.h.in: Regenerated.
	* configure: Likewise.

From-SVN: r143169
parent 876080ff
2009-01-07 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/38092
* acinclude.m4 (HAVE_AS_SYMVER_DIRECTIVE): New test.
* src/compatibility.cc: Don't use .symver directives if
_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE is not defined.
* config.h.in: Regenerated.
* configure: Likewise.
2009-01-07 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/38466
......
......@@ -2819,6 +2819,16 @@ if test x$enable_symvers != xno ; then
[Define to use symbol versioning in the shared library.])
fi
AC_CACHE_CHECK([whether the target supports .symver directive],
glibcxx_cv_have_as_symver_directive, [
AC_TRY_COMPILE([void foo (void); __asm (".symver foo, bar@SYMVER");],
[], glibcxx_cv_have_as_symver_directive=yes,
glibcxx_cv_have_as_symver_directive=no)])
if test $glibcxx_cv_have_as_symver_directive = yes; then
AC_DEFINE(HAVE_AS_SYMVER_DIRECTIVE, 1,
[Define to 1 if the target assembler supports .symver directive.])
fi
AC_SUBST(SYMVER_FILE)
AC_SUBST(port_specific_symbol_files)
GLIBCXX_CONDITIONAL(ENABLE_SYMVERS, test $enable_symvers != no)
......
......@@ -12,6 +12,9 @@
/* Define to 1 if you have the `asinl' function. */
#undef HAVE_ASINL
/* Define to 1 if the target assembler supports .symver directive. */
#undef HAVE_AS_SYMVER_DIRECTIVE
/* Define to 1 if you have the `atan2f' function. */
#undef HAVE_ATAN2F
......
......@@ -107738,6 +107738,68 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking whether the target supports .symver directive" >&5
echo $ECHO_N "checking whether the target supports .symver directive... $ECHO_C" >&6
if test "${glibcxx_cv_have_as_symver_directive+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
void foo (void); __asm (".symver foo, bar@SYMVER");
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
glibcxx_cv_have_as_symver_directive=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
glibcxx_cv_have_as_symver_directive=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $glibcxx_cv_have_as_symver_directive" >&5
echo "${ECHO_T}$glibcxx_cv_have_as_symver_directive" >&6
if test $glibcxx_cv_have_as_symver_directive = yes; then
cat >>confdefs.h <<\_ACEOF
#define HAVE_AS_SYMVER_DIRECTIVE 1
_ACEOF
fi
// Compatibility symbols for previous versions -*- C++ -*-
// Copyright (C) 2005, 2006
// Copyright (C) 2005, 2006, 2009
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
......@@ -30,7 +30,8 @@
#include <bits/c++config.h>
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC)
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)
#define istreambuf_iterator istreambuf_iteratorXX
#define basic_fstream basic_fstreamXX
#define basic_ifstream basic_ifstreamXX
......@@ -204,7 +205,8 @@ _GLIBCXX_END_NAMESPACE
// NB: These symbols renames should go into the shared library only,
// and only those shared libraries that support versioning.
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC)
#if defined(_GLIBCXX_SYMVER_GNU) && defined(PIC) \
&& defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE)
/* gcc-3.4.4
_ZNSt19istreambuf_iteratorIcSt11char_traitsIcEEppEv
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment