[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 20:11:02 CET 2009


Hep,

2009/12/8 Ludovic Courtès <ludo at gnu.org>:
> Sure, but before a “fix” would be considered upstream, it should be
> clear that the build system doesn’t conform to its documentation, and
> that we didn’t miss any option to do what we want to achieve.
I agree.
>
> [...]
>
>> 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.

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

>
>> And even using them, -B will not pass to the libmudflap shared library
>> I think. Have you checked that?
>
> No.  This document also reads:
>
>  BOOT_CFLAGS does not apply to bootstrapped target libraries.  Since
>  these are always compiled with the compiler currently being
>  bootstrapped, you can use CFLAGS_FOR_TARGET to modify their
>  compilation flags, as for non-bootstrapped target libraries.
>
> IIUC, this would mean that ‘CFLAGS_FOR_TARGET=-B/path/to/target/libc’
> would do the right thing.
libtool in the target libraries does not pass -Bxxx to the linker.
That's why we have  a patch. But I think I will overcome that with
FLAGS_FOR_TARGET...

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

Regards,
Lluís.



More information about the nix-dev mailing list