Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Samuel Thibault
Svante Signell, on Wed 04 May 2016 23:25:28 +0200, wrote:
> On Wed, 2016-05-04 at 23:06 +0200, Samuel Thibault wrote:
> > Svante Signell, on Wed 04 May 2016 19:43:27 +0200, wrote:
> > > May I comment on Debian way of apt-get source gcc-*: Doing that
> > > does
> > > not unpack the sources, neither does it apply the patches, you have
> > > to
> > > unpack and patch before you can change sources and update patches.
> > > Iv'e
> > > patched the sources several times and still find that the updated
> > > patches are not included in the next build. Really confusing.
> > 
> > Did you read debian/README.source?
> 
> Now I have read it, but still cannot find a convincing reason for doing
> things this way, sorry! Matthias, why? There should be very strong
> arguments for the present procedure.

See rules.patch. You can't get this behavior with the simple dpkg
patching.

Samuel


Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Svante Signell
On Wed, 2016-05-04 at 23:06 +0200, Samuel Thibault wrote:
> Svante Signell, on Wed 04 May 2016 19:43:27 +0200, wrote:
> > May I comment on Debian way of apt-get source gcc-*: Doing that
> > does
> > not unpack the sources, neither does it apply the patches, you have
> > to
> > unpack and patch before you can change sources and update patches.
> > Iv'e
> > patched the sources several times and still find that the updated
> > patches are not included in the next build. Really confusing.
> 
> Did you read debian/README.source?

Now I have read it, but still cannot find a convincing reason for doing
things this way, sorry! Matthias, why? There should be very strong
arguments for the present procedure.




Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Samuel Thibault
Svante Signell, on Wed 04 May 2016 19:43:27 +0200, wrote:
> May I comment on Debian way of apt-get source gcc-*: Doing that does
> not unpack the sources, neither does it apply the patches, you have to
> unpack and patch before you can change sources and update patches. Iv'e
> patched the sources several times and still find that the updated
> patches are not included in the next build. Really confusing.

Did you read debian/README.source?

Samuel


Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Eric Botcazou
> I.e. the proposed change below.

Applied on mainline and 6 branch.  Please post patches as attachments instead 
of plain text though, this avoids nasty surprises from mail readers.

-- 
Eric Botcazou


Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Svante Signell
On Wed, 2016-05-04 at 18:43 +0200, Svante Signell wrote:
> OnSamuel Thibault, on Wed 04 May 2016 17:29:48 +0200, wrote:
> > 
> > > -   --  From: /usr/include/unistd.h __getpagesize or
> > > getpagesize??
> > > -   function Get_Page_Size return int;
> > > +   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or
> > > getpagesize??
> > > +   function Get_Page_Size return size_t;
> > > +   function Get_Page_Size return Address;
> > > 
> > > Why using size_t and Address?  Other OSes use int, and the
> > > prototype for
> > > getpagesize is returning int.
> > > 
> > > Also, don't use the __ versions of the glibc functions, they are
> > > internal aliases, the API is without __.
> > > 
> > 
> I thought I did change that, but apparently not. I did such a change,
> but it was probably somewhere else. Please submit your patch upstream
> and to Debian.

No it was not somewhere else. I did change that, see Debian bug
#811063. I even built gcc-6 to make sure everything was OK. And still
it did not get into the updated patch, strange.

May I comment on Debian way of apt-get source gcc-*: Doing that does
not unpack the sources, neither does it apply the patches, you have to
unpack and patch before you can change sources and update patches. Iv'e
patched the sources several times and still find that the updated
patches are not included in the next build. Really confusing.

