GCC with GNAT Ada compiler

Karel Miklav karel at lovetemple.net
Sat Jun 17 22:31:42 UTC 2006

Gerald Pfeifer wrote:
> On Tue, 13 Jun 2006, Karel Miklav wrote:
>> 1. why gcc41 installs binaries in ${PREFIX}/ bin/?
> Among others, this way, users do not have to modify their PATH (and 
> other settings) which as you noted is necessary with the approach you
>  described for your GNAT port.
>> Isn't this a problem if multiple compilers are installed?
> It's not. I've carefully ensured, by means of proper configuration 
> options and several bug reports and pushes upstream, that all our 
> recent lang/gcc ports (gcc33, gcc34, gcc40, gcc41, and gcc42) install
>  conflict free, with the exception of gcc41 and gcc42 if Java is 
> used.

Great, one thing less to worry about.

>> 2. with default configure parameters Ada library gets installed 
>> into ${PREFIX}/lib/gcc/i386-portbld-freebsd6.1/4.1.2/gcc/ 
>> i386-portbld-freebsd6.1/4.1.2/. Would it be OK for other compilers 
>> to configure with --bindir=${PREFIX}/bin/gcc41? Maybe this is a 
>> GNAT bug and should be fixed?
> Yes, GNAT should install into ${PREFIX}/bin as well, using the 
> --program-suffix= option, like the lang/gcc ports are doing.

Ups, I merged two issues above. First is option --libdir, which has
a value of ${PREFIX}/lib/gcc/${CONFIGURE_TARGET}/${PORTVERSION}. This
is a problem for Ada, as libraries get installed into very deep and
odd looking path. Setting this option to ${PREFIX}/lib doesn't seem to
change anything for C and C++, but it helps Ada. Don't know about the
other compilers though.

Binaries are another problem, as program name transformation does not
currently work for Ada. I'll see what I can do about it.

>> 3. Is it OK to build in switches for excluding Objective C and C++?
> Depens which ports you have in mind. ;-)

galaxian-4.1.2 :))

> It's probably not worth in terms of disk space and build time to do
> this for the regular lang/gcc ports. These already are quite
> complex, plus by installing one of these without C++, for example,
> you'd cause problems for other ports using this one as a build
> dependency.

I didn't think about that. Look, I'd like to have Ada in GCC ports
in the end. There already is a FreeBSD port of GPL-ed GNAT, based on
GCC sources and patches prepared by AdaCore. Would it be acceptable if
I prepare ports named like gcc_gnatXY? These would mostly be copies of
gccXY ports with Ada included, and when matured, they could be merged
into GCC ports?


Karel Miklav

More information about the freebsd-ports mailing list