aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05/setting-environment.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2003-05-02 18:20:20 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2003-05-02 18:20:20 +0000
commitbc82645e958948a6aefd3147a0d7f712de9eaf6b (patch)
tree4855b70f785c1e6bf04856e97824988120503b05 /chapter05/setting-environment.xml
parent55b50e3f6653cef278bad7e45fe5a378966953a7 (diff)
Integrated Pure LFS - Phase 1
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2490 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05/setting-environment.xml')
-rw-r--r--chapter05/setting-environment.xml16
1 files changed, 13 insertions, 3 deletions
diff --git a/chapter05/setting-environment.xml b/chapter05/setting-environment.xml
index e52fd7b6b..636c05745 100644
--- a/chapter05/setting-environment.xml
+++ b/chapter05/setting-environment.xml
@@ -6,14 +6,24 @@
following commands to set up a good work environment:</para>
<para><screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
+set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
-CC="gcc -s"
-export LFS LC_ALL CC
+LDFLAGS="-s"
+PATH=/stage1/bin:$PATH
+export LFS LC_ALL LDFLAGS PATH
EOF
source ~/.bash_profile</userinput></screen></para>
+<para><userinput>set +h</userinput> turns off Bash's hash function. Hash
+normally is a useful feature where Bash uses a hash table to remember the
+full pathnames of executable files to avoid multiple `PATH' searches.
+However, we'd like the new tools to become available as soon as they are
+installed. By switching off the hash function, our "interactive" commands
+(make, patch, sed, cp and so forth) will always use the newest available
+during the build process.</para>
+
<para>This profile sets the umask to 022, so newly created files and
directories will have the correct permissions. To be more specific, only
the file owner will have write permission to new files and directories.
@@ -32,7 +42,7 @@ may cause trouble if you exit the chroot environment and wish to return later.
By setting LC_ALL to "POSIX" ("C" is an alias for "POSIX") we ensure that
everything will work as expected in the chroot environment.</para>
-<para>CC is a variable we set in order to prevent debugging symbols from
+<para>LDFLAGS is a variable we set in order to prevent debugging symbols from
being compiled into our static packages. By omitting these symbols during
the linking stage of compilation, we save hard drive space and decrease our
build time.</para>