Changeset b454589


Ignore:
Timestamp:
05/06/2020 01:02:47 PM (4 years ago)
Author:
Pierre Labastie <pieere@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
c911069
Parents:
69a8b2b7
Message:

Avoid having /bin in lfs' PATH if the build distro has merged
/bin and /usr/bin

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross-chap5@11837 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter04/settingenviron.xml

    r69a8b2b7 rb454589  
    4444LC_ALL=POSIX
    4545LFS_TGT=$(uname -m)-lfs-linux-gnu
    46 PATH=$LFS/tools/bin:/bin:/usr/bin
     46PATH=/usr/bin
     47if [ ! -l /bin ]; then PATH=/bin:$PATH; fi
     48PATH=$LFS/tools/bin:$PATH
    4749export LFS LC_ALL LFS_TGT PATH</literal>
    4850EOF</userinput></screen>
     
    109111
    110112    <varlistentry>
    111       <term><parameter>PATH=$LFS/tools/bin:/bin:/usr/bin</parameter></term>
     113      <term><parameter>PATH=/usr/bin</parameter></term>
     114      <listitem>
     115  <para>Many modern linux distributions have merged <filename
     116  class="directory">/bin</filename> and <filename
     117  class="directory">/usr/bin</filename>. When this is the case, the standard
     118  <envar>PATH</envar> variable needs just to be set to <filename
     119  class="directory">/usr/bin/</filename> for the <xref
     120  linkend="chapter-temporary-tools"/> environment. When this is not the
     121  case, the following line adds <filename class="directory">/bin</filename>
     122  to the path.</para>
     123      </listitem>
     124    </varlistentry>
     125
     126    <varlistentry>
     127            <term><parameter>if [ ! -l /bin ]; then PATH=/bin:$PATH; fi</parameter></term>
     128      <listitem>
     129  <para>If <filename class="directory">/bin</filename> is not a symbolic
     130  link, then it has to be added to the <envar>PATH</envar> variable.</para>
     131      </listitem>
     132    </varlistentry>
     133
     134    <varlistentry>
     135      <term><parameter>PATH=$LFS/tools/bin:$PATH</parameter></term>
    112136      <listitem>
    113137  <para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the
    114   standard <envar>PATH</envar>, all the programs installed in <xref
    115   linkend="chapter-temporary-tools"/> are picked up by the shell immediately after
    116   their installation. This, combined with turning off hashing, limits the risk
    117   that old programs are used from the host when the same programs are available in
    118   the Chapter 5 environment.</para>
     138  standard <envar>PATH</envar>, the cross-compiler installed at the beginning
     139  of <xref linkend="chapter-temporary-tools"/> is picked up by the shell
     140  immediately after its installation. This, combined with turning off hashing,
     141  limits the risk that the compiler from the host be used instead of the
     142  cross-compiler.</para>
    119143      </listitem>
    120144    </varlistentry>
Note: See TracChangeset for help on using the changeset viewer.