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

Re: [Debian-bootstrap] An apparent need for gcc-<triplet>, cpp-<triplet>, g++-<triplet>, etc.



W dniu 02.07.2012 13:21, Wookey pisze:
> +++ Marcin Juszkiewicz [2012-07-02 12:56 +0200]:

> We are just talking about the fact that cross-gcc packages need a 
> symlink to the actual vX.X cross-gcc (and cpp and g++) binaries in 
> use. This used to be done with alternatives and is now done with a 
> generic gcc-<triplet> package to match the native case. In Debian 
> this latter part isn't being done at all right now so you end up 
> smylinkless]

>> There are gcc-defaults-arm{el,hf}-cross packages in Ubuntu which 
>> take care of symlinks. Going that way was discussed at Emdebian 
>> sprint in February 2011 and everyone agreed.
> 
> OK. But that was also viewed as an interim arrangement until this 
> multiarch toolchain work was done, so I think we should review this 
> and check we still agree this is the right thing for Debian now.

Even with multiarch toolchain we will need such metapackages. From which
source package they will be created is other thing.

>>>> Default Versions of Cross Compilers and Preprocessors 
>>>> -----------------------------------------------------

>> Native gcc is selected by 'gcc' package from gcc-defaults. In 
>> Ubuntu cross gcc is selected same way: gcc-triplet is symlink to 
>> gcc-X.Y-triplet (where X.Y of cross == X.Y of native gcc).
> 
> OK, so do dependencies ensure this package is always installed so
> you always end up with a symlink?, or do we have to rely on telling 
> people to install the generic cross-compiler package, not a specific
>  cross-compiler package? It does seem to work on ubuntu, I just don't
>  understand how.

"apt-get install gcc-arm-linux-gnueabihf" is what is suggested to people
when they want to install cross compiler under Ubuntu. If they want to
do application development then "apt-get install libc6-dev-armhf-cross"
is second step as this package is only recommendation (same issue in
Emdebian).

> How do you switch the symlink if you want to use a different 
> version?

In same way as you select other version of native compiler?

> What is the advantage of this method over /etc/alternatives?

For long time /etc/alternatives way was broken - all gcc versions had
same priority so if you installed 4.4 and then 4.3 you ended with 4.3 as
default. Later I fixed this so version == priority and then support got
removed.

Advantage is that user of distribution has *default* compiler version as
default. So if you are on 'precise' and install gcc-4.7/cross it does
not mean that it became default one.

Cross compiler in Debian derived systems looks like was used mostly for
compiling kernels not applications (libc-dev is only recommendation not
dependency).

> Is it just 'doko likes it like this'

No, it was not his decision but mine. And it got merged after Emdebian
developers agreed during sprint in ARM office.

> If I understand correctly the advantage of /etc/alternatives is that 
> you always get a symlink, whichever cross-gcc package you install. 
> The advantage of the generic cross-gcc package is that you can 
> install it without know anything about preffered versions (but if you
> do install a specific version then you don't get a symlink at all).
> But perhaps it is cleverer than that?

Advantage is that we treat cross compiler in same way as native one.
Nevermind how many gcc versions are available in archive the default one
is default (even if not latest). U-A way does not warrant that.

> BTW: Why are we treating gcc/cpp/g++ differently from binutils and 
> pkg-config and anything else that needs a <triplet>-tool link? I 
> guess gcc packaging allows for installing multiple versions whilst 
> the other don't.

There is one version of binutils in archive and there is no support for
more than one installed. Same with pkg-config (but here you can just
change location of *.pc files by environment variable).


Reply to: