public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
@ 2019-04-23 23:00 Iain Buclaw
  2019-04-24  7:33 ` Andreas Schwab
  0 siblings, 1 reply; 7+ messages in thread
From: Iain Buclaw @ 2019-04-23 23:00 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 328 bytes --]

Hi,

This patch adds arch64*-*-linux* as a supported libphobos target,
something that has been passing the testsuite for a while now.

Committed to trunk as r270524.

-- 
Iain
---
libphobos/ChangeLog:

2019-04-24  Iain Buclaw  <ibuclaw@gdcproject.org>

        * configure.tgt: Add aarch64*-*-linux* as a supported target.

---

[-- Attachment #2: aarch64-d.patch --]
[-- Type: text/x-patch, Size: 389 bytes --]

diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt
index a53a3c3c3be..b2fe849752c 100644
--- a/libphobos/configure.tgt
+++ b/libphobos/configure.tgt
@@ -23,6 +23,9 @@
 # broken systems.  More targets shall be added after testing.
 LIBPHOBOS_SUPPORTED=no
 case "${target}" in
+  aarch64*-*-linux*)
+	LIBPHOBOS_SUPPORTED=yes
+	;;
   arm*-*-linux*)
 	LIBPHOBOS_SUPPORTED=yes
 	;;

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-23 23:00 [PATCH, libphobos] Committed added AArch64 Linux as a supported target Iain Buclaw
@ 2019-04-24  7:33 ` Andreas Schwab
  2019-04-24 11:25   ` Iain Buclaw
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Schwab @ 2019-04-24  7:33 UTC (permalink / raw)
  To: Iain Buclaw; +Cc: gcc-patches

On Apr 24 2019, Iain Buclaw <ibuclaw@gdcproject.org> wrote:

> This patch adds arch64*-*-linux* as a supported libphobos target,
> something that has been passing the testsuite for a while now.
>
> Committed to trunk as r270524.

That breaks -mabi=ilp32:

/opt/gcc/gcc-20190424/libphobos/libdruntime/core/sys/posix/sys/stat.d:713:13: error: static assert  (104u == 128u) is false
  713 |             static assert(stat_t.sizeof == 128);
      |             ^
make[8]: *** [Makefile:2047: core/sys/posix/fcntl.lo] Error 1

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-24  7:33 ` Andreas Schwab
@ 2019-04-24 11:25   ` Iain Buclaw
  2019-04-25 14:41     ` Richard Earnshaw (lists)
  0 siblings, 1 reply; 7+ messages in thread
From: Iain Buclaw @ 2019-04-24 11:25 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

On Wed, 24 Apr 2019 at 09:33, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Apr 24 2019, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
>
> > This patch adds arch64*-*-linux* as a supported libphobos target,
> > something that has been passing the testsuite for a while now.
> >
> > Committed to trunk as r270524.
>
> That breaks -mabi=ilp32:
>
> /opt/gcc/gcc-20190424/libphobos/libdruntime/core/sys/posix/sys/stat.d:713:13: error: static assert  (104u == 128u) is false
>   713 |             static assert(stat_t.sizeof == 128);
>       |             ^
> make[8]: *** [Makefile:2047: core/sys/posix/fcntl.lo] Error 1
>

Confirmed, I've sent fix to upstream and committed as r270541.

Tested this on aarch64-linux-gnu, though as I don't have ilp32
libraries on my arm64 phone, I can only see that all modules compile
down to object code.

-- 
Iain
---

[-- Attachment #2: druntime51365217.patch --]
[-- Type: text/x-patch, Size: 1031 bytes --]

diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
index 27dfc5fc1d9..9fe51fd5ae9 100644
--- a/libphobos/libdruntime/MERGE
+++ b/libphobos/libdruntime/MERGE
@@ -1,4 +1,4 @@
-b43203a134fb5e259ffc1711cc061c6e869b56f6
+513652173d6f02206be3ddaa2b6ed0b191ea4e3d
 
 The first line of this file holds the git revision number of the last
 merge done from the dlang/druntime repository.
diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
index ab1fcd7b164..963a241f076 100644
--- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
+++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
@@ -709,10 +709,10 @@ version (CRuntime_Glibc)
             }
             int[2] __unused;
         }
-        static if (__USE_FILE_OFFSET64)
+        version (D_LP64)
             static assert(stat_t.sizeof == 128);
         else
