r90 - in trunk/text: . chapter01 chapter02 chapter06

robert at linuxfromscratch.org robert at linuxfromscratch.org
Wed Jan 12 14:36:37 PST 2005


Author: robert
Date: 2005-01-12 15:36:35 -0700 (Wed, 12 Jan 2005)
New Revision: 90

Removed:
   trunk/text/chapter02/07-static-vs-shared.txt
Modified:
   trunk/text/README.txt
   trunk/text/chapter01/changelog.txt
   trunk/text/chapter06/14-coreutils.txt
   trunk/text/chapter06/22-vim.txt
   trunk/text/chapter06/36-bash.txt
   trunk/text/chapter06/43-grep.txt
   trunk/text/chapter06/44-grub.txt
   trunk/text/chapter06/58-udev.txt
Log:
removed static linking options for coreutils, udev, etc

Modified: trunk/text/README.txt
===================================================================
--- trunk/text/README.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/README.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -51,11 +51,6 @@
 
 See BUGS.txt for current bugs.
 
-In chapter 6 we can statically link Coreutils, Bash, Udev, Util-linux, Grep,
-Vim, and Grub. This is in case ld.so or libc.so ever becomes damaged or missing,
-we will still have basic system functionality. See
-chapter02/07-static-vs-shared.txt for more info on this. This is optional.
-
 Send bugs, comments, and questions to:
 hlfs-dev at linuxfromscratch.org
 

Modified: trunk/text/chapter01/changelog.txt
===================================================================
--- trunk/text/chapter01/changelog.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter01/changelog.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -97,5 +97,5 @@
 New grsec patch version. Released 0.2-pre1. Up to man-1.5p.
 
 January 12th, 2005 [Robert]
-Bump to uClibc-0.9.27.
+Bump to uClibc-0.9.27. Took the static linking options out for coreutils, etc.
 

Deleted: trunk/text/chapter02/07-static-vs-shared.txt
===================================================================
--- trunk/text/chapter02/07-static-vs-shared.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter02/07-static-vs-shared.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -1,20 +0,0 @@
-- Chapter 2 - Static verses Shared
-
-There are pros and cons to both static and shared or dynamic linking. In the
-beginning of computers everything was static and monolithic. This works fine
-but it is not flexible. Modular designs have become more popular because
-they are easier to maintain. New modules can be reloaded, unused modules
-don't need to be loaded at all. Dynamic linking allows for the system to use
-shared memory. So if ten programs are loaded but all use the same library, the
-library need only be loaded once into memory. Statically linked programs do
-not share memory for library functions. Statically linked programs also use
-more disc space than dynamically linked programs. When the libraries are
-upgraded all statically linked programs need to be recompiled with the new
-library. Dynamically linked programs would not need to be recompiled to use
-a new library version.
-
-Statically linked programs are stand-alone and independent (usually). For
-this reason they are more dependable.
-
-To do: Add a better debate here.
-

Modified: trunk/text/chapter06/14-coreutils.txt
===================================================================
--- trunk/text/chapter06/14-coreutils.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/14-coreutils.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -10,23 +10,10 @@
 patch -Np1 -i ../coreutils-5.2.1-static_uname-1.patch &&
 patch -Np1 -i ../coreutils-5.2.1-suppress_uptime_kill_su-1.patch
 
-# We have two options here. Install Coreutils statically linked or
-# dynamically linked. See chapter02/07-static-vs-shared.txt for more
-# information. Static linking is suggested for Coreutils because
-# the programs in this package are critical for system management.
+# Configure and make Coreutils.
 
-# To build Coreutils with static linking use this command.
-
-env LDFLAGS=-static DEFAULT_POSIX2_VERSION=199209 \
-	./configure --prefix=/usr ${disable_nls}
-
-# To build Coreutils with shared linking use this command.
-
 env DEFAULT_POSIX2_VERSION=199209 \
-	./configure --prefix=/usr ${disable_nls}
-
-# Then build Coreutils.
-
+	./configure --prefix=/usr ${disable_nls} &&
 make
 
 # To run the tests we need to add a dummy user and two groups.

Modified: trunk/text/chapter06/22-vim.txt
===================================================================
--- trunk/text/chapter06/22-vim.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/22-vim.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -11,23 +11,15 @@
 
 patch -Np1 -i ../vim-6.3-security_fix-1.patch
 
-# You may wish to install Vim statically linked. Though Vim is not
-# critical in recovering a system it can be very useful in some
-# emergency situations.
+# Configure and make Vim.
 
-# If you would like to compile Vim statically linked use this command.
-
-env LDFLAGS=-static \
-	./configure --prefix=/usr --enable-multibyte ${disable_nls}
-
-# If you would like to compile Vim with shared linking use this command.
-
 env CC="gcc -pie -fPIE" \
-	./configure --prefix=/usr --enable-multibyte ${disable_nls}
+	./configure --prefix=/usr --enable-multibyte \
+	${disable_nls} &&
+make
 
-# Then compile and install Vim.
+# Then install Vim.
 
-make &&
 make install &&
 ln -s vim /usr/bin/vi
 

