On Tue, 27 Dec 2016 19:25:45 +0600
ssmtpmailtesting ssmtpmailtesting <[email protected]> wrote:

> What does it mean by cross compiler or cross compiling?
It means compiling for a different computer. In LFS however, we trick gcc into 
thinking that it's compiling for a different computer when it really isn't. The 
reason is that when gcc is in cross-compilation mode, it won't make assumptions 
about the target system based on what it finds on the host.
> I'm in chapter 5 to build temporary system.
> 
> I tried this for binutils:
> 
> ../configure --prefix=/tools            \
>              --with-sysroot=$LFS        \
>              --with-lib-path=/tools/lib \
>              --target=$LFS_TGT          \
>              --disable-nls              \
>              --disable-werror
> 
> make -j2
> make install
> 
> It looked, binutils was installed successfully in /tools. But I don't know
> what --with-sysroot=$LFS does. Can anyone explain this? Won't
> --prefix=/tools and --target=$LFS_TGT install binutils? Why do we need
> --with-sysroot=$LFS?
The book explains clearly what each argument does. All of them are necessary to 
create a clean break with the host system.
> After installing binutils in that way I wanted to install gcc in /tools in
> one pass too. I wanted to skip gcc pass 2:
> http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-pass2.html
Please don't skip anything. You will end up with a non-functioning system.

> Can anyone tell me how I should configure and install gcc with one pass
> using that previously installed binutils?
If that was feasible, the book would include it. In fact the two-stage process 
is essential for a clean break with the host. 
> Also when do I need this: --host=$LFS_TGT? What's the difference between
> --host=$LFS_TGT and --with-sysroot=$LFS? --host is in
> http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-libstdc++.html
> and http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html
> 
> http://www.linuxfromscratch.org/lfs/view/stable/chapter05/glibc.html , In
> glibc I saw: --build=$(../scripts/config.guess) , what does this --build
> do? When do I need --build? Why didn't we need --build in binutils and gcc?
Because, if you specify a target, you don't need to specify the host; by 
default, it will be the same. However you can only use --target for a build 
tool like gcc or binutils. glibc is not a build tool, so you have to set the 
host on which it is to run explicitly.

-- 

H Russman
-- 
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