[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gprbuild runtime search vs gnat-4.6 runtime install



Stephen Leake <stephen_leake@stephe-leake.org> writes:

> 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?

Actually, I this may be wrong.

'dpkg-archecture' uses 'gcc' to determine the HOST architecture. But as
explained in this gprbuild debian/rules comment:

# It is important to use the default Ada compiler driver as opposed to
# the default C compiler driver; they may be different on the build
# host.

we need to use gnatgcc instead of gcc. 

On the other hand, it doesn't seem to make any difference for the value
of DEB_HOST_MULTIARCH (or any of the other DEB_* values output by
'dpkg-architecture'); they are not compiler version dependent.

The only time it might matter is if we are trying to build a cross
compiler. But then neither gnatgcc nor gcc would be correct; you have to
specify the target directly.

So I'm thinking letting 'dpkg-architecture' use 'gcc' is ok for building
gprbuild.

-- 
-- Stephe


Reply to: