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

Re: default directories in installed library projects



Svante Signell writes:
> On Sun, 2014-03-16 at 11:12 +0100, Björn Persson wrote:
>> Ludovic Brenta wrote:
>> > I'd like to rephrase what Nicolas said.  GNAT can cross-compile and
>> > that has been the case for years.  However, upstream GNAT will not
>> > support multiarch anytime soon.
>> > 
>
>> That conflicts with my experience.
>
>> 
>> I don't want to tell you how to do your packaging, but if this doesn't
>> work in Debian then I think it has more to do with how GNAT is packaged
>> in Debian than with missing support upstream.
>> 
>> For actual cross-compilation to a completely different architecture I
>> would of course expect to need a separate cross-compiler.
>
> Hi, when porting and bootstrapping GNAT for GNU/Hurd. I stumbled on the
> problem of building a cross-compiler using Debian packages. I had to use
> the upstream version of gcc together with a lot of tweaks to make the
> build work (no native gnat programs were available)  
>
> Cross-compiler problems was caused by Debian patches removing the
> gnattols-cross targets from gnattools/Makefile (as per gcc-4.6/gnat-4.6)
>
>>From gcc-4.4-4.4.6/debian/changelog:
> gcc-4.1 (4.1.0-2) unstable; urgency=medium
> ...
>   * debian/patches/ada-libgnatvsn.dpatch: new.
>     - Introduce a new shared library named libgnatvsn, containing
>       common components of GNAT under the GNAT-Modified GPL, for
>       use in GNAT tools, ASIS, GLADE and GPS.
>     - Link the gnat tools against this new library.
>     - Rerun autoconf (Matthias Klose).
> ...
>  -- Matthias Klose <doko@debian.org>  Sat, 29 Apr 2006 00:32:09 +0200
>
> The breaking is related to the new libraries introduced in:
> ada-libgnatvsn.diff, ada-libgnatprj.diff, ada-sjlj.diff and
> ada-link-lib.diff. Especially in ada-link-lib.diff all cross building is
> removed from src/gcc/ada/gcc-interface/Makefile.in
>
> (this work was made over two years ago, in case somebody is interested I
> can try to refresh from old notes).

I'm the author of these patches.  I know, and ada-libgnatvsn.diff is
much more than two years old, as the changelog you quoted shows :)

The Debian gnat package was never intended as a facilitator to build Ada
cross-compilers.  Instead, one is expected to use gcc-x.y-source,
containing the pristine upstream sources, to build a cross-compiler.
(The package gcc-x.y-source contains the Debian patches but does not
apply them automatically to the sources.)

Björn's email prompted me to investigate gnatmake -m32 in the Debian
package.  It turned out that my patch, ada-default-project-path.diff,
broke an assumption made in more recent versions of GCC, which is that
project files and the Ada run-time library are in the same location.  I
changed that; in the next upload of gnat-4.9, gnatmake -m32 will still
look for project files in /usr/share/ada/adainclude but will now
correctly look for run-time systems in
/usr/lib/gcc/$target_triplet/$major.$minor/{,rts-}32.

This is only half of the job though; the other half will be to actually
build and provide the 32-bit RTS; more generally to provide the "other"
RTSs (plural) on any given multilib-enabled host.

I'll try to investigate that when I find time.

-- 
Ludovic Brenta.


Reply to: