Re: [PATCH] hppa: Add libphobos support

2018-12-10 Thread John David Anglin
On 2018-12-09 6:10 p.m., Iain Buclaw wrote:
> On Sun, 9 Dec 2018 at 21:16, John David Anglin  wrote:
>> The attached change implements a first cut at libphobos support on
>> hppa/glibc/linux.  Test
>> results are here:
>> .
>>
>> Okay?
>>
> >From what I can see, everything is properly scoped and looks valid (no
> accidental C-style syntax anywhere).  Looking at the test results,
> seems like nothing runs, which may not be entirely unexpected from a
> new port, but I would have expected a little better.
I see about 10% fails for gdc (27700 passes, 2641 fails).  For
libphobos, I see 242 passes and 46 fails.

I haven't had a chance to debug any of the fails.  The stack grows up on
hppa.  This is one big difference
from all other ports.  I also was a bit unsure about the setjmp
implementation.

> I've just tried
> building a cross-compiler and running some small programs under qemu,
> but it seems that nothing works under emulation, not even C programs.
I added Helge Deller to Cc.  He has worked on qemu for hppa.
> Would you mind if I send this to the upstream druntime first?
> Repository is here https://github.com/dlang/druntime
No problem.  Go ahead.

Dave

-- 
John David Anglin  dave.ang...@bell.net




Re: [PATCH] hppa: Add libphobos support

2018-12-09 Thread Iain Buclaw
On Sun, 9 Dec 2018 at 21:16, John David Anglin  wrote:
>
> The attached change implements a first cut at libphobos support on
> hppa/glibc/linux.  Test
> results are here:
> .
>
> Okay?
>

>From what I can see, everything is properly scoped and looks valid (no
accidental C-style syntax anywhere).  Looking at the test results,
seems like nothing runs, which may not be entirely unexpected from a
new port, but I would have expected a little better.  I've just tried
building a cross-compiler and running some small programs under qemu,
but it seems that nothing works under emulation, not even C programs.

Would you mind if I send this to the upstream druntime first?
Repository is here https://github.com/dlang/druntime

-- 
Iain


[PATCH] hppa: Add libphobos support

2018-12-09 Thread John David Anglin
The attached change implements a first cut at libphobos support on
hppa/glibc/linux.  Test
results are here:
.

Okay?

Dave

-- 
John David Anglin  dave.ang...@bell.net

2018-12-09  John David Anglin  

* configure.tgt: Add hppa*-*-linux* target.
* libdruntime/core/stdc/errno.d: Define for hppa/glibc/linux.
* libdruntime/core/stdc/fenv.d: Likewise.
* libdruntime/core/stdc/math.d: Likewise.
* libdruntime/core/sys/linux/dlfcn.d: Likewise.
* libdruntime/core/sys/linux/epoll.d: Likewise.
* libdruntime/core/sys/linux/link.d: Likewise.
* libdruntime/core/sys/linux/sys/eventfd.d: Likewise.
* libdruntime/core/sys/linux/sys/inotify.d: Likewise.
* libdruntime/core/sys/posix/dlfcn.d: Likewise.
* libdruntime/core/sys/posix/fcntl.d: Likewise.
* libdruntime/core/sys/posix/setjmp.d: Likewise.
* libdruntime/core/sys/posix/signal.d: Likewise.
* libdruntime/core/sys/posix/sys/socket.d: Likewise.
* libdruntime/core/sys/posix/sys/stat.d: Likewise.
* libdruntime/core/sys/posix/sys/types.d: Likewise.
* libdruntime/core/sys/posix/ucontext.d: Likewise.
* libdruntime/rt/sections_elf_shared.d: Likewise.
* src/std/experimental/allocator/building_blocks/region.d: Likewise.
* src/std/math.d: Likewise.

Index: configure.tgt
===
--- configure.tgt   (revision 266930)
+++ configure.tgt   (working copy)
@@ -24,6 +24,8 @@
 case "${target}" in
   arm*-*-linux*)
;;
+  hppa*-*-linux*)
+   ;;
   mips*-*-linux*)
;;
   x86_64-*-kfreebsd*-gnu | i?86-*-kfreebsd*-gnu)
Index: libdruntime/core/stdc/errno.d
===
--- libdruntime/core/stdc/errno.d   (revision 266930)
+++ libdruntime/core/stdc/errno.d   (working copy)
@@ -25,6 +25,7 @@
 
 version (ARM) version = ARM_Any;
 version (AArch64) version = ARM_Any;
+version (HPPA)version = HPPA_Any;
 version (MIPS32)  version = MIPS_Any;
 version (MIPS64)  version = MIPS_Any;
 version (PPC) version = PPC_Any;
@@ -421,6 +422,112 @@
 enum ERFKILL= 132;///
 enum EHWPOISON  = 133;///
 }
+else version (HPPA_Any)
+{
+enum ENOMSG = 35; ///
+enum EIDRM  = 36; ///
+enum ECHRNG = 37; ///
+enum EL2NSYNC   = 38; ///
+enum EL3HLT = 39; ///
+enum EL3RST = 40; ///
+enum ELNRNG = 41; ///
+enum EUNATCH= 42; ///
+enum ENOCSI = 43; ///
+enum EL2HLT = 44; ///
+enum EDEADLK= 45; ///
+enum EDEADLOCK  = EDEADLK;///
+enum ENOLCK = 46; ///
+enum EILSEQ = 47; ///
+enum ENONET = 50; ///
+enum ENODATA= 51; ///
+enum ETIME  = 52; ///
+enum ENOSR  = 53; ///
+enum ENOSTR = 54; ///
+enum ENOPKG = 55; ///
+enum ENOLINK= 57; ///
+enum EADV   = 58; ///
+enum ESRMNT = 59; ///
+enum ECOMM  = 60; ///
+enum EPROTO = 61; ///
+enum EMULTIHOP  = 64; ///
+enum EDOTDOT= 66; ///
+enum EBADMSG= 67; ///
+enum EUSERS = 68; ///
+enum EDQUOT = 69; ///
+enum ESTALE = 70; ///
+enum EREMOTE= 71; ///
+enum EOVERFLOW  = 72; ///
+enum EBADE  = 160;///
+enum EBADR  = 161;///
+enum EXFULL = 162;///
+enum ENOANO = 163;///
+enum EBADRQC= 164;///
+enum EBADSLT= 165;///
+enum EBFONT = 166;///
+enum ENOTUNIQ   = 167;///
+enum EBADFD = 168;///
+enum EREMCHG= 169;///
+enum ELIBACC= 170;///
+enum ELIBBAD= 171;///
+enum ELIBSCN= 172;///
+enum ELIBMAX= 173;///
+enum ELIBEXEC   = 174;///
+enum ERESTART   = 175;///
+enum ESTRPIPE   = 176;///
+enum EUCLEAN= 177;