Ignore:
Timestamp:
10/01/2022 08:03:20 AM (19 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/clfs-ng
Children:
ef1f48b
Parents:
259794e (diff), 2bf32ff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/trunk' into xry111/clfs-ng

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter04/settingenviron.xml

    r259794e rdd61c77  
    2020EOF</userinput></screen>
    2121
    22   <para>When logged on as user <systemitem class="username">lfs</systemitem>,
    23   the initial shell is usually a <emphasis>login</emphasis> shell which reads
     22  <para>When logged on as user <systemitem class="username">lfs</systemitem>
     23  or switched to the &lfs-user; user using a <command>su</command> command
     24  with <quote><parameter>-</parameter></quote> option,
     25  the initial shell is a <emphasis>login</emphasis> shell which reads
    2426  the <filename>/etc/profile</filename> of the host (probably containing some
    2527  settings and environment variables) and then <filename>.bash_profile</filename>.
     
    3335
    3436  <para>The new instance of the shell is a <emphasis>non-login</emphasis>
    35   shell, which does not read, and execute, the contents of <filename>/etc/profile</filename> or
     37  shell, which does not read, and execute, the contents of the <filename>/etc/profile</filename> or
    3638  <filename>.bash_profile</filename> files, but rather reads, and executes, the
    3739  <filename>.bashrc</filename> file instead. Create the
     
    6062  <command>bash</command>'s hash function. Hashing is ordinarily a useful
    6163  feature&mdash;<command>bash</command> uses a hash table to remember the
    62   full path of executable files to avoid searching the <envar>PATH</envar>
     64  full path to executable files to avoid searching the <envar>PATH</envar>
    6365  time and again to find the same executable. However, the new tools should
    64   be used as soon as they are installed. By switching off the hash function,
    65   the shell will always search the <envar>PATH</envar> when a program is to
     66  be used as soon as they are installed. Switching off the hash function forces
     67  the shell to search the <envar>PATH</envar> whenever a program is to
    6668  be run. As such, the shell will find the newly compiled tools in
    6769  <filename class="directory">$LFS/tools/bin</filename> as soon as they are
     
    119121      <term><parameter>PATH=/usr/bin</parameter></term>
    120122      <listitem>
    121   <para>Many modern linux distributions have merged <filename
     123  <para>Many modern Linux distributions have merged <filename
    122124  class="directory">/bin</filename> and <filename
    123125  class="directory">/usr/bin</filename>. When this is the case, the standard
    124   <envar>PATH</envar> variable needs just to be set to <filename
     126  <envar>PATH</envar> variable should be set to <filename
    125127  class="directory">/usr/bin/</filename> for the <xref
    126128  linkend="chapter-temporary-tools"/> environment. When this is not the
     
    145147  of <xref linkend="chapter-cross-tools"/> is picked up by the shell
    146148  immediately after its installation. This, combined with turning off hashing,
    147   limits the risk that the compiler from the host be used instead of the
     149  limits the risk that the compiler from the host is used instead of the
    148150  cross-compiler.</para>
    149151      </listitem>
     
    199201
    200202  <para>Finally, to have the environment fully prepared for building the
    201   temporary tools, source the just-created user profile:</para>
     203  temporary tools, force the <command>bash</command> shell to read
     204  the new user profile:</para>
    202205
    203206<screen><userinput>source ~/.bash_profile</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.