Changeset 6e6641f


Ignore:
Timestamp:
07/18/2024 03:13:20 AM (7 weeks ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.2, 12.2-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.2
Children:
0808f28
Parents:
f1054497
git-author:
Xi Ruoyao <xry111@…> (07/12/2024 05:09:46 AM)
git-committer:
Xi Ruoyao <xry111@…> (07/18/2024 03:13:20 AM)
Message:

binutils: Add --enable-new-dtags

This option makes ld use DT_RUNPATH instead of DT_RPATH. DT_RPATH is
generally considered bad because it takes precedence over
LD_LIBRARY_PATH. For example, eog is linked with -rpath /usr/lib/eog,
and with DT_RPATH if an old eog is already installed we are basically
impossible to debug a new eog build w/o overwriting the system
installation first or explicitly using "ld.so --inhibit-rpath" to
invoke it.

This "new" actually means "new in 2000," it's 24 years ago and all other
distros has enabled it. Thus I guess some unexplainable "test suite
uses installed library instead of the just built one" issues in BLFS are
actually caused by this difference: the package author just assumes
everyone is using DT_RUNPATH thus they just set LD_LIBRARY_PATH and
consider it enough to test with the just built libraries, but DT_RPATH
breaks this expectation.

Let's eliminate the difference as it seems not doing anything good and
doing so just takes one switch.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chapter05/binutils-pass1.xml

    rf1054497 r6e6641f  
    7777             --enable-gprofng=no \
    7878             --disable-werror    \
     79             --enable-new-dtags  \
    7980             --enable-default-hash-style=gnu</userinput></screen>
    8081
     
    135136
    136137      <varlistentry>
     138        <term><parameter>--enable-new-dtags</parameter></term>
     139        <listitem>
     140          <para>This makes the linker use the <quote>runpath</quote> tag for
     141          embedding library search paths into executables and shared libraries,
     142          instead of the traditional <quote>rpath</quote> tag.  It makes
     143          debugging dynamically linked executables easier and works around
     144          potential issues in the test suite of some packages.</para>
     145        </listitem>
     146      </varlistentry>
     147
     148      <varlistentry>
    137149        <term><parameter>--enable-default-hash-style=gnu</parameter></term>
    138150        <listitem>
  • chapter06/binutils-pass2.xml

    rf1054497 r6e6641f  
    7474    --disable-werror           \
    7575    --enable-64-bit-bfd        \
     76    --enable-new-dtags         \
    7677    --enable-default-hash-style=gnu</userinput></screen>
    7778
  • chapter08/binutils.xml

    rf1054497 r6e6641f  
    5858             --disable-werror    \
    5959             --enable-64-bit-bfd \
     60             --enable-new-dtags  \
    6061             --with-system-zlib  \
    6162             --enable-default-hash-style=gnu</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.