-            static assert(stat_t.sizeof == 128);
+            static assert(stat_t.sizeof == 104);
     }
     else version (SPARC64)
     {

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-24 11:25   ` Iain Buclaw
@ 2019-04-25 14:41     ` Richard Earnshaw (lists)
  2019-04-25 14:46       ` Iain Buclaw
  2019-04-25 15:59       ` Jakub Jelinek
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Earnshaw (lists) @ 2019-04-25 14:41 UTC (permalink / raw)
  To: Iain Buclaw, Andreas Schwab; +Cc: gcc-patches

On 24/04/2019 12:10, Iain Buclaw wrote:
> On Wed, 24 Apr 2019 at 09:33, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Apr 24 2019, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
>>
>>> This patch adds arch64*-*-linux* as a supported libphobos target,
>>> something that has been passing the testsuite for a while now.
>>>
>>> Committed to trunk as r270524.
>>
>> That breaks -mabi=ilp32:
>>
>> /opt/gcc/gcc-20190424/libphobos/libdruntime/core/sys/posix/sys/stat.d:713:13: error: static assert  (104u == 128u) is false
>>   713 |             static assert(stat_t.sizeof == 128);
>>       |             ^
>> make[8]: *** [Makefile:2047: core/sys/posix/fcntl.lo] Error 1
>>
> 
> Confirmed, I've sent fix to upstream and committed as r270541.
> 
> Tested this on aarch64-linux-gnu, though as I don't have ilp32
> libraries on my arm64 phone, I can only see that all modules compile
> down to object code.
> 
> 
> druntime51365217.patch
> 
> diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
> index 27dfc5fc1d9..9fe51fd5ae9 100644
> --- a/libphobos/libdruntime/MERGE
> +++ b/libphobos/libdruntime/MERGE
> @@ -1,4 +1,4 @@
> -b43203a134fb5e259ffc1711cc061c6e869b56f6
> +513652173d6f02206be3ddaa2b6ed0b191ea4e3d
>  
>  The first line of this file holds the git revision number of the last
>  merge done from the dlang/druntime repository.
> diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
> index ab1fcd7b164..963a241f076 100644
> --- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
> +++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
> @@ -709,10 +709,10 @@ version (CRuntime_Glibc)
>              }
>              int[2] __unused;
>          }
> -        static if (__USE_FILE_OFFSET64)
> +        version (D_LP64)
>              static assert(stat_t.sizeof == 128);
>          else
> -            static assert(stat_t.sizeof == 128);
> +            static assert(stat_t.sizeof == 104);

I can't be sure just from the context, but 104 looks suspicious.  Maybe
that should be 64?

R.

