This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Updated baseline_symbols.txt


On Fri, Mar 21, 2008 at 06:20:17AM -0500, Benjamin Kosnik wrote:
> 2008-03-20  Benjamin Kosnik  <bkoz@redhat.com>
> 
> 	* testsuite/util/testsuite_abi.cc: Add support for not counting
> 	GLIBCXX_LDBL_* compat symbols missing if no long double compat
> 	symbols under test.

Thanks for working on this.

> Index: testsuite/util/testsuite_abi.cc
> ===================================================================
> --- testsuite/util/testsuite_abi.cc	(revision 133415)
> +++ testsuite/util/testsuite_abi.cc	(working copy)
> @@ -354,6 +354,16 @@
>        exit(2);
>      }
>  
> +  // Check to see if any long double compatibility symbols are produced.
> +  bool ld_version_found(false);
> +  symbol_objects::iterator li(test_objects.begin());
> +  while (!ld_version_found && li != test_objects.end())
> +    {
> +      if (li->second.version_name.find("GLIBCXX_LDBL_") != std::string::npos)
> +	ld_version_found = true;
> +      ++li;
> +    }

"CXXABI_LDBL_" should be treated the same as "GLIBCXX_LDBL_".

> +      // is a baseline long double symbol, skip.
> +      if (!ld_version_found
> +	  && base.version_name.find("GLIBCXX_LDBL_") != std::string::npos)
> +	continue;
> +      else
> +	{
> +	  base.status = symbol::subtracted;
> +	  incompatible.push_back(symbol_pair(base, base));
> +	}
>      }
>  
>    // Check shared names for compatibility.

BTW, there is another issue with symbol checking.  E.g.
powerpc64-linux-gnu gcc can be configured either defaulting to -m32
(--with-cpu=default32) or defaulting to -m64 (and similarly
sparc64-linux-gnu, and a bunch of others). 
config/abi/post/powerpc64-linux-gnu/ etc. contain the baseline_symbols.txt
for the -m64 defaulting variant, so the --with-cpu=default32 configured
compilers fail ABI checking, because the toplevel baseline_symbols.txt
is 64-bit, but . multilib in such compiler is 32-bit, and 32/ subdirectory
contains 32-bit baseline_symbols.txt, while there is no 32/ multilib,
but 64/ multilib.
So, configure needs to do more work than just
baseline_dir="$glibcxx_srcdir/config/abi/post/${abi_baseline_pair}\$(MULTISUBDIR)"
which is good as a default, but might need a switch based on
abi_baseline_pair and MULTISUBDIR.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]