Ok thanks. That means my understanding on the build processes has flaws.

First we create the Binutils with --target=$LFS_TGT. So here we are
creating a cross-linker which is built on(--build) 'i686-pc-linux-gnu'
which will run on(--host) 'i686-pc-linux-gnu' system. But if we use this
linker for any linking, it will create outputs for 'i686-lfs-linux-gnu'.

Then we build GCC in the same manner. So it will also run on
'i686-pc-linux-gnu' system and will create binaries for
'i686-lfs-linux-gnu' system.

Here, we have run 'make install' in both GCC and Binutils. So the toolchain
will be now in '/tools' directory.

Next is Glibc.

Glibc has '--host=$LFS_TGT' and '--build=i686-pc-linux-gnu' configure
switches. I'm confused here. I know we have already built a cross compiler
here, but how are we specifying which compiler to use? We do not override
CC, AS, LD, etc. here. Somewhere my understanding must be wrong.

In Libstdc++ also we do the same thing, but we only specify
--host=$LFS_TGT. I'm assuming the internal --build must be
'i686-pc-linux-gnu'. I saw in GCC documentation "Specifying the host
without specifying the build should be avoided, as configure may (and once
did) assume that the host you specify is also the build, which may not be
true.". So I have doubts here also.

Can someone help me here.

Thanks

-Pradeepa

On Sun, May 17, 2015 at 11:25 PM, Bruce Dubbs <[email protected]> wrote:

> Pradeepa Senanayake wrote:
>
>> Hello,
>>
>> First of all this book is a wonderful work!!! Bravo!!!
>>
>> I am using LFS Book 7.7 in an Ubuntu 12.04 32 bit system.
>>
>> Recently I finished the Section "5.10. GCC-4.9.2 - Pass 2".
>>
>> After that I just ran the following command,
>>
>> lfs@ubuntu:/mnt/lfs/sources$ cc -v
>>
>> Using built-in specs.
>> COLLECT_GCC=cc
>>
>> COLLECT_LTO_WRAPPER=/mnt/lfs/tools/bin/../libexec/gcc/i686-pc-linux-gnu/4.9.2/lto-wrapper
>> Target: i686-pc-linux-gnu
>> Configured with: ../gcc-4.9.2/configure --prefix=/tools
>> --with-local-prefix=/tools --with-native-system-header-dir=/tools/include
>> --enable-languages=c,c++ --disable-libstdcxx-pch --disable-multilib
>> --disable-bootstrap --disable-libgomp
>> Thread model: posix
>> gcc version 4.9.2 (GCC)
>>
>> I'm worried about the TARGET. It says "i686-pc-linux-gnu" shouldn't it be,
>> "i686-lfs-linux-gnu".
>>
>> I was thinking that we already built a compiler to use to build the next
>> packages. Can someone clear this doubt?
>>
>
> What you have is correct after gcc-pass2.  We use --target=$LFS_TGT in
> pass1 but not pass2.
>
>   -- Bruce
>
>
> --
> http://lists.linuxfromscratch.org/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>
> Do not top post on this list.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> http://en.wikipedia.org/wiki/Posting_style
>
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to