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 ( and I
will need to finish building all my desktop BLFS, only half-way there,
then rebuild it all on -rc2, so I'm not exactly overjoyed : I wonder
what *other* test builders are going to find in -rc1 ? ).

 Also from that post I'll try Bruce's sed to use the included rpc
headers in chapter 5's cross-build : they haven't changed in years,
but they might do if libtirpc development takes off, they seem to
now be needed, and htis is further isolation from the host.

 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.

 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.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to