Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Am 20.08.2014 um 22:12 schrieb Svante Signell: On Wed, 2014-05-21 at 10:48 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:44:54 +0200, a écrit : On Wed, 2014-05-21 at 10:33 +0200, Arnaud Charlet wrote: I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. With the help from the dabian-ada people, especially Ludovic Brenta, gnat has been running on GNU/Hurd in Debian since gcc/gnat-4.6.3. Then it's all good. Just say that you wish to continue maintaining things like this, and upstream will be happy. Attached is the updated ada-hurd.diff patch for GNU/Hurd. It builds fine with gnat-4.9.1-1 and gcc-4.9.1-7. This patch now has the same amount of files as the kFreeBSD patch. Hopefully it can be material for upstream, but at least in Debian the Hurd port would be on par with kFreeBSD. Regarding remaining code commented out or irrelevant comments in the new file s-osinte-gnu.ads, please help me to iron out the left-overs. the patch is at least missing the ChangeLog entry. Also it is only tested using the Debian package based on the 4.9 branch, and which includes a bunch of local ada patches which are not forwarded upstream for years. Please prepare and test your patch with current trunk for upstream submission. Ludovic, can you consider using this file as ada-hurd.diff for next upload of Debian gnat-4.9? For clarity: I wish to continue to maintain the Ada port for Hurd, with the help of the Debian Ada and Hurd people, with or without being imported upstream. I disagree. Debian's current local ada patches are a mess, and no effort is made to cleanup these and forward these upstream. If the Debian Ada people can't do this, please do it yourself. Matthias
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 10:48 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:44:54 +0200, a écrit : On Wed, 2014-05-21 at 10:33 +0200, Arnaud Charlet wrote: I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. With the help from the dabian-ada people, especially Ludovic Brenta, gnat has been running on GNU/Hurd in Debian since gcc/gnat-4.6.3. Then it's all good. Just say that you wish to continue maintaining things like this, and upstream will be happy. Attached is the updated ada-hurd.diff patch for GNU/Hurd. It builds fine with gnat-4.9.1-1 and gcc-4.9.1-7. This patch now has the same amount of files as the kFreeBSD patch. Hopefully it can be material for upstream, but at least in Debian the Hurd port would be on par with kFreeBSD. Regarding remaining code commented out or irrelevant comments in the new file s-osinte-gnu.ads, please help me to iron out the left-overs. Ludovic, can you consider using this file as ada-hurd.diff for next upload of Debian gnat-4.9? For clarity: I wish to continue to maintain the Ada port for Hurd, with the help of the Debian Ada and Hurd people, with or without being imported upstream. Thanks! Index: gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads === --- /dev/null +++ gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads @@ -0,0 +1,804 @@ +-- +-- -- +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1991-1994, Florida State University-- +-- Copyright (C) 1995-2014, 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-- +-- http://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 (POSIX Threads) version of this package + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; +with Unchecked_Conversion; + +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options (-lpthread); + pragma Linker_Options (-lrt); + + subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; + subtype long is
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
BTW, I wonder ho the kfreebsd people managed to get accepted upstream? This is typically a good example of patches being accepted too rapidly, and leading to maintenance issues, see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56274 for which nobody is stepping up to fix. So we might well end up removing support for Ada/kfreebsd soon. Arno
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Mon, 2014-05-19 at 16:25 +0200, Arnaud Charlet wrote: That's actually the biggest concern when people submit a new port: they submit it, get it approved, commit it and then are no longer available for any maintenance when these files need to be updated/become outdated/ no longer compile or run. I can try to do that in the near future, then somebody else can take over. I think maybe Thomas have an opinion about this being a Hurd developer and a GNU person at the same time. Updated patch attached, OK now? No, there are still code commented out, and we need to resolve the above point first. Thomas and Samuel: It looks like upstream don't accept patches unless a Hurd port maintainer commits to it. What's the use of all this job? (Of course it can at least run on Debian systems if/when accepted.)
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 09:49:59 +0200, a écrit : Thomas and Samuel: It looks like upstream don't accept patches unless a Hurd port maintainer commits to it. What's the use of all this job? Well, simply to keep the changes working. That is not surprising at all. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. In principle it's just a matter of fixing just a few things over the coming versions. But someone has to do it, otherwise the port will just die. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 10:03 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 09:49:59 +0200, a écrit : Thomas and Samuel: It looks like upstream don't accept patches unless a Hurd port maintainer commits to it. What's the use of all this job? Well, simply to keep the changes working. That is not surprising at all. I might not be interested any longer with this kind of requirements. What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Then you or Thomas can commit to this and I'll try to help out. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. In principle it's just a matter of fixing just a few things over the coming versions. But someone has to do it, otherwise the port will just die. I wonder ho the kfreebsd people managed to get accepted upstream?
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 10:20:16 +0200, a écrit : On Wed, 2014-05-21 at 10:03 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 09:49:59 +0200, a écrit : Thomas and Samuel: It looks like upstream don't accept patches unless a Hurd port maintainer commits to it. What's the use of all this job? Well, simply to keep the changes working. That is not surprising at all. I might not be interested any longer with this kind of requirements. Well, then somebody else will have to if we want to keep the gnat port alive. I for myself don't really have time to do it. What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. In principle it's just a matter of fixing just a few things over the coming versions. But someone has to do it, otherwise the port will just die. I wonder ho the kfreebsd people managed to get accepted upstream? Simply by having someone making sure things are going right, I guess. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. Arno
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 10:29 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:20:16 +0200, a écrit : On Wed, 2014-05-21 at 10:03 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 09:49:59 +0200, a écrit : Thomas and Samuel: It looks like upstream don't accept patches unless a Hurd port maintainer commits to it. What's the use of all this job? Well, simply to keep the changes working. That is not surprising at all. I might not be interested any longer with this kind of requirements. Well, then somebody else will have to if we want to keep the gnat port alive. I for myself don't really have time to do it. Understood What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. I've been working on the Hurd port of gnat since late 2011 including the toughest: bootstrapping, does that count? (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures.
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Arnaud Charlet, le Wed 21 May 2014 10:33:31 +0200, a écrit : I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. Ah, I read what Svante said too fast. I thought he was talking about every feature added to gnat. I sure agree with Arnaud. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 10:33 +0200, Arnaud Charlet wrote: I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. With the help from the dabian-ada people, especially Ludovic Brenta, gnat has been running on GNU/Hurd in Debian since gcc/gnat-4.6.3.
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 10:40:37 +0200, a écrit : What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. I've been working on the Hurd port of gnat since late 2011 including the toughest: bootstrapping, does that count? Count for what? Opensource is about patches correctness, not people fame. If anybody, whoever he is, takes up the work and produces correct patches, then they'll be applied. It's as simple as this. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures. Uh? I'm not sure what you mean here. What I understand is why not remove support for GNU/Hurd? which'd mean dropping your patches. I guess that's not what you want, so I don't know what you meant. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 10:44:54 +0200, a écrit : On Wed, 2014-05-21 at 10:33 +0200, Arnaud Charlet wrote: I think the majority of work has bee done, Now that patch will change slightly for every missing feature added to Hurd. Then it's all good, it's a matter of what I said above. Don't forget also the part where general changes are done in GNAT which require update to target specific files: these typically require someone to regularly test each port to detect any missing update, and report/fix them, even if GNU/Hurd hasn't changed itself. With the help from the dabian-ada people, especially Ludovic Brenta, gnat has been running on GNU/Hurd in Debian since gcc/gnat-4.6.3. Then it's all good. Just say that you wish to continue maintaining things like this, and upstream will be happy. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 10:47 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:40:37 +0200, a écrit : What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. I've been working on the Hurd port of gnat since late 2011 including the toughest: bootstrapping, does that count? Count for what? Opensource is about patches correctness, not people fame. If anybody, whoever he is, takes up the work and produces correct patches, then they'll be applied. It's as simple as this. In this case if long term support can be guaranteed, yes! (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures. Uh? I'm not sure what you mean here. What I understand is why not remove support for GNU/Hurd? which'd mean dropping your patches. How can they be removed, they are not upstream yet? I guess that's not what you want, so I don't know what you meant. If that happens - means if the port is bitrotting for a long time just remove support upstream. We were talking upstream here, not Debian ...
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 11:22:44 +0200, a écrit : On Wed, 2014-05-21 at 10:47 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:40:37 +0200, a écrit : What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. I've been working on the Hurd port of gnat since late 2011 including the toughest: bootstrapping, does that count? Count for what? Opensource is about patches correctness, not people fame. If anybody, whoever he is, takes up the work and produces correct patches, then they'll be applied. It's as simple as this. In this case if long term support can be guaranteed, yes! I don't understand what you mean. Guaranteeing long term support *is* about taking up the work of checking periodically that the port works fine. If anybody does it, then it's fine. If nobody does it, then the port will be dropped. It's as simple as this. You're welcome for doing it of course. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures. Uh? I'm not sure what you mean here. What I understand is why not remove support for GNU/Hurd? which'd mean dropping your patches. How can they be removed, they are not upstream yet? I even less understand what you meant then. I guess that's not what you want, so I don't know what you meant. If that happens - means if the port is bitrotting for a long time just remove support upstream. We were talking upstream here, not Debian ... What support? I really don't undestand what you mean. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-21 at 11:27 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 11:22:44 +0200, a écrit : On Wed, 2014-05-21 at 10:47 +0200, Samuel Thibault wrote: Svante Signell, le Wed 21 May 2014 10:40:37 +0200, a écrit : What kind of person do you have to be to be accepted, a GNU/Hurd developer or a GNU/Ada developer having a gnu.org account? Nothing special, just like for contributing to any opensource project; just someone who checks from times to times (in particular before releases) that the port works fine, and submit patches if needed. I've been working on the Hurd port of gnat since late 2011 including the toughest: bootstrapping, does that count? Count for what? Opensource is about patches correctness, not people fame. If anybody, whoever he is, takes up the work and produces correct patches, then they'll be applied. It's as simple as this. In this case if long term support can be guaranteed, yes! I don't understand what you mean. Guaranteeing long term support *is* about taking up the work of checking periodically that the port works fine. If anybody does it, then it's fine. If nobody does it, then the port will be dropped. It's as simple as this. You're welcome for doing it of course. I've been doing this since 2012 and I said I could continue doing it, but that did not seem to be sufficient. (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures. Uh? I'm not sure what you mean here. What I understand is why not remove support for GNU/Hurd? which'd mean dropping your patches. How can they be removed, they are not upstream yet? I even less understand what you meant then. Well dropping patches not upstream is a nop, right? I guess that's not what you want, so I don't know what you meant. If that happens - means if the port is bitrotting for a long time just remove support upstream. We were talking upstream here, not Debian ... What support? I really don't undestand what you mean. Remove support for a language for bitrotting architectures (obsolete ports) like is done for old Solaris 9 (*-*-solaris2.9) http://www.gnu.org/software/gcc/gcc-4.9/changes.html
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Svante Signell, le Wed 21 May 2014 11:42:30 +0200, a écrit : On Wed, 2014-05-21 at 11:27 +0200, Samuel Thibault wrote: Guaranteeing long term support *is* about taking up the work of checking periodically that the port works fine. If anybody does it, then it's fine. If nobody does it, then the port will be dropped. It's as simple as this. You're welcome for doing it of course. I've been doing this since 2012 and I said I could continue doing it, but that did not seem to be sufficient. I must have missed an episode then. The only context I have is “ That's actually the biggest concern when people submit a new port: they submit it, get it approved, commit it and then are no longer available for any maintenance when these files need to be updated/become outdated/ no longer compile or run. ” Does it mean it is a lack of reviewer/commiter which is pointed out? Well dropping patches not upstream is a nop, right? Yes, sure. I guess that's not what you want, so I don't know what you meant. If that happens - means if the port is bitrotting for a long time just remove support upstream. We were talking upstream here, not Debian ... What support? I really don't undestand what you mean. Remove support for a language for bitrotting architectures (obsolete ports) like is done for old Solaris 9 (*-*-solaris2.9) http://www.gnu.org/software/gcc/gcc-4.9/changes.html I fully understand that. What I don't understand is what you said initially: “ (Of course it can at least run on Debian systems if/when accepted.) Sure, but will it continue working on the long term? That's the concern of upstream. If that happens why not just remove support for that architecture? The same happens for plain C, C++, etc on outdated architectures. ” Again, what I understand from your why not just remove support for that architecture is that you propose to remove the Hurd port. I obviously guess that it's not what you meant, so I don't understand what you actually meant. Samuel
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Wed, 2014-05-14 at 12:53 +0200, Eric Botcazou wrote: Attached is a patch for support of GNU/Hurd in gnat-4.9. This patch has been used and updated in Debian since gnat-4.6, and is currently used to build gnat-4.9. Now when the body file s-osinte-posix.adb in gcc-4.9 defines tv_nsec in timespec POSIX-correctly as long again, we think it is time that it goes upstream. The patch contains two parts: src/gcc/ada/gcc-interface/Makefile.in: Defines LIBGNAT_TARGET_PAIRS for GNU/Hurd src/gcc/ada/s-osinte-gnu.ads: A new file giving the OS interface specification for GNU/Hurd. This file is a modification of the already existing s-osinte-*.ads files. It's quite nice that you need only one specific file for GNU/Hurd. This is mostly OK, but your LIBGNAT_TARGET_PAIRS looks a bit outdated, specifically for the atomic support, see the other *BSD for reference. Attached is the patch with two added lines: -+ $(ATOMICS_TARGET_PAIRS) \ -+ $(X86_TARGET_PAIRS) \ and + EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o Now the arch-specific lines are the same as for kFreeBSD except for two files, in kFreeBSD: s-osinte.adbs-osinte-kfreebsd-gnu.adb s-osinte.adss-osinte-kfreebsd-gnu.ads In Hurd: s-osinte.adbs-osinte-posix.adb s-osinte.adss-osinte-gnu.ads The build went fine. Is something still missing? Index: gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads === --- /dev/null +++ gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads @@ -0,0 +1,816 @@ +-- +-- -- +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1991-1994, Florida State University-- +-- Copyright (C) 1995-2011, Free Software Foundation, Inc. -- +-- -- +-- 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 + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; +with Unchecked_Conversion; + +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options (-lpthread); + pragma Linker_Options (-lrt); + + subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; + subtype long is Interfaces.C.long; + subtype unsigned is Interfaces.C.unsigned; + subtype unsigned_short is Interfaces.C.unsigned_short;
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
The build went fine. Is something still missing? We never keep commented out code, except with a ??? comment explaining why. We don't use 'FIXME', we use ??? instead. Also, some of the comments seem to be copy/paste from freebsd, which is likely not appropriate for GNU Hurd, so need to be revised. The header is wrong: it should be GPLv3+, not GPLv2+ Also: + -- 1_024 == 1024?? Remove this comment. Yes, 1_024 is the same as 1024 in Ada. Arno
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Mon, 2014-05-19 at 14:50 +0200, Arnaud Charlet wrote: The build went fine. Is something still missing? We never keep commented out code, except with a ??? comment explaining why. Do you want me to remove all GNU/Hurd specific header file info? We don't use 'FIXME', we use ??? instead. Removed FIXME and the FreeBSD comment section. Also, some of the comments seem to be copy/paste from freebsd, which is likely not appropriate for GNU Hurd, so need to be revised. Any more comments I have missed? The header is wrong: it should be GPLv3+, not GPLv2+ Fixed. And added 2014 to the Copyright years: 1995-2014 Or should it be 1995-2011, 2014 or only 2014? Also: + -- 1_024 == 1024?? Remove this comment. Yes, 1_024 is the same as 1024 in Ada. Done Updated patch attached. Index: gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads === --- /dev/null +++ gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads @@ -0,0 +1,807 @@ +-- +-- -- +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1991-1994, Florida State University-- +-- Copyright (C) 1995-2014, 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-- +-- http://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 (POSIX Threads) version of this package + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; +with Unchecked_Conversion; + +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options (-lpthread); + pragma Linker_Options (-lrt); + + subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; + subtype long is Interfaces.C.long; + subtype unsigned is Interfaces.C.unsigned; + subtype unsigned_short is Interfaces.C.unsigned_short; + subtype unsigned_long is Interfaces.C.unsigned_long; + subtype unsigned_char is Interfaces.C.unsigned_char; + subtype plain_char is Interfaces.C.plain_char; + subtype size_t is Interfaces.C.size_t; + + --- + -- Errno -- + --- + -- From /usr/include/i386-gnu/bits/errno.h + + function errno return int; + pragma Import (C, errno, __get_errno); + + EAGAIN : constant := 1073741859; + EINTR: constant := 1073741828; + EINVAL : constant := 1073741846; + ENOMEM : constant := 1073741836; + EPERM: constant := 1073741825; + ETIMEDOUT: constant := 1073741884; + + - + -- Signals -- +
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Do you want me to remove all GNU/Hurd specific header file info? No, I want you to remove commented out code, such as: +-- SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal +-- SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal +-- SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal Also, can you clarify who will be in charge of maintaining these files? That's actually the biggest concern when people submit a new port: they submit it, get it approved, commit it and then are no longer available for any maintenance when these files need to be updated/become outdated/ no longer compile or run. Arno
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
On Mon, 2014-05-19 at 15:53 +0200, Arnaud Charlet wrote: Do you want me to remove all GNU/Hurd specific header file info? No, I want you to remove commented out code, such as: +-- SIGLTHRRES : constant := 32; -- GNU/LinuxThreads restart signal +-- SIGLTHRCAN : constant := 33; -- GNU/LinuxThreads cancel signal +-- SIGLTHRDBG : constant := 34; -- GNU/LinuxThreads debugger signal OK, done. I did not notice that one. Also, can you clarify who will be in charge of maintaining these files? That's actually the biggest concern when people submit a new port: they submit it, get it approved, commit it and then are no longer available for any maintenance when these files need to be updated/become outdated/ no longer compile or run. I can try to do that in the near future, then somebody else can take over. I think maybe Thomas have an opinion about this being a Hurd developer and a GNU person at the same time. Updated patch attached, OK now? Index: gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads === --- /dev/null +++ gnat-4.9-4.9.0/src/gcc/ada/s-osinte-gnu.ads @@ -0,0 +1,804 @@ +-- +-- -- +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1991-1994, Florida State University-- +-- Copyright (C) 1995-2014, 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-- +-- http://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 (POSIX Threads) version of this package + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; +with Unchecked_Conversion; + +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options (-lpthread); + pragma Linker_Options (-lrt); + + subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; + subtype long is Interfaces.C.long; + subtype unsigned is Interfaces.C.unsigned; + subtype unsigned_short is Interfaces.C.unsigned_short; + subtype unsigned_long is Interfaces.C.unsigned_long; + subtype unsigned_char is Interfaces.C.unsigned_char; + subtype plain_char is Interfaces.C.plain_char; + subtype size_t is Interfaces.C.size_t; + + --- + -- Errno -- + --- + -- From /usr/include/i386-gnu/bits/errno.h + + function errno return int; + pragma Import (C, errno, __get_errno); + + EAGAIN : constant := 1073741859; + EINTR: constant := 1073741828; + EINVAL : constant :=
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
That's actually the biggest concern when people submit a new port: they submit it, get it approved, commit it and then are no longer available for any maintenance when these files need to be updated/become outdated/ no longer compile or run. I can try to do that in the near future, then somebody else can take over. I think maybe Thomas have an opinion about this being a Hurd developer and a GNU person at the same time. Updated patch attached, OK now? No, there are still code commented out, and we need to resolve the above point first. Arno
Re: [PATCH] Add support for GNU/Hurd in gnat-4.9
Attached is a patch for support of GNU/Hurd in gnat-4.9. This patch has been used and updated in Debian since gnat-4.6, and is currently used to build gnat-4.9. Now when the body file s-osinte-posix.adb in gcc-4.9 defines tv_nsec in timespec POSIX-correctly as long again, we think it is time that it goes upstream. The patch contains two parts: src/gcc/ada/gcc-interface/Makefile.in: Defines LIBGNAT_TARGET_PAIRS for GNU/Hurd src/gcc/ada/s-osinte-gnu.ads: A new file giving the OS interface specification for GNU/Hurd. This file is a modification of the already existing s-osinte-*.ads files. It's quite nice that you need only one specific file for GNU/Hurd. This is mostly OK, but your LIBGNAT_TARGET_PAIRS looks a bit outdated, specifically for the atomic support, see the other *BSD for reference. -- Eric Botcazou
[PATCH] Add support for GNU/Hurd in gnat-4.9
Hello, Attached is a patch for support of GNU/Hurd in gnat-4.9. This patch has been used and updated in Debian since gnat-4.6, and is currently used to build gnat-4.9. Now when the body file s-osinte-posix.adb in gcc-4.9 defines tv_nsec in timespec POSIX-correctly as long again, we think it is time that it goes upstream. The patch contains two parts: src/gcc/ada/gcc-interface/Makefile.in: Defines LIBGNAT_TARGET_PAIRS for GNU/Hurd src/gcc/ada/s-osinte-gnu.ads: A new file giving the OS interface specification for GNU/Hurd. This file is a modification of the already existing s-osinte-*.ads files. Regarding copyright assignment, if needed, I've already signed the papers for gcc (and other GNU packages). Thanks! Index: b/src/gcc/ada/s-osinte-gnu.ads === --- /dev/null +++ b/src/gcc/ada/s-osinte-gnu.ads @@ -0,0 +1,816 @@ +-- +-- -- +--GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS -- +-- -- +-- S Y S T E M . O S _ I N T E R F A C E -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 1991-1994, Florida State University-- +-- Copyright (C) 1995-2011, Free Software Foundation, Inc. -- +-- -- +-- 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 + +-- This package encapsulates all direct interfaces to OS services +-- that are needed by children of System. + +-- PLEASE DO NOT add any with-clauses to this package or remove the pragma +-- Preelaborate. This package is designed to be a bottom-level (leaf) package + +with Interfaces.C; +with Unchecked_Conversion; + +package System.OS_Interface is + pragma Preelaborate; + + pragma Linker_Options (-lpthread); + pragma Linker_Options (-lrt); + + subtype intis Interfaces.C.int; + subtype char is Interfaces.C.char; + subtype short is Interfaces.C.short; + subtype long is Interfaces.C.long; + subtype unsigned is Interfaces.C.unsigned; + subtype unsigned_short is Interfaces.C.unsigned_short; + subtype unsigned_long is Interfaces.C.unsigned_long; + subtype unsigned_char is Interfaces.C.unsigned_char; + subtype plain_char is Interfaces.C.plain_char; + subtype size_t is Interfaces.C.size_t; + + --- + -- Errno -- + --- + -- From /usr/include/i386-gnu/bits/errno.h + + function errno return int; + pragma Import (C, errno, __get_errno); + + EAGAIN : constant := 1073741859; + EINTR: constant := 1073741828; + EINVAL : constant := 1073741846; + ENOMEM : constant := 1073741836; + EPERM: constant := 1073741825; + ETIMEDOUT: constant := 1073741884; + +