Thanks!



Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Svante Signell
On Wed, 2016-05-04 at 17:34 +0200, Samuel Thibault wrote:
> Samuel Thibault, on Wed 04 May 2016 17:29:48 +0200, wrote:
> > The gcc-6 build failed. I see that one of the change is:
> > 
> > -   --  From: /usr/include/unistd.h __getpagesize or getpagesize??
> > -   function Get_Page_Size return int;
> > +   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or
> > getpagesize??
> > +   function Get_Page_Size return size_t;
> > +   function Get_Page_Size return Address;
> > 
> > Why using size_t and Address?  Other OSes use int, and the
> > prototype for
> > getpagesize is returning int.
> > 
> > Also, don't use the __ versions of the glibc functions, they are
> > internal aliases, the API is without __.
> 
> I.e. the proposed change below.
> 
> Samuel
> 
> 
> 2016-05-04  Samuel Thibault  
> 
> * s-osinte-gnu.ads: Make Get_Page_Size return int, and make it
> usehome/srs/DEBs/gcc-5/gcc-5-5.3.1/debian/patches/ada-hurd.diff
> getpagesize instead of __getpagesize.
> 
> --- a/src/gcc/ada/s-osinte-gnu.ads
> +++ b/src/gcc/ada/s-osinte-gnu.ads
> @@ -344,10 +344,9 @@ package System.OS_Interface is
> --  returns the stack base of the specified thread. Only call
> this function
> --  when Stack_Base_Available is True.
>  
> -   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or
> getpagesize??
> -   function Get_Page_Size return size_t;
> -   function Get_Page_Size return Address;
> -   pragma Import (C, Get_Page_Size, "__getpagesize");
> +   --  From: /usr/include/i386-gnu/bits/shm.h
> +   function Get_Page_Size return int;
> +   pragma Import (C, Get_Page_Size, "getpagesize");
> --  Returns the size of a page
>  
> --  From /usr/include/i386-gnu/bits/mman.h

I thought I did change that, but apparently not. I did such a change,
but it was probably somewhere else. Please submit your patch upstream
and to Debian.

Thanks!



Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Arnaud Charlet
> 2016-05-04  Samuel Thibault  
> 
> * s-osinte-gnu.ads: Make Get_Page_Size return int, and make it use
> getpagesize instead of __getpagesize.
> 
> --- a/src/gcc/ada/s-osinte-gnu.ads
> +++ b/src/gcc/ada/s-osinte-gnu.ads
> @@ -344,10 +344,9 @@ package System.OS_Interface is
> --  returns the stack base of the specified thread. Only call this
> function
> --  when Stack_Base_Available is True.
>  
> -   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or
> getpagesize??
> -   function Get_Page_Size return size_t;
> -   function Get_Page_Size return Address;
> -   pragma Import (C, Get_Page_Size, "__getpagesize");
> +   --  From: /usr/include/i386-gnu/bits/shm.h
> +   function Get_Page_Size return int;
> +   pragma Import (C, Get_Page_Size, "getpagesize");
> --  Returns the size of a page
>  
> --  From /usr/include/i386-gnu/bits/mman.h

Yes, something like the above would be needed to bring the old patch on par
with GCC 6. Above patch is OK with me, assuming testing is OK.

Arno


Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Samuel Thibault
Samuel Thibault, on Wed 04 May 2016 17:29:48 +0200, wrote:
> The gcc-6 build failed. I see that one of the change is:
> 
> -   --  From: /usr/include/unistd.h __getpagesize or getpagesize??
> -   function Get_Page_Size return int;
> +   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize??
> +   function Get_Page_Size return size_t;
> +   function Get_Page_Size return Address;
> 
> Why using size_t and Address?  Other OSes use int, and the prototype for
> getpagesize is returning int.
> 
> Also, don't use the __ versions of the glibc functions, they are
> internal aliases, the API is without __.

I.e. the proposed change below.

Samuel


2016-05-04  Samuel Thibault  

* s-osinte-gnu.ads: Make Get_Page_Size return int, and make it use
getpagesize instead of __getpagesize.

--- a/src/gcc/ada/s-osinte-gnu.ads
+++ b/src/gcc/ada/s-osinte-gnu.ads
@@ -344,10 +344,9 @@ package System.OS_Interface is
--  returns the stack base of the specified thread. Only call this function
--  when Stack_Base_Available is True.
 
-   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize??
-   function Get_Page_Size return size_t;
-   function Get_Page_Size return Address;
-   pragma Import (C, Get_Page_Size, "__getpagesize");
+   --  From: /usr/include/i386-gnu/bits/shm.h
+   function Get_Page_Size return int;
+   pragma Import (C, Get_Page_Size, "getpagesize");
--  Returns the size of a page
 
--  From /usr/include/i386-gnu/bits/mman.h


