From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?Bj=c3=b6rn_Lundin?= Newsgroups: comp.lang.ada Subject: Re: AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Date: Sat, 12 May 2018 12:33:18 +0200 Organization: A noiseless patient Spider Message-ID: References: <9af47760-e731-4cb5-a1a0-d63e31019ce5@googlegroups.com> <877eob1cc6.fsf@nightsong.com> <5c9b9f90-884f-4de7-8663-d39a67949f4f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 12 May 2018 10:33:11 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="4b35b8d7235870321b78a695beb67644"; logging-data="22560"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/AKt0sak0C7aGkJ+mZuMGV" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Cancel-Lock: sha1:tKT0nK1VOCDPC07n7iuRsGDP3Dg= Xref: reader02.eternal-september.org comp.lang.ada:52312 Date: 2018-05-12T12:33:18+02:00 List-Id: 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. -- -- Björn