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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,17f2366fc6172420 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Access Type Date: Wed, 29 Dec 2010 16:27:11 +0100 Organization: A noiseless patient Spider Message-ID: <8739pgha5s.fsf@ludovic-brenta.org> References: <8d8e1094-d021-4456-85fb-bbb2f3911334@m7g2000vbn.googlegroups.com> <3af2d3d1-ede9-4255-a31b-c5f66c6cee2e@c2g2000yqc.googlegroups.com> <87hbe0m1be.fsf@ludovic-brenta.org> <878vzbm7ah.fsf@ludovic-brenta.org> <4D18F124.1050005@obry.net> <76b6b4aa-201c-412d-93de-d22b532fde3f@w17g2000yqh.googlegroups.com> <0cc2d01d-2744-470f-82e9-f7aa1c097783@c39g2000yqi.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx03.eternal-september.org; posting-host="vhtspQ5pQqftjY2c+x4BbQ"; logging-data="23316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vjy32vK+d4g4KF8Bdftdg" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Cancel-Lock: sha1:LSY8dMY4fWj+g+OZMIPmfXC54Ps= sha1:u0e1MyWks+XHDzLbKiWdX21QCog= Xref: g2news1.google.com comp.lang.ada:16228 Date: 2010-12-29T16:27:11+01:00 List-Id: Simon Wright writes: > It's possible to have one compiler generate both 32- and 64-bit code; > for an Intel target you can use -m32/-m64 (for example) provided the > compiler was built with that ability. Whenever I've built a compiler > it's been for one architecture only; if for no other reason than that > the Ada build process in GCC doesn't support multilibs. (Well, that's > what the documentation seemed to be saying ...) Multilib support for libgnat was introduced in GCC 4.4. This means the ability to build both a 32-bit and a 64-bit version of libgnat and to link the program against either. Multiarch support was introduced earlier than that. This means support for -m32/-m64 and the ability to emit either 32- or 64-bit object code. > I don't remember whether GNAT for PowerPC supports 64-bit, don't think > so??? Yes, it does. > It sounds as though your argument list ought to be an array of ints > (or Integers), not bytes? I'd rather call them "words". > One thing you'll need to be careful of: some Ada features (eg > exception handling, functions returing indefinite objects, tasking > ...) rely on runtime support that may not be available, or may not be > properly initialized, in the OFW environment. I'm not familiar with > how to get over this sort of problem. Right. Since a bootloader runs without an underlying operating system, I'd suggest adding the following configuration pragma to one of the source files: pragma No_Run_Time; Then all you need is a 32-bit compiler. Beware that memory management will no longer be available (i.e. "new" and Unchecked_Deallocation probably won't work). If the host machine and OS are 64-bit then you need a multiarch compiler (supporting 32-bit code as the target) but you do not need multilib. -- Ludovic Brenta.