Re: Please include ada-hurd.diff upstream (try2)

2016-05-04 Thread Samuel Thibault
Hello Svante,

The gcc-6 build failed. I see that one of the change is:

-   --  From: /usr/include/unistd.h __getpagesize or getpagesize??
-   function Get_Page_Size return int;
+   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize??
+   function Get_Page_Size return size_t;
+   function Get_Page_Size return Address;

Why using size_t and Address?  Other OSes use int, and the prototype for
getpagesize is returning int.

Also, don't use the __ versions of the glibc functions, they are
internal aliases, the API is without __.

Samuel


Re: Please include ada-hurd.diff upstream (try2)

2016-04-27 Thread Svante Signell
On Wed, 2016-04-27 at 09:41 +0200, Eric Botcazou wrote:
> > 
> > Attaching the modified ada-hurd.diff. Maybe it is ready for inclusion in
> > upstream now?
> Upstream already contains the first set of changes though.  Here's what I
> have 
> installed on mainline and 6 branch (not sure it will be in the 6.1 release).
> 
> 
> 2016-04-27  Svante Signell  
> 
>   * gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
>   * s-osinte-gnu.ads: Small tweaks.
>   * s-osinte-gnu.adb: New file.

I did not know that, when did that happen? Thanks anyway :) Found the above
commits though, on https://gcc.gnu.org/ml/gcc-cvs/2016-04/


Re: Please include ada-hurd.diff upstream (try2)

2016-04-27 Thread Eric Botcazou
> Attaching the modified ada-hurd.diff. Maybe it is ready for inclusion in
> upstream now?

Upstream already contains the first set of changes though.  Here's what I have 
installed on mainline and 6 branch (not sure it will be in the 6.1 release).


2016-04-27  Svante Signell  

* gcc-interface/Makefile.in (x86 GNU/Hurd): Use s-osinte-gnu.adb.
* s-osinte-gnu.ads: Small tweaks.
* s-osinte-gnu.adb: New file.