>      }
>      else version (SPARC64)
>      {
> 

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-25 14:41     ` Richard Earnshaw (lists)
@ 2019-04-25 14:46       ` Iain Buclaw
  2019-04-25 15:59       ` Jakub Jelinek
  1 sibling, 0 replies; 7+ messages in thread
From: Iain Buclaw @ 2019-04-25 14:46 UTC (permalink / raw)
  To: Richard Earnshaw (lists); +Cc: Andreas Schwab, gcc-patches

On Thu, 25 Apr 2019 at 16:32, Richard Earnshaw (lists)
<Richard.Earnshaw@arm.com> wrote:
>
> On 24/04/2019 12:10, Iain Buclaw wrote:
> > On Wed, 24 Apr 2019 at 09:33, Andreas Schwab <schwab@linux-m68k.org> wrote:
> >>
> >> On Apr 24 2019, Iain Buclaw <ibuclaw@gdcproject.org> wrote:
> >>
> >>> This patch adds arch64*-*-linux* as a supported libphobos target,
> >>> something that has been passing the testsuite for a while now.
> >>>
> >>> Committed to trunk as r270524.
> >>
> >> That breaks -mabi=ilp32:
> >>
> >> /opt/gcc/gcc-20190424/libphobos/libdruntime/core/sys/posix/sys/stat.d:713:13: error: static assert  (104u == 128u) is false
> >>   713 |             static assert(stat_t.sizeof == 128);
> >>       |             ^
> >> make[8]: *** [Makefile:2047: core/sys/posix/fcntl.lo] Error 1
> >>
> >
> > Confirmed, I've sent fix to upstream and committed as r270541.
> >
> > Tested this on aarch64-linux-gnu, though as I don't have ilp32
> > libraries on my arm64 phone, I can only see that all modules compile
> > down to object code.
> >
> >
> > druntime51365217.patch
> >
> > diff --git a/libphobos/libdruntime/MERGE b/libphobos/libdruntime/MERGE
> > index 27dfc5fc1d9..9fe51fd5ae9 100644
> > --- a/libphobos/libdruntime/MERGE
> > +++ b/libphobos/libdruntime/MERGE
> > @@ -1,4 +1,4 @@
> > -b43203a134fb5e259ffc1711cc061c6e869b56f6
> > +513652173d6f02206be3ddaa2b6ed0b191ea4e3d
> >
> >  The first line of this file holds the git revision number of the last
> >  merge done from the dlang/druntime repository.
> > diff --git a/libphobos/libdruntime/core/sys/posix/sys/stat.d b/libphobos/libdruntime/core/sys/posix/sys/stat.d
> > index ab1fcd7b164..963a241f076 100644
> > --- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
> > +++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
> > @@ -709,10 +709,10 @@ version (CRuntime_Glibc)
> >              }
> >              int[2] __unused;
> >          }
> > -        static if (__USE_FILE_OFFSET64)
> > +        version (D_LP64)
> >              static assert(stat_t.sizeof == 128);
> >          else
> > -            static assert(stat_t.sizeof == 128);
> > +            static assert(stat_t.sizeof == 104);
>
> I can't be sure just from the context, but 104 looks suspicious.  Maybe
> that should be 64?
>

Don't think so.  GCC is agreeing with GDC at least on my aarch64-linux
phone, the `sizeof (struct stat)` does genuinely appear to be 104 when
-mabi=ilp32.

-- 
Iain

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-25 14:41     ` Richard Earnshaw (lists)
  2019-04-25 14:46       ` Iain Buclaw
@ 2019-04-25 15:59       ` Jakub Jelinek
  2019-04-25 16:40         ` Richard Earnshaw (lists)
  1 sibling, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2019-04-25 15:59 UTC (permalink / raw)
  To: Richard Earnshaw (lists); +Cc: Iain Buclaw, Andreas Schwab, gcc-patches

On Thu, Apr 25, 2019 at 03:32:41PM +0100, Richard Earnshaw (lists) wrote:
> > --- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
> > +++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
> > @@ -709,10 +709,10 @@ version (CRuntime_Glibc)
> >              }
> >              int[2] __unused;
> >          }
> > -        static if (__USE_FILE_OFFSET64)
> > +        version (D_LP64)
> >              static assert(stat_t.sizeof == 128);
> >          else
> > -            static assert(stat_t.sizeof == 128);
> > +            static assert(stat_t.sizeof == 104);
> 
> I can't be sure just from the context, but 104 looks suspicious.  Maybe
> that should be 64?

Why?  Not all struct stat fields are pointers or longs that double for -m64
vs. -m32.

	Jakub

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

* Re: [PATCH, libphobos] Committed added AArch64 Linux as a supported target.
  2019-04-25 15:59       ` Jakub Jelinek
@ 2019-04-25 16:40         ` Richard Earnshaw (lists)
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Earnshaw (lists) @ 2019-04-25 16:40 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Iain Buclaw, Andreas Schwab, gcc-patches

On 25/04/2019 16:45, Jakub Jelinek wrote:
> On Thu, Apr 25, 2019 at 03:32:41PM +0100, Richard Earnshaw (lists) wrote:
>>> --- a/libphobos/libdruntime/core/sys/posix/sys/stat.d
>>> +++ b/libphobos/libdruntime/core/sys/posix/sys/stat.d
>>> @@ -709,10 +709,10 @@ version (CRuntime_Glibc)
>>>              }
>>>              int[2] __unused;
>>>          }
>>> -        static if (__USE_FILE_OFFSET64)
>>> +        version (D_LP64)
>>>              static assert(stat_t.sizeof == 128);
>>>          else
>>> -            static assert(stat_t.sizeof == 128);
>>> +            static assert(stat_t.sizeof == 104);
>>
>> I can't be sure just from the context, but 104 looks suspicious.  Maybe
>> that should be 64?
> 
> Why?  Not all struct stat fields are pointers or longs that double for -m64
> vs. -m32.
> 
> 	Jakub
> 

I was forgetting that these were byte counts, not bit counts.  Makes
more sense when you realize that...

R.

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

end of thread, other threads:[~2019-04-25 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 23:00 [PATCH, libphobos] Committed added AArch64 Linux as a supported target Iain Buclaw
2019-04-24  7:33 ` Andreas Schwab
2019-04-24 11:25   ` Iain Buclaw
2019-04-25 14:41     ` Richard Earnshaw (lists)
2019-04-25 14:46       ` Iain Buclaw
2019-04-25 15:59       ` Jakub Jelinek
2019-04-25 16:40         ` Richard Earnshaw (lists)

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).