public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix finding default baseline symbols directory
@ 2014-09-26 21:42 Andreas Schwab
  2014-09-29 13:08 ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2014-09-26 21:42 UTC (permalink / raw)
  To: libstdc++; +Cc: gcc-patches

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
-- 
2.1.1

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix finding default baseline symbols directory
  2014-09-26 21:42 [PATCH] Fix finding default baseline symbols directory Andreas Schwab
@ 2014-09-29 13:08 ` Jonathan Wakely
  2014-09-29 17:24   ` Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Wakely @ 2014-09-29 13:08 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libstdc++, gcc-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix finding default baseline symbols directory
  2014-09-29 13:08 ` Jonathan Wakely
@ 2014-09-29 17:24   ` Andreas Schwab
  2014-09-29 18:38     ` Jonathan Wakely
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2014-09-29 17:24 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches

Jonathan Wakely <jwakely@redhat.com> writes:

> 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

IMHO it doesn't make sense to use try_cpu here if it is generic.

	* configure.host (abi_baseline_pair): If try_cpu is generic use
	host_cpu for the default.

diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
index a12871a..d1298c4 100644
--- a/libstdc++-v3/configure.host
+++ b/libstdc++-v3/configure.host
@@ -346,8 +346,13 @@ 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 $try_cpu = generic; then
+          try_abi_cpu=$host_cpu
+        else
+          try_abi_cpu=$try_cpu
+        fi
+        if test -d ${glibcxx_srcdir}/config/abi/post/${try_abi_cpu}-linux-gnu; then
+          abi_baseline_pair=${try_abi_cpu}-linux-gnu
         fi
     esac
     case "${host}" in

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix finding default baseline symbols directory
  2014-09-29 17:24   ` Andreas Schwab
@ 2014-09-29 18:38     ` Jonathan Wakely
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Wakely @ 2014-09-29 18:38 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libstdc++, gcc-patches

On 29/09/14 19:24 +0200, Andreas Schwab wrote:
>Jonathan Wakely <jwakely@redhat.com> writes:
>
>> 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
>
>IMHO it doesn't make sense to use try_cpu here if it is generic.
>
>	* configure.host (abi_baseline_pair): If try_cpu is generic use
>	host_cpu for the default.
>
>diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
>index a12871a..d1298c4 100644
>--- a/libstdc++-v3/configure.host
>+++ b/libstdc++-v3/configure.host
>@@ -346,8 +346,13 @@ 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 $try_cpu = generic; then
>+          try_abi_cpu=$host_cpu
>+        else
>+          try_abi_cpu=$try_cpu
>+        fi
>+        if test -d ${glibcxx_srcdir}/config/abi/post/${try_abi_cpu}-linux-gnu; then
>+          abi_baseline_pair=${try_abi_cpu}-linux-gnu
>         fi
>     esac
>     case "${host}" in

Yes, that looks sensible to me - OK for trunk, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-29 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-26 21:42 [PATCH] Fix finding default baseline symbols directory Andreas Schwab
2014-09-29 13:08 ` Jonathan Wakely
2014-09-29 17:24   ` Andreas Schwab
2014-09-29 18:38     ` Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).