Re: gprbuild runtime search vs gnat-4.6 runtime install
Ludovic Brenta <ludovic@ludovic-brenta.org> writes:
> Stephen Leake writes:
>> gprbuild, when searching for matching Ada compilers, looks for the
>> runtime files.
>>
>> ...
>>
>> However, in unstable, gnat-4.6 (4.6.1-1) put them in
>>
>> /usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/rts-native/adalib
>> /usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.6/adalib
>> /usr/lib/ada/adalib
>>
>> ...
>>
>> Is there a document that describes the path convention (so I can
>> reference it)? I don't see anything about 'multilib' in debian policy
>> or developers reference.
>
> Because it's now called "multiarch":
>
> http://wiki.debian.org/Multiarch/
Ok.
I didn't find anything about how to get the right architecture triplet
to use in the path at package build time.
I noticed in some other packages the use of DEB_TARGET_MULTIARCH
(apparently an environment variable), so I tried evaluating that in
debian/rules. It complained that 'dpkg-archecture' couldn't find 'gcc'.
('gcc' is not installed in my unstable chroot because it still requires
gcc-4.4).
So I read the 'dpkg-archecture' man page, and it seems like the right
tool to use. So I'm changing the gpr runtime file location $(libsubdir)
to be:
DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
target := $(shell gnatgcc -dumpmachine)
version := $(shell gnatgcc -dumpversion)
libsubdir := /usr/lib/$(DEB_HOST_MULTIARCH)/gcc/$(target)/$(version)
Does that look right?
As an aside, dpkg-architecture does _not_ define DEB_TARGET_MULTIARCH. I
guess that would be used in building cross compilers (or other cross
target tools)?
--
-- Stephe
Reply to: