From: Simon Wright <simon@pushface.org>
Subject: Re: libraries are not supported on this platform
Date: Sat, 17 Nov 2012 22:37:01 +0000
Date: 2012-11-17T22:37:01+00:00 [thread overview]
Message-ID: <lymwyfrh4i.fsf@nidhoggr.home> (raw)
In-Reply-To: d8634d93-7440-4afa-88f0-a4565f3112c3@googlegroups.com
Vincent Aurele <vaurele@gmx.com> 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
<!-- Systems with no support for shared libraries, but with static libraries -->
<configuration>
<targets>
<target name="^.*aix.*$" />
<target name="^.*lynxos.*$" />
<target name="^powerpc-elf$" />
<target name="^powerpc-eabispe$" />
<target name="^erc32-elf$" />
<target name="^leon-elf$" />
<target name="^leon3-elf$" />
<target name="^.*wrs-vxworks.*$" />
<target name="^avr$" />
</targets>
<config>
for Library_Support use "static_only";
for Library_Builder use "${GPRCONFIG_PREFIX}libexec/gprbuild/gprlib";
</config>
</configuration>
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
prev parent reply other threads:[~2012-11-22 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-17 21:27 libraries are not supported on this platform Vincent Aurele
2012-11-17 22:37 ` Simon Wright [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox