comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines?
Date: Sat, 12 May 2018 14:08:04 +0100
Date: 2018-05-12T14:08:04+01:00	[thread overview]
Message-ID: <lylgcphvij.fsf@pushface.org> (raw)
In-Reply-To: pd6ft7$m10$1@dont-email.me

Björn Lundin <b.f.lundin@gmail.com> writes:

> On 2018-05-12 00:12, Randy Brukardt wrote:
>> 
>> The best way to do this in Ada is with different package bodies (and 
>> sometimes specs) for each target. 
>
> We do this too.
>
>> The problem is that existing version control systems cannot handle such 
>> designs properly. 
>
> To get around that we have subdirectories matching the target
>
> -w32_x86
> -lnx_x64
> -aix_ppc
>
> each of these directories would contain the native body and spec for the
> platform. Each directory and file is version_controlled.
>
> The build system (first homebrew, now gpr) only includes the directory
> matching the correct target. So when building on AIX, the compiler never
> sees the directories lnx_x64 not w32_x86.
>
> Each platform tests on an environment variable we set that has one of
> the above 3 values.
>
> So in essence we limit the files the compiler sees to the ones
> belonging to the current platform.

I have to say that my experience at Cortex GNAT RTS[1] is similar to
Randy's.

At the moment I have 6 usable branches; the gcc7* and gcc8* ones are
live:

   gcc6 (FSF GCC 6, GNAT GPL 2016)
   gcc7 (FSF GCC 7)
   gcc-finalization (FSF GCC 7 + finalization)
   gcc8 (FSF GCC 8)
   gcc-finalization (FSF GCC 8 + finalization)
   gnat-gpl-2017

The reason for the distinction is that the interface between the
compiler and the RTS changes; between gcc7 and gcc8 10 files changed,
and between gcc8 and gcc8-finalization 30 files changed (not including
tests).

The way I've "managed" this is to choose a branch to develop a change
on, implement the changes, commit, then checkout the other branch that
the development applies to and cherry-pick the commit(s) (i.e the
changes) from the first branch. This is error-prone, to say the
least. It'd be quite hard to do at all on my previously preferred DVCS,
Mercurial.

Your remarks about using directories for this are very interesting, I'll
be looking into them. I suspect the problem of "change a spec; apply
matching changes to all the variant package bodies" will remain, though.

[1] https://github.com/simonjwright/cortex-gnat-rts

  reply	other threads:[~2018-05-12 13:08 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-10 17:45 AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Dan'l Miller
2018-05-10 19:24 ` Dan'l Miller
2018-05-10 20:32   ` Paul Rubin
2018-05-10 22:24     ` Dan'l Miller
2018-05-10 22:44       ` Niklas Holsti
2018-05-10 23:14         ` Paul Rubin
2018-05-11  2:38         ` Dan'l Miller
2018-05-11  7:55           ` Simon Wright
2018-05-11 12:11             ` Lucretia
2018-05-11 13:49               ` Simon Wright
2018-05-11 16:11                 ` Jeffrey R. Carter
2018-05-11 16:48                   ` Simon Wright
2018-05-11 19:08                     ` Jeffrey R. Carter
2018-05-11 21:39                       ` Simon Wright
2018-05-11 21:56                         ` Jeffrey R. Carter
2018-05-12  7:08                           ` Simon Wright
2018-05-12  7:53                             ` Jeffrey R. Carter
2018-05-14 22:43                             ` Randy Brukardt
2018-05-11 13:46             ` Simon Wright
2018-05-11 22:12           ` Randy Brukardt
2018-05-12 10:33             ` Björn Lundin
2018-05-12 13:08               ` Simon Wright [this message]
2018-05-12 14:21                 ` Björn Lundin
2018-05-10 23:07       ` Paul Rubin
2018-05-11  0:14         ` Dan'l Miller
2018-05-11  0:30           ` Paul Rubin
2018-05-11  0:50             ` Dan'l Miller
2018-05-11  1:34               ` Paul Rubin
2018-05-11  2:11                 ` Dan'l Miller
2018-05-11 22:32                   ` Randy Brukardt
2018-05-11  8:02         ` Simon Wright
2018-05-11 22:14         ` Randy Brukardt
2018-05-10 19:28 ` Simon Wright
2018-05-10 22:40   ` Randy Brukardt
2018-05-10 22:50     ` Dan'l Miller
2018-05-11 22:00       ` Randy Brukardt
2018-05-12  1:15         ` Paul Rubin
2018-05-14 22:54           ` Randy Brukardt
2018-05-15  0:43             ` Paul Rubin
2018-05-15 21:39               ` Randy Brukardt
2018-05-15  0:44             ` Dennis Lee Bieber
2018-05-11  8:09     ` Simon Wright
2018-05-10 19:34 ` Dmitry A. Kazakov
2018-05-10 20:06   ` Dan'l Miller
2018-05-10 22:44     ` Paul Rubin
2018-05-10 22:50     ` Randy Brukardt
2018-05-11  9:40       ` Niklas Holsti
2018-05-11 11:40         ` Dan'l Miller
2018-05-11 20:16           ` Niklas Holsti
2018-05-11  9:40     ` Dmitry A. Kazakov
2018-05-11 14:21 ` AdaMagica
2018-05-26 16:15 ` Dan'l Miller
2018-05-26 19:02   ` AdaMagica
2018-05-26 21:01     ` Dan'l Miller
2018-05-27 14:58       ` AdaMagica
2018-05-27 18:03         ` Simon Wright
2018-05-29 22:17           ` Randy Brukardt
2018-05-30  6:39             ` Simon Wright
2018-05-30  7:25               ` Dmitry A. Kazakov
2018-05-30 15:01                 ` Simon Wright
2018-05-30 15:59                   ` Dan'l Miller
2018-05-30 19:38               ` Randy Brukardt
2018-05-27 18:04         ` Dan'l Miller
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox