Changeset 630308d for chapter04/settingenviron.xml
- Timestamp:
- 03/31/2021 10:41:38 AM (3 years ago)
- Branches:
- ml-11.0, multilib, xry111/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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/settingenviron.xml
r0dfc2f5 r630308d 33 33 34 34 <para>The new instance of the shell is a <emphasis>non-login</emphasis> 35 shell, which does not read the<filename>/etc/profile</filename> or36 <filename>.bash_profile</filename> files, but rather reads the35 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 37 37 <filename>.bashrc</filename> file instead. Create the 38 38 <filename>.bashrc</filename> file now:</para> … … 47 47 export LFS LC_ALL LFS_TGT PATH</literal> 48 48 EOF</userinput></screen> 49 50 49 <screen arch="ml_32,ml_x32,ml_all"><userinput>cat > ~/.bashrc << "EOF" 51 50 <literal>set +h … … 60 59 EOF</userinput></screen> 61 60 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> 62 67 <para>The <command>set +h</command> command turns off 63 68 <command>bash</command>'s hash function. Hashing is ordinarily a useful … … 71 76 available without remembering a previous version of the same program in a 72 77 different location.</para> 78 </listitem> 79 </varlistentry> 73 80 81 <varlistentry> 82 <term><parameter>umask 022</parameter></term> 83 <listitem> 74 84 <para>Setting the user file-creation mask (umask) to 022 ensures that newly 75 85 created files and directories are only writable by their owner, but are … … 77 87 <function>open(2)</function> system call, new files will end up with permission 78 88 mode 644 and directories with mode 755).</para> 89 </listitem> 90 </varlistentry> 79 91 92 <varlistentry> 93 <term><parameter>LFS=/mnt/lfs</parameter></term> 94 <listitem> 80 95 <para>The <envar>LFS</envar> variable should be set to the chosen mount 81 96 point.</para> 97 </listitem> 98 </varlistentry> 82 99 100 <varlistentry> 101 <term><parameter>LC_ALL=POSIX</parameter></term> 102 <listitem> 83 103 <para>The <envar>LC_ALL</envar> variable controls the localization of certain 84 104 programs, making their messages follow the conventions of a specified country. … … 86 106 (the two are equivalent) ensures that everything will work as expected in 87 107 the chroot environment.</para> 108 </listitem> 109 </varlistentry> 88 110 111 <varlistentry> 112 <term><parameter>LFS_TGT=(uname -m)-lfs-linux-gnu</parameter></term> 113 <listitem> 89 114 <para>The <envar>LFS_TGT</envar> variable sets a non-default, but compatible machine 90 115 description for use when building our cross compiler and linker and when cross 91 116 compiling our temporary toolchain. More information is contained in 92 117 <xref linkend="ch-tools-toolchaintechnotes" role=""/>.</para> 118 </listitem> 119 </varlistentry> 93 120 121 <varlistentry> 122 <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term> 123 <listitem> 94 124 <para>By putting <filename class="directory">/tools/bin</filename> ahead of the 95 125 standard <envar>PATH</envar>, all the programs installed in <xref … … 97 127 their installation. This, combined with turning off hashing, limits the risk 98 128 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> 100 142 101 143 <para>Finally, to have the environment fully prepared for building the
Note:
See TracChangeset
for help on using the changeset viewer.