On 3/17/19 5:42 PM, Pierre Labastie wrote:
On 17/03/2019 21:48, [email protected] wrote:
Trying to figure this out.


     6.10. Adjusting the Toolchain

The step the results in

grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib64") |SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib")|
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib")

Notice the = in front of the first and last entries.  I know they should be
ignored but what is causing the

=/tools...... ?


So I unounted the LFS partition and mkfs.ext4 -m1 -L LFS, remounted the LFS
partition and rebulit Chapter 5 and stopping.  the ran the following tests

I know it is happening during the chapter 5 build ( Nothing from Chapter 6
built at this point ).  The first ( ld test ) is the same as the adjusting
tool chain step the the second one ( gcc test ) gets it correct.

lfs:/mnt/lfs/usr/src/LFS-RPM$ ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/tools/lib")
SEARCH_DIR("=/tools/x86_64-pc-linux-gnu/lib")

lfs:/mnt/lfs/usr/src/LFS-RPM$ gcc -m64 -Xlinker --verbose  2>/dev/null | grep
SEARCH | sed 's/SEARCH_DIR("=\?\([^"]\+\)"); */\1\n/g'  | grep -vE '^$'
/tools/x86_64-pc-linux-gnu/lib64
/tools/lib
/tools/x86_64-pc-linux-gnu/lib
lfs:/mnt/lfs/usr/src/LFS-RPM$

Any explainations?

Tentative explanation:
If a searchdir begins with =, then the equal sign will be replaced with the
prefix specified with a --sysroot option. (see "man ld" at "-L" option).

I too have those = signs, and my guess is that it is because we use
--with-sysroot when building binutils-pass2. If you read "man ld" for
"-rpath-link" option, you'll see that the order in which the libraries are
searched is influenced by this flag. We need it for a couple of packages in
chapter 5, which use -rpath to specify libraries (instead of -L). But now,
this means the linker is configured to accept the --sysroot option, and it can
only accept it if the searchdir begin with =...

Pierre


Thanks for the explaination.

It just looked weird as I have not seen that before


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