[PATCH] Fix finding default baseline symbols directory

Jonathan Wakely jwakely@redhat.com
Mon Sep 29 13:08:00 GMT 2014


On 26/09/14 23:42 +0200, Andreas Schwab wrote:
>Tested on aarch64-suse-linux, where try_cpu=generic.
>
>Andreas.
>
>	* configure.host: Use host_cpu, not try_cpu, to define default
>	abi_baseline_pair.
>---
> libstdc++-v3/configure.host | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
>index a12871a..abfd609 100644
>--- a/libstdc++-v3/configure.host
>+++ b/libstdc++-v3/configure.host
>@@ -346,8 +346,8 @@ case "${host}" in
>         abi_baseline_pair=x86_64-linux-gnu
>         ;;
>       *)
>-        if test -d ${glibcxx_srcdir}/config/abi/post/${try_cpu}-linux-gnu; then
>-          abi_baseline_pair=${try_cpu}-linux-gnu
>+        if test -d ${glibcxx_srcdir}/config/abi/post/${host_cpu}-linux-gnu; then
>+          abi_baseline_pair=${host_cpu}-linux-gnu
>         fi
>     esac
>     case "${host}" in

Is this definitely right?

If someone builds a target such as alphaev68-unknown-linux-gnu then
try_cpu will be set to alpha by the first case in that file, and so it
will use the alpha-linux-gnu baseline file today, but with your change
it would try to use a alphaev68-linux-gnu baseline file which doesn't
exist.

Would a safer change be to just add a new pattern for aarch64?

--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -345,6 +345,9 @@ case "${host}" in
       x86_64)
         abi_baseline_pair=x86_64-linux-gnu
         ;;
+      aarch64)
+        abi_baseline_pair=aarch64-linux-gnu
+        ;;
       *)
         if test -d ${glibcxx_srcdir}/config/abi/post/${try_cpu}-linux-gnu; then
           abi_baseline_pair=${try_cpu}-linux-gnu



More information about the Gcc-patches mailing list