* libraries are not supported on this platform
@ 2012-11-17 21:27 Vincent Aurele
2012-11-17 22:37 ` Simon Wright
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Aurele @ 2012-11-17 21:27 UTC (permalink / raw)
Hi,
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?
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libraries are not supported on this platform
2012-11-17 21:27 libraries are not supported on this platform Vincent Aurele
@ 2012-11-17 22:37 ` Simon Wright
0 siblings, 0 replies; 2+ messages in thread
From: Simon Wright @ 2012-11-17 22:37 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-22 3:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17 21:27 libraries are not supported on this platform Vincent Aurele
2012-11-17 22:37 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox