[lfs] 01/02: binutils: add --with-lib-path=/usr/lib

git Owner ([email protected] via lfs-book Mailing List) <[email protected]> Sat, 01 Aug 2026 08:01:36 +0000
Newsgroups gmane.linux.lfs.book
Message-ID <[email protected]>
This is a multi-part message in MIME format...

------------=_1785571301-1024790-7124
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch trunk
in repository lfs.

commit 2c63342db4d6edda7f563c8a2b63ba26b45dd3de
Author: Xi Ruoyao <[email protected]>
AuthorDate: Sat Aug 1 15:58:14 2026 +0800

    binutils: add --with-lib-path=/usr/lib
---
 chapter08/binutils.xml | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index 9ae2fde42..ae2993657 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -58,6 +58,7 @@ cd       build</userinput></screen>
              --enable-64-bit-bfd \
              --enable-new-dtags  \
              --with-system-zlib  \
+             --with-lib-path=/usr/lib \
              --enable-default-hash-style=gnu</userinput></screen>
 
     <variablelist>
@@ -74,7 +75,7 @@ cd       build</userinput></screen>
       <varlistentry>
         <term><parameter>--enable-plugins</parameter></term>
         <listitem>
-          <para>Enables plugin support for the linker.</para>
+          <para>Enable plugin support for the linker.</para>
         </listitem>
       </varlistentry>
 
@@ -86,6 +87,22 @@ cd       build</userinput></screen>
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><parameter>--with-lib-path=/usr/lib</parameter></term>
+        <listitem>
+          <para>Specify the path for the linker (<command>ld</command>)
+          to search.  By default it searches several directories nonexist
+          on LFS besides <filename class='directory'>/usr/lib</filename>,
+          especially the <filename class='directory'>/usr/lib64</filename>
+          directory that we deliberately avoid.  In case
+          <filename class='directory'>/usr/lib64</filename> was mistakenly
+          created and populated with some libraries, making
+          <command>ld</command> not search the path can highlight the issue
+          earlier with a failure finding those libraries when building a
+          package using them (instead of when running that package).</para>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
 
     <para>Compile the package:</para>

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

------------=_1785571301-1024790-7124
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page

------------=_1785571301-1024790-7124--