-- 
Eric BotcazouIndex: gcc-interface/Makefile.in
===
--- gcc-interface/Makefile.in	(revision 235394)
+++ gcc-interface/Makefile.in	(working copy)
@@ -1426,7 +1426,7 @@ ifeq ($(strip $(filter-out %86 pc gnu,$(
   a-intnam.adshttp://www.gnu.org/licenses/>.  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package.
+
+pragma Polling (Off);
+--  Turn off polling, we do not want ATC polling to take place during
+--  tasking operations. It causes infinite loops and other problems.
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+package body System.OS_Interface is
+
+   
+   -- Get_Stack_Base --
+   
+
+   function Get_Stack_Base (thread : pthread_t) return Address is
+  pragma Warnings (Off, thread);
+
+   begin
+  return Null_Address;
+   end Get_Stack_Base;
+
+   --
+   -- pthread_init --
+   --
+
+   procedure pthread_init is
+   begin
+  null;
+   end pthread_init;
+
+   --
+   -- pthread_mutexattr_setprioceiling --
+   --
+
+   function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_setprioceiling;
+
+   --
+   -- pthread_mutexattr_getprioceiling --
+   --
+
+   function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : access int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_getprioceiling;
+
+   ---
+   -- pthread_setschedparam --
+   ---
+
+   function pthread_setschedparam
+ (thread : pthread_t;
+  policy : int;
+  param : access struct_sched_param) return int is
+  pragma Unreferenced (thread, policy, param);
+   begin
+  return 0;
+   end pthread_setschedparam;
+
+   -
+   -- To_Duration --
+   -
+
+   function To_Duration (TS : timespec) return Duration is
+   begin
+  return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9;
+   end To_Duration;
+
+   
+   -- To_Target_Priority --
+   
+
+   function To_Target_Priority
+ (Prio : System.Any_Priority) return Interfaces.C.int
+   is
+   begin
+  return Interfaces.C.int (Prio);
+   end To_Target_Priority;
+
+   -
+   -- To_Timespec --
+   -
+
+   function To_Timespec (D : Duration) return timespec is
+  S : time_t;
+  F : Duration;
+
+   begin
+  S := time_t (Long_Long_Integer (D));
+  F := D - Duration (S);
+
+  --  If F has negative value due to a round-up, adjust for positive F
+  --  value.
+
+  if F < 0.0 then
+ S := S - 1;
+ F := F + 1.0;
+  end if;
+
+  return timespec'(tv_sec => S,
+   tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
+   end To_Timespec;
+
+end System.OS_Interface;
Index: s-osinte-gnu.ads
===
--- s-osinte-gnu.ads	(revision 235394)
+++ s-osinte-gnu.ads	(working copy)
@@ -344,8 +344,9 @@ package System.OS_Interface is
--  returns the stack base of the specified thread. Only call this function
--  when Stack_Base_Available is True.
 
-   --  From: /usr/include/unistd.h __getpagesize or getpagesize??
-   function Get_Page_Size return int;
+   --  From: /usr/include/i386-gnu/bits/shm.h __getpagesize or getpagesize??
+   function Get_Page_Size return size_t;
+   function Get_Page_Size return Address;
pragma Import (C, Get_Page_Size, "__getpagesize");
--  Returns the size of a page
 
@@ -498,7 +499,11 @@ package System.OS_Interface is
PTHREAD_PRIO_PROTECT : 

Re: Please include ada-hurd.diff upstream (try2)

2016-04-25 Thread Arnaud Charlet
> Attaching the modified ada-hurd.diff. Maybe it is ready for inclusion in
> upstream now?

Patch is OK, go ahead and commit it, thanks.

> 2016-03-31  Svante Signell  
> 
> * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
> * s-osinte-gnu.ads: New specification file.
> * s-osinte-gnu.adb: New body file, basically s-osinte-posix.adb
>   adding dummy implementation of functions not yet implemented.


Re: Please include ada-hurd.diff upstream (try2)

2016-04-25 Thread Svante Signell
On Mon, 2016-04-25 at 11:50 +0200, Arnaud Charlet wrote:
> > 
> > Is replacing
> > 
> > +-- Copyright (C) 1991-1994, Florida State
> > University--
> > +-- Copyright (C) 1995-2014,
> > AdaCore --
> > +--  Copyright (C) 2015-2016, Free Software Foundation,
> > Inc. --
> > 
> > with only
> > 
> > +--  Copyright (C) 2015-2016, Free Software Foundation,
> > Inc. --
> > 
> > OK?
> For this specific new file, yes that's fine.

Attaching the modified ada-hurd.diff. Maybe it is ready for inclusion in
upstream now?

2016-03-31  Svante Signell  

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New specification file.
* s-osinte-gnu.adb: New body file, basically s-osinte-posix.adb
  adding dummy implementation of functions not yet implemented.
---
Index: gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
===
--- /dev/null
+++ gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
@@ -0,0 +1,144 @@
+--
+--  --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+--  --
+--   S Y S T E M . O S _ I N T E R F A C E  --
+--  --
+--   B o d y--
+--  --
+--  Copyright (C) 2015-2016, Free Software Foundation, Inc. --
+--  --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+--  --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.   --
+--  --
+-- You should have received a copy of the GNU General Public License and--
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see--
+-- .  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package.
+
+pragma Polling (Off);
+--  Turn off polling, we do not want ATC polling to take place during
+--  tasking operations. It causes infinite loops and other problems.
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+package body System.OS_Interface is
+
+   
+   -- Get_Stack_Base --
+   
+
+   function Get_Stack_Base (thread : pthread_t) return Address is
+  pragma Warnings (Off, thread);
+
+   begin
+  return Null_Address;
+   end Get_Stack_Base;
+
+   --
+   -- pthread_init --
+   --
+
+   procedure pthread_init is
+   begin
+  null;
+   end pthread_init;
+
+   --
+   -- pthread_mutexattr_setprioceiling --
+   --
+
+   function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_setprioceiling;
+
+   --
+   -- pthread_mutexattr_getprioceiling --
+   --
+
+   function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : access int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   

Re: Please include ada-hurd.diff upstream (try2)

2016-04-25 Thread Arnaud Charlet
> Is replacing
> 
> +-- Copyright (C) 1991-1994, Florida State
> University--
> +-- Copyright (C) 1995-2014,
> AdaCore --
> +--  Copyright (C) 2015-2016, Free Software Foundation,
> Inc. --
> 
> with only
> 
> +--  Copyright (C) 2015-2016, Free Software Foundation,
> Inc. --
> 
> OK?

For this specific new file, yes that's fine.


Re: Please include ada-hurd.diff upstream (try2)

2016-04-25 Thread Svante Signell
On Tue, 2016-04-19 at 10:29 +0200, Arnaud Charlet wrote:
> > 
> > The updated attachment was included in message
> > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01659.html
> You should just put a FSF copyright on s-osinte-gnu.adb
> 
> OK with this change.

Is replacing

+-- Copyright (C) 1991-1994, Florida State University--
+-- Copyright (C) 1995-2014, AdaCore --
+--  Copyright (C) 2015-2016, Free Software Foundation, Inc. --

with only

+--  Copyright (C) 2015-2016, Free Software Foundation, Inc. --

OK?


Re: Please include ada-hurd.diff upstream (try2)

2016-04-19 Thread Arnaud Charlet
> The updated attachment was included in message
> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01659.html

You should just put a FSF copyright on s-osinte-gnu.adb

OK with this change.

Arno


Re: Please include ada-hurd.diff upstream (try2)

2016-04-19 Thread Svante Signell
ping!

The updated attachment was included in message
https://gcc.gnu.org/ml/gcc-patches/2016-03/msg01659.html


On Thu, 2016-03-31 at 11:33 +0200, Svante Signell wrote:
> On Thu, 2016-03-17 at 08:51 +0100, Arnaud Charlet wrote:
> > 
> > > 
> > > 
> > > > 
> > > > 
> > > > The copyright notices are wrong (or at least incomplete).
> > > Hi, what is wrong then, copyright years and/or the text?
> > Both. The copyright year should include 2016 and the text should be
> > copyright FSF, not AdaCore.
> Attached is an updated ada-hurd.diff with your comments above taken care of.
> OK now?
> 
> Thanks!


Re: Please include ada-hurd.diff upstream (try2)

2016-03-31 Thread Svante Signell
On Thu, 2016-03-17 at 08:51 +0100, Arnaud Charlet wrote:
> > 
> > > 
> > > The copyright notices are wrong (or at least incomplete).
> > Hi, what is wrong then, copyright years and/or the text?
> Both. The copyright year should include 2016 and the text should be
> copyright FSF, not AdaCore.

Attached is an updated ada-hurd.diff with your comments above taken care of.
OK now?

Thanks!2016-03-31  Svante Signell  

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New specification file.
* s-osinte-gnu.adb: New body file, basically s-osinte-posix.adb
  adding dummy implementation of functions not yet implemented.
---
Index: gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
===
--- /dev/null
+++ gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
@@ -0,0 +1,146 @@
+--
+--  --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+--  --
+--   S Y S T E M . O S _ I N T E R F A C E  --
+--  --
+--   B o d y--
+--  --
+-- Copyright (C) 1991-1994, Florida State University--
+-- Copyright (C) 1995-2014, AdaCore --
+--  Copyright (C) 2015-2016, Free Software Foundation, Inc. --
+--  --
+-- GNAT is free software;  you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 3,  or (at your option) any later ver- --
+-- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. --
+--  --
+-- As a special exception under Section 7 of GPL version 3, you are granted --
+-- additional permissions described in the GCC Runtime Library Exception,   --
+-- version 3.1, as published by the Free Software Foundation.   --
+--  --
+-- You should have received a copy of the GNU General Public License and--
+-- a copy of the GCC Runtime Library Exception along with this program; --
+-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see--
+-- .  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package.
+
+pragma Polling (Off);
+--  Turn off polling, we do not want ATC polling to take place during
+--  tasking operations. It causes infinite loops and other problems.
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+package body System.OS_Interface is
+
+   
+   -- Get_Stack_Base --
+   
+
+   function Get_Stack_Base (thread : pthread_t) return Address is
+  pragma Warnings (Off, thread);
+
+   begin
+  return Null_Address;
+   end Get_Stack_Base;
+
+   --
+   -- pthread_init --
+   --
+
+   procedure pthread_init is
+   begin
+  null;
+   end pthread_init;
+
+   --
+   -- pthread_mutexattr_setprioceiling --
+   --
+
+   function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_setprioceiling;
+
+   --
+   -- pthread_mutexattr_getprioceiling --
+   --
+
+   function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : access int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end 

Re: Please include ada-hurd.diff upstream (try2)

2016-03-19 Thread Arnaud Charlet
> > The copyright notices are wrong (or at least incomplete).
> 
> Hi, what is wrong then, copyright years and/or the text?

Both. The copyright year should include 2016 and the text should be
copyright FSF, not AdaCore.

Arno


Re: Please include ada-hurd.diff upstream (try2)

2016-03-19 Thread Arnaud Charlet
> Yes, you are right, somehow I submitted the old patch. Attached is the
> updated one, with a proposed ChangeLog entry included.

The copyright notices are wrong (or at least incomplete).

Arno
> 
> Thanks!

> 2016-03-16  Svante Signell  
> 
> * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
> * s-osinte-gnu.ads: New specification file.
> * s-osinte-gnu.adb: New body file, basically
> s-osinte-posix.adb
>   adding dummy implementation of functions not yet implemented.


Re: Please include ada-hurd.diff upstream (try2)

2016-03-19 Thread Svante Signell
Sorry for manually creating this mail. Replying to Arnauds message crashes my
mail client (evolution).

On Wed, 2016-03-16 at 11:53 +0100, Arnaud Charlet wrote:
> Yes, you are right, somehow I submitted the old patch. Attached is the
> updated one, with a proposed ChangeLog entry included.
> 
> The copyright notices are wrong (or at least incomplete).

Hi, what is wrong then, copyright years and/or the text?


Re: Please include ada-hurd.diff upstream (try2)

2016-03-16 Thread Svante Signell
On Wed, 2016-03-16 at 11:53 +0100, Eric Botcazou wrote:
> > 
> > Sorry for not supplying a ChangeLog yet, I've been busy lately with other
> > things. Since there is another new file s-osinte-gnu.adb in the latest
> > patch, that might be added too.
> AFAICS there is only s-osinte-gnu.ads in the posted patch.

Yes, you are right, somehow I submitted the old patch. Attached is the updated
one, with a proposed ChangeLog entry included.

Thanks!2016-03-16  Svante Signell  

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New specification file.
* s-osinte-gnu.adb: New body file, basically s-osinte-posix.adb
  adding dummy implementation of functions not yet implemented.
---
Index: gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
===
--- /dev/null
+++ gcc-5-5.3.1/src/gcc/ada/s-osinte-gnu.adb
@@ -0,0 +1,147 @@
+--
+--  --
+-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
+--  --
+--   S Y S T E M . O S _ I N T E R F A C E  --
+--  --
+--   B o d y--
+--  --
+-- Copyright (C) 1991-1994, Florida State University--
+-- Copyright (C) 1995-2006, AdaCore --
+--  --
+-- GNARL is free software; you can  redistribute it  and/or modify it under --
+-- terms of the  GNU General Public License as published  by the Free Soft- --
+-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
+-- sion. GNARL is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
+-- for  more details.  You should have  received  a copy of the GNU General --
+-- Public License  distributed with GNARL; see file COPYING.  If not, write --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.  --
+--  --
+-- As a special exception,  if other files  instantiate  generics from this --
+-- unit, or you link  this unit with other files  to produce an executable, --
+-- this  unit  does not  by itself cause  the resulting  executable  to  be --
+-- covered  by the  GNU  General  Public  License.  This exception does not --
+-- however invalidate  any other reasons why  the executable file  might be --
+-- covered by the  GNU Public License.  --
+--  --
+-- GNARL was developed by the GNARL team at Florida State University.   --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
+--  --
+--
+
+--  This is the GNU/Hurd version of this package.
+
+pragma Polling (Off);
+--  Turn off polling, we do not want ATC polling to take place during
+--  tasking operations. It causes infinite loops and other problems.
+
+--  This package encapsulates all direct interfaces to OS services
+--  that are needed by children of System.
+
+package body System.OS_Interface is
+
+   
+   -- Get_Stack_Base --
+   
+
+   function Get_Stack_Base (thread : pthread_t) return Address is
+  pragma Warnings (Off, thread);
+
+   begin
+  return Null_Address;
+   end Get_Stack_Base;
+
+   --
+   -- pthread_init --
+   --
+
+   procedure pthread_init is
+   begin
+  null;
+   end pthread_init;
+
+   --
+   -- pthread_mutexattr_setprioceiling --
+   --
+
+   function pthread_mutexattr_setprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : int) return int is
+  pragma Unreferenced (attr, prioceiling);
+   begin
+  return 0;
+   end pthread_mutexattr_setprioceiling;
+
+   --
+   -- pthread_mutexattr_getprioceiling --
+   --
+
+   function pthread_mutexattr_getprioceiling
+ (attr : access pthread_mutexattr_t;
+  prioceiling : 

Re: Please include ada-hurd.diff upstream (try2)

2016-03-16 Thread Eric Botcazou
> Sorry for not supplying a ChangeLog yet, I've been busy lately with other
> things. Since there is another new file s-osinte-gnu.adb in the latest
> patch, that might be added too.

AFAICS there is only s-osinte-gnu.ads in the posted patch.

-- 
Eric Botcazou


Re: Please include ada-hurd.diff upstream (try2)

2016-03-16 Thread Svante Signell
On Wed, 2016-03-16 at 11:08 +0100, Eric Botcazou wrote:
> > 
> > Maybe the time has come now for a proper inclusion of Ada/Gnat support in
> > gcc-* for GNU/Hurd. (Yes, I commit to maintain Ada in gcc for GNU/Hurd in
> > the foreseeable future, according to my abilities).
> > 
> > Attached is an updated patch, now living e.g. in GNU/Debian versions of
> > gcc-5 and gcc-6.
> > 
> > Please tell me if you need a changelog entry too. And yes, I have already
> > signed all copyright papers for FSF wrt gcc (and other packages).
> Yes, patches need ChangeLog.  This one is small though so I have applied it:
> 
> 2016-03-16  Svante Signell  
> 
> * gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
> * s-osinte-gnu.ads: New file.

Hi Eric,

Sorry for not supplying a ChangeLog yet, I've been busy lately with other
things. Since there is another new file s-osinte-gnu.adb in the latest patch,
that might be added too.

2016-03-16  Svante Signell  

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New specification file.
* s-osinte-gnu.adb: New body file, basically s-osinte-posix.adb
  adding dummy implementation of functions not yet implemented.

Thanks!


Re: Please include ada-hurd.diff upstream (try2)

2016-03-16 Thread Eric Botcazou
> Maybe the time has come now for a proper inclusion of Ada/Gnat support in
> gcc-* for GNU/Hurd. (Yes, I commit to maintain Ada in gcc for GNU/Hurd in
> the foreseeable future, according to my abilities).
> 
> Attached is an updated patch, now living e.g. in GNU/Debian versions of
> gcc-5 and gcc-6.
> 
> Please tell me if you need a changelog entry too. And yes, I have already
> signed all copyright papers for FSF wrt gcc (and other packages).

Yes, patches need ChangeLog.  This one is small though so I have applied it:

2016-03-16  Svante Signell  

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New file.

-- 
Eric Botcazou


Re: Please include ada-hurd.diff upstream (try2)

2016-03-06 Thread Matthias Klose

[adding Eric for review]

On 02.03.2016 00:42, Svante Signell wrote:

Hello,

As time progresses, the ada-hurd.diff patch has now been living in Debian since
gcc-4.6 and is now in gcc-5 and gcc-6. Last try to get it included upstream was
in 2012, and 2014, e.g see
https://gcc.gnu.org/ml/gcc-patches/2012-06/msg0.html
and follow-ups.

Maybe the time has come now for a proper inclusion of Ada/Gnat support in gcc-*
for GNU/Hurd. (Yes, I commit to maintain Ada in gcc for GNU/Hurd in the
foreseeable future, according to my abilities).

Attached is an updated patch, now living e.g. in GNU/Debian versions of gcc-5
and gcc-6.

Please tell me if you need a changelog entry too. And yes, I have already signed
all copyright papers for FSF wrt gcc (and other packages).


yes, please add a ChangeLog entry too.

Matthias