Changeset 630308d for chapter04


Ignore:
Timestamp:
03/31/2021 10:41:38 AM (3 years ago)
Author:
Xℹ Ruoyao <xry111@…>
Branches:
ml-11.0, multilib
Children:
1ebfd6e4
Parents:
0dfc2f5
git-author:
Thomas Trepl <thomas@…> (03/31/2020 10:25:23 AM)
git-committer:
Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:38 AM)
Message:

MultiLib: Merge changes from trunk

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter04/settingenviron.xml

    r0dfc2f5 r630308d  
    3333
    3434  <para>The new instance of the shell is a <emphasis>non-login</emphasis>
    35   shell, which does not read the <filename>/etc/profile</filename> or
    36   <filename>.bash_profile</filename> files, but rather reads the
     35  shell, which does not read, and execute, the conten of <filename>/etc/profile</filename> or
     36  <filename>.bash_profile</filename> files, but rather reads, and executes, the
    3737  <filename>.bashrc</filename> file instead. Create the
    3838  <filename>.bashrc</filename> file now:</para>
     
    4747export LFS LC_ALL LFS_TGT PATH</literal>
    4848EOF</userinput></screen>
    49 
    5049<screen arch="ml_32,ml_x32,ml_all"><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"
    5150<literal>set +h
     
    6059EOF</userinput></screen>
    6160
     61  <variablelist>
     62    <title>The meaning of the command line options in <filename>.bashrc</filename></title>
     63
     64    <varlistentry>
     65      <term><parameter>set +h</parameter></term>
     66      <listitem>
    6267  <para>The <command>set +h</command> command turns off
    6368  <command>bash</command>'s hash function. Hashing is ordinarily a useful
     
    7176  available without remembering a previous version of the same program in a
    7277  different location.</para>
     78      </listitem>
     79    </varlistentry>
    7380
     81    <varlistentry>
     82      <term><parameter>umask 022</parameter></term>
     83      <listitem>
    7484  <para>Setting the user file-creation mask (umask) to 022 ensures that newly
    7585  created files and directories are only writable by their owner, but are
     
    7787  <function>open(2)</function> system call, new files will end up with permission
    7888  mode 644 and directories with mode 755).</para>
     89      </listitem>
     90    </varlistentry>
    7991
     92    <varlistentry>
     93      <term><parameter>LFS=/mnt/lfs</parameter></term>
     94      <listitem>
    8095  <para>The <envar>LFS</envar> variable should be set to the chosen mount
    8196  point.</para>
     97      </listitem>
     98    </varlistentry>
    8299
     100    <varlistentry>
     101      <term><parameter>LC_ALL=POSIX</parameter></term>
     102      <listitem>
    83103  <para>The <envar>LC_ALL</envar> variable controls the localization of certain
    84104  programs, making their messages follow the conventions of a specified country.
     
    86106  (the two are equivalent) ensures that everything will work as expected in
    87107  the chroot environment.</para>
     108      </listitem>
     109    </varlistentry>
    88110
     111    <varlistentry>
     112      <term><parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter></term>
     113      <listitem>
    89114  <para>The <envar>LFS_TGT</envar> variable sets a non-default, but compatible machine
    90115  description for use when building our cross compiler and linker and when cross
    91116  compiling our temporary toolchain. More information is contained in
    92117  <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para>
     118      </listitem>
     119    </varlistentry>
    93120
     121    <varlistentry>
     122      <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term>
     123      <listitem>
    94124  <para>By putting <filename class="directory">/tools/bin</filename> ahead of the
    95125  standard <envar>PATH</envar>, all the programs installed in <xref
     
    97127  their installation. This, combined with turning off hashing, limits the risk
    98128  that old programs are used from the host when the same programs are available in
    99   the chapter 5 environment.</para>
     129  the Chapter 5 environment.</para>
     130      </listitem>
     131    </varlistentry>
     132
     133    <varlistentry>
     134      <term><parameter>export LFS LC_ALL LFS_TGT PATH</parameter></term>
     135      <listitem>
     136        <para>While the above commands have set some variables, in order
     137        to make them visible within any sub-shells, we export them</para>
     138      </listitem>
     139    </varlistentry>
     140
     141  </variablelist>
    100142
    101143  <para>Finally, to have the environment fully prepared for building the
Note: See TracChangeset for help on using the changeset viewer.