[Nix-dev] Re: [Nix-commits] SVN commit: nix - 18833 - viric - in nixpkgs/branches/stdenv-updates/pkgs: development/compilers/gcc-4.3 development/compilers/gcc-4.4 top-level

Lluís Batlle viriketo at gmail.com
Tue Dec 8 23:15:09 CET 2009


Saluton!

2009/12/8 Ludovic Courtès <ludo at gnu.org>:
> Lluís Batlle <viriketo at gmail.com> writes:
>> 2009/12/8 Ludovic Courtès <ludo at gnu.org>:
>>>> It may very well work - while I use --with-headers, I did not try
>>>> --with-libs. I will try. I hope we can avoid then the libtool patches
>>>> for -B.
>>>
>>> Yes, that’d be great.
>> As I told in a recent letter, it does not work for non-cross-builds.
>
> Right, but we don’t need the Libtool patch for non-cross builds anyway.
>
Now I solved it better, as I commented. FLAGS_FOR_TARGET, and no
libtool patch. I think this will make you happy. :)

>>> According to http://gcc.gnu.org/install/build.html $BOOT_CFLAGS (and I
>>> assume $BOOT_LDFLAGS) is only used by the stage2 and stage3 compilers,
>>> regardless of whether we’re building a cross-compiler.
>> Those stages don't happen when building a cross-compiler.
>
> True.  Are these variables ignored altogether when building a cross
> compiler?
I think so. I set them only for native builds.

>>>  If you are not building a C library in the same source tree as GCC,
>>>  you should also provide the target libraries and headers before
>>>  configuring GCC, specifying the directories with --with-sysroot or
>>>  --with-headers and --with-libs.
>> How would I get target libraries, if I don't have any cross-compiler
>> to build them?
>
> The target libs are built with the just-built cross compiler, as
> explained in build.html.
You said "...  you should also provide the target libraries and
headers ...". I did not mean the target libs coming with gcc.

>
>> And for glibc to be able to install proper headers, I think it would
>> need at least to be able to run a target compiler for some configure
>> tests. But this latter is only a guess.
>
> I think this bootstrapping issue is not too different from that of
> ‘stdenvLinux’, is it?
It goes quite different.
stdenvLinux bootstraps having a gcc, a g++, and a glibc ready for the
platform. So we can either build a new gcc, a new glibc, or whatever
in nixpkgs, I'd say.

Creating a cross-toolchain, we start without any target library, and
without a cross compiler.

Amike,
Lluís.



More information about the nix-dev mailing list