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: a07f3367d7,ac282e2ce1856983 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.73.226 with SMTP id o2mr4684864pav.12.1353554542710; Wed, 21 Nov 2012 19:22:22 -0800 (PST) Path: s9ni4391pbb.0!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!rt.uk.eu.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: libraries are not supported on this platform Date: Sat, 17 Nov 2012 22:37:01 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="f38d6453efa614aca652dfde0a80d954"; logging-data="32756"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+AN+qxkD7A5Xe+CqRsTE4pQlLxZGQYFNI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:yYPIOumE6/VwMHuB9fXimHAQmCw= sha1:y8LjPmIemHnMt2Jj46K5LlPXpSE= X-Received-Bytes: 3028 Content-Type: text/plain Date: 2012-11-17T22:37:01+00:00 List-Id: Vincent Aurele writes: > I have a cross-compiler (target: arm-none-eabi) and I'm trying to > compile my project with it. This project use a precompiled (static) C > library so I have defined a 'library project' in lib.gpr with 'for > Externally_Built use "True";'. Using my standard gnatmake, it works > fine but when I try to compile my project with the cross-compiler, I > have an error: > > lib.gpr:8:24: warning: libraries are not supported on this platform > > and my lib is not used by the linker (so the link fails) > > I understand that my target don't support dynamic library but static > library are perfectly fine, so I think it should be work. Is this an > issue with my cross-compiler? Is there a way to make it work? Poking around in GNAT GPL 2012, in {prefix}/share/gprconfig/linker.xml there's an interesting section at line 326 for Library_Support use "static_only"; for Library_Builder use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib"; and I think that the version of this file your cross-gnatmake (or gprbuild) is using has instead, in the part that matches arm-none-eabi, for Library_Support use "none"; You'll need to work out how teach it to use the correct cross-ar etc as well. There's the GPRBuild manual[1], and the section on GPRconfig may be useful. [1] http://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html