[lfs-dev] Possible problem with current glibc (LFS 7.2 cant recompile LFS 7.2)

Bruce Dubbs bruce.dubbs at gmail.com
Sun Aug 26 16:09:46 PDT 2012


Ken Moffat wrote:
> On Sun, Aug 26, 2012 at 10:13:10PM +0100, Ken Moffat wrote:
>>
>>   So, yes, as you have pointed out, it is using the host's compiler
>> here.
>>
>>   Looking at my previous builds, in 2.14.1 and 2.15 cross-rpc did not
>> get built, so something based on the initial patch I pointed to in
>> my last mail has been included upstream.
>>
>>   I'll give it a try with --enable-obsolete-rpc when I've eaten.
>>
>   Actually, scratch that : it won't address this problem.  I _will_
> be using --enable-obsolete-rpc in chapter 6 based on Jasmine's
> message at
>
> http://linuxfromscratch.org/pipermail/lfs-dev/2012-August/067031.html
>
>   because I think this issue shows we need at least an -rc2

I was thinking the same thing.

>   In glibc-2.16.0/sunrpc/Makefile I can see the following:
>
> # When generic makefile support for build system programs is
> # available, it should replace this code.  See
> # <http://sourceware.org/bugzilla/show_bug.cgi?id=14087>.
> $(cross-rpcgen-objs): $(objpfx)cross-%.o: %.c $(before-compile)
>          $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS)
> $< \
>                  $(OUTPUT_OPTION) $(native-compile-mkdep-flags) -c
>
> $(objpfx)cross-rpcgen: $(cross-rpcgen-objs)
>          $(BUILD_CC) $^ $(BUILD_LDFLAGS) -o $@
>
>   So, it is now set to use ${BUILD_CC} instead of ${CC}
>
>   in glibc-2.16.0/INSTALL BUILD_CC is explained by:
>
>      It is easy to configure the GNU C Library for cross-compilation by
> setting a few variables in `configparms'.  Set `CC' to the
> cross-compiler for the target you configured the library for; it is
> important to use this same `CC' value when running `configure', like
> this: `CC=TARGET-gcc configure TARGET'.  Set `BUILD_CC' to the compiler
> to use for programs run on the build system as part of compiling the
> library.  You may need to set `AR' to cross-compiling versions of `ar'
> if the native tools are not configured to work with object files for
> the target you configured for.

I tried setting CC in th environment for just the make and it didn't 
work.  I also tried exporting BUILD_CC and wasn't picked up either.  Now 
I just edited the Makefile to set BUILD_CC and it will take about 10 
minutes to run.

If that works, I'll try setting in configparms.

>   So I suppose we need to use BUILD_CC=${LFS_TGT}-gcc - AR already
> looks ok (at end of config.log) :
> S["AR"]="/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/4.7.1/../../../../x86_64-lfs-linux-gnu/bin/ar"
>
>   and CC is of course ok:
> S["CC"]="x86_64-lfs-linux-gnu-gcc"
>
>   BUILD_LDFLAGS is not set, so nothing to override for that.

OK.

   -- Bruce





More information about the lfs-dev mailing list