Changeset 37e35d2 for chapter04/settingenviron.xml
- Timestamp:
- 06/29/2020 07:55:01 AM (4 years ago)
- Branches:
- multilib-10.1
- Children:
- c4804e8
- Parents:
- d4fdde6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter04/settingenviron.xml
rd4fdde6 r37e35d2 44 44 LC_ALL=POSIX 45 45 LFS_TGT=$(uname -m)-lfs-linux-gnu 46 PATH=/tools/bin:/bin:/usr/bin 46 PATH=/usr/bin 47 if [ ! -L /bin ]; then PATH=/bin:$PATH; fi 48 PATH=$LFS/tools/bin:$PATH 47 49 export LFS LC_ALL LFS_TGT PATH</literal> 48 50 EOF</userinput></screen> … … 55 57 LFS_TGT32=i686-lfs-linux-gnu 56 58 LFS_TGTX32=x86_64-lfs-linux-gnux32 57 PATH=/tools/bin:/bin:/usr/bin 59 PATH=/usr/bin 60 if [ ! -L /bin ]; then PATH=/bin:$PATH; fi 61 PATH=$LFS/tools/bin:$PATH 58 62 export LFS LC_ALL LFS_TGT LFS_TGT32 LFS_TGTX32 PATH</literal> 59 63 EOF</userinput></screen> 60 64 61 65 <variablelist> 62 <title>The meaning of the command line options in <filename>.bashrc</filename></title>66 <title>The meaning of the settings in <filename>.bashrc</filename></title> 63 67 64 68 <varlistentry> … … 120 124 121 125 <varlistentry> 122 <term><parameter>PATH=/tools/bin:/bin:/usr/bin</parameter></term> 123 <listitem> 124 <para>By putting <filename class="directory">/tools/bin</filename> ahead of the 125 standard <envar>PATH</envar>, all the programs installed in <xref 126 linkend="chapter-temporary-tools"/> are picked up by the shell immediately after 127 their installation. This, combined with turning off hashing, limits the risk 128 that old programs are used from the host when the same programs are available in 129 the Chapter 5 environment.</para> 126 <term><parameter>PATH=/usr/bin</parameter></term> 127 <listitem> 128 <para>Many modern linux distributions have merged <filename 129 class="directory">/bin</filename> and <filename 130 class="directory">/usr/bin</filename>. When this is the case, the standard 131 <envar>PATH</envar> variable needs just to be set to <filename 132 class="directory">/usr/bin/</filename> for the <xref 133 linkend="chapter-temporary-tools"/> environment. When this is not the 134 case, the following line adds <filename class="directory">/bin</filename> 135 to the path.</para> 136 </listitem> 137 </varlistentry> 138 139 <varlistentry> 140 <term><parameter>if [ ! -L /bin ]; then PATH=/bin:$PATH; fi</parameter></term> 141 <listitem> 142 <para>If <filename class="directory">/bin</filename> is not a symbolic 143 link, then it has to be added to the <envar>PATH</envar> variable.</para> 144 </listitem> 145 </varlistentry> 146 147 <varlistentry> 148 <term><parameter>PATH=$LFS/tools/bin:$PATH</parameter></term> 149 <listitem> 150 <para>By putting <filename class="directory">$LFS/tools/bin</filename> ahead of the 151 standard <envar>PATH</envar>, the cross-compiler installed at the beginning 152 of <xref linkend="chapter-cross-tools"/> is picked up by the shell 153 immediately after its installation. This, combined with turning off hashing, 154 limits the risk that the compiler from the host be used instead of the 155 cross-compiler.</para> 130 156 </listitem> 131 157 </varlistentry> … … 135 161 <listitem> 136 162 <para>While the above commands have set some variables, in order 137 to make them visible within any sub-shells, we export them </para>163 to make them visible within any sub-shells, we export them.</para> 138 164 </listitem> 139 165 </varlistentry> 140 166 141 167 </variablelist> 168 169 <important> 170 171 <para>Several commercial distributions add a non-documented instantiation 172 of <filename>/etc/bash.bashrc</filename> to the initialization of 173 <command>bash</command>. This file has the potential to modify the 174 <systemitem class="username">lfs</systemitem> 175 user's environment in ways that can affect the building of critical LFS 176 packages. To make sure the <systemitem class="username">lfs</systemitem> 177 user's envronment is clean, check for the 178 presence of <filename>/etc/bash.bashrc</filename> and, if present, move it 179 out of the way. As the <systemitem class="username">root</systemitem> 180 user, run:</para> 181 182 <screen role="nodump"><userinput>[ ! -e /etc/bash.bashrc ] || mv -v /etc/bash.bashrc /etc/bash.bashrc.NOUSE</userinput></screen> 183 184 <para>After use of the <systemitem class="username">lfs</systemitem> 185 user is finished at the beginning of <xref 186 linkend="chapter-chroot-temporary-tools"/>, you can restore 187 <filename>/etc/bash.bashrc</filename> (if desired).</para> 188 189 <para>Note that the LFS Bash package we will build in 190 <xref linkend="ch-system-bash"/> is not configured to load or execute 191 <filename>/etc/bash.bashrc</filename>, so this file is useless on a 192 completed LFS system.</para> 193 </important> 142 194 143 195 <para>Finally, to have the environment fully prepared for building the
Note:
See TracChangeset
for help on using the changeset viewer.