Modified: trunk/text/chapter06/36-bash.txt
===================================================================
--- trunk/text/chapter06/36-bash.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/36-bash.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -8,59 +8,15 @@
 
 patch -Np1 -i ../bash-3.0-fixes-3.patch
 
-# We have a few options on how to install Bash. Bash is needed to preform
-# any kind of maintenance, it is also used for most login shells.
-# Option A: We install a statically linked Bash used for booting and for
-# Root's login, and install a dynamically linked Bash for users. This way
-# we can get the best of both worlds.
-# Option B: We can just install a statically linked Bash and everyone
-# uses it normally.
-# Option C: We can just install a dynamically linked Bash and use it
-# normally.
-# Don't forget to go to the bottom of this page to rerun the new Bash.
+# Configure and make Bash. Bash suggests adding the --enable-static-link
+# option when using Bash as a root shell because it is more dependable
+# in an emergancy, most people don't.
 
-# First option A: Build and install both static and shared versions of Bash.
-# We will install /bin/bash-static with /bin/sh symlinked to it, and
-# /bin/bash-shared with /bin/bash symlinked to it. Instruct your users to
-# adjust scripts to use /bin/bash instead of /bin/sh if they can. All
-# boot scripts should use /bin/sh. Use /bin/bash for user login shells
-# with useradd.
-
-./configure --prefix=/usr --bindir=/bin --enable-static-link \
-	--without-bash-malloc --with-installed-readline ${disable_nls} &&
-make
-
-# If you want to run the test suite do that here. All tests should pass.
-
-make tests
-
-# Then install the static Bash, clean and rebuild the shared Bash.
-
-make install &&
-make distclean &&
-mv /bin/bash /bin/bash-static &&
-ln -sf bash-static /bin/sh &&
 ./configure --prefix=/usr --bindir=/bin \
 	--without-bash-malloc --with-installed-readline \
 	${disable_nls} &&
 make
 
-# You may also want to run the tests on this Bash. All tests should pass.
-
-make tests
-
-# Then install the shared Bash.
-
-install bash /bin/bash-shared &&
-ln -sf bash-shared /bin/bash
-
-# Skip this if you preformed option A.
-# Option B: Build and install a static version of Bash.
-
-./configure --prefix=/usr --bindir=/bin --enable-static-link \
-    --without-bash-malloc --with-installed-readline ${disable_nls} &&
-make
-
 # Run the test suite if you like. All tests should pass.
 
 make tests
@@ -69,21 +25,6 @@
 
 make install
 
-# Skip this if you preformed option A or B.
-# Option C: Build and install a shared version of Bash.
-
-./configure --prefix=/usr --bindir=/bin \
-    --without-bash-malloc --with-installed-readline ${disable_nls} &&
-make
-
-# Run the test suite if you like. All tests should pass.
-
-make tests
-
-# Then install Bash.
-
-make install
-
 # Preform this regardless of which option you installed.
 # Then run the new Bash in your current login.
 

Modified: trunk/text/chapter06/43-grep.txt
===================================================================
--- trunk/text/chapter06/43-grep.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/43-grep.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -1,19 +1,9 @@
 - Chapter 6 - Installing Grep 2.5.1a
 
-# Grep is used during booting, mainly for the mount and cleanfs scripts.
-# If you would like to link Grep statically use this command.
+# Configure and make Grep.
 
-env LDFLAGS=-static \
-	./configure --prefix=/usr --bindir=/bin \
-	--with-included-regex ${disable_nls}
-
-# If you prefer to link Grep dynamically use this command.
-
 ./configure --prefix=/usr --bindir=/bin \
-	--with-included-regex ${disable_nls}
-
-# Then compile Grep.
-
+	--with-included-regex ${disable_nls} &&
 make
 
 # Run the test suite if you like. All the tests should pass.

Modified: trunk/text/chapter06/44-grub.txt
===================================================================
--- trunk/text/chapter06/44-grub.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/44-grub.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -1,8 +1,7 @@
 - Chapter 6 - Installing Grub 0.95
 
-# Grub can not be built as a position independent executable. It is
-# statically linked instead. Grub can not be built with the stack guard
-# either.
+# Grub can not be built as a position independent executable, or with
+# stack protection.
 
 env CC="gcc -fno-stack-protector -no-pie" \
 ./configure --prefix=/usr ${disable_nls} &&

Modified: trunk/text/chapter06/58-udev.txt
===================================================================
--- trunk/text/chapter06/58-udev.txt	2005-01-12 20:46:23 UTC (rev 89)
+++ trunk/text/chapter06/58-udev.txt	2005-01-12 22:36:35 UTC (rev 90)
@@ -1,12 +1,7 @@
 - Chapter 6 - Installing Udev 050
 
-# Udev is used to populate /dev. If you would like to link Udev statically
-# use the following command.
+# Build Udev.
 
-make udevdir=/dev LDFLAGS=-static
-
-# If you would like to link Udev dynamically use this command.
-
 make udevdir=/dev
 
 # Then install Udev.




More information about the hlfs-dev mailing list