r143 - in trunk/text: chapter03 chapter06

robert at linuxfromscratch.org robert at linuxfromscratch.org
Fri Feb 4 00:08:46 PST 2005


Author: robert
Date: 2005-02-04 01:08:45 -0700 (Fri, 04 Feb 2005)
New Revision: 143

Modified:
   trunk/text/chapter03/patches.txt
   trunk/text/chapter06/33-texinfo.txt
   trunk/text/chapter06/36-bash.txt
   trunk/text/chapter06/37-file.txt
   trunk/text/chapter06/38-libtool.txt
   trunk/text/chapter06/39-bzip2.txt
   trunk/text/chapter06/40-diffutils.txt
   trunk/text/chapter06/41-kbd.txt
   trunk/text/chapter06/42-e2fsprogs.txt
   trunk/text/chapter06/43-grep.txt
Log:
More fpie flags additions

Modified: trunk/text/chapter03/patches.txt
===================================================================
--- trunk/text/chapter03/patches.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter03/patches.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -4,9 +4,12 @@
 http://www.linuxfromscratch.org/patches/downloads/hlfs/binutils-2.15.94.0.2-pt_pax-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/binutils-2.15.94.0.2-uClibc_conf-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/blfs-bootscripts-hlfs-2.patch
+http://www.linuxfromscratch.org/patches/downloads/hlfs/bzip2-1.0.2-hardened_cflags-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/coreutils-5.2.1-suppress_uptime_kill_su-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/expect-5.42.1-spawn-1.patch
+http://www.linuxfromscratch.org/patches/downloads/hlfs/file-4.12-hardened_cflags-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/flex-2.5.31-debian_fixes-2.patch
+http://www.linuxfromscratch.org/patches/downloads/hlfs/flex-2.5.31-hardened_cflags-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/gcc-3.4.3-hardened_cflags-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/gcc-3.4.3-linkonce-1.patch
 http://www.linuxfromscratch.org/patches/downloads/hlfs/gcc-3.4.3-no_fixincludes-1.patch

Modified: trunk/text/chapter06/33-texinfo.txt
===================================================================
--- trunk/text/chapter06/33-texinfo.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/33-texinfo.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,6 +1,6 @@
 - Chapter 6 - Texinfo 4.8
 
-env CC="gcc -pie -fPIE" \
+sed -e 's/^CFLAGS .*$/& -pie -fpie/' -i {info,makeinfo,util}/Makefile.in &&
 ./configure --prefix=/usr ${disable_nls} &&
 make
 
@@ -10,6 +10,9 @@
 
 # Then install Texinfo.
 
-make install &&
+make install
+
+# This is for the TeX typesetting package.
+
 make TEXMF=/usr/share/texmf install-tex
 

Modified: trunk/text/chapter06/36-bash.txt
===================================================================
--- trunk/text/chapter06/36-bash.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/36-bash.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -8,10 +8,10 @@
 
 patch -Np1 -i ../bash-3.0-fixes-3.patch
 
-# 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.
+# Then configure and make Bash. This sed changes both CFLAGS and
+# CFLAGS_FOR_BUILD.
 
+sed -e 's/^CFLAGS.*$/& -pie -fpie/' -i {.,builtins}/Makefile.in &&
 ./configure --prefix=/usr --bindir=/bin \
 	--without-bash-malloc --with-installed-readline \
 	${disable_nls} &&
@@ -25,7 +25,6 @@
 
 make install
 
-# Preform this regardless of which option you installed.
 # Then run the new Bash in your current login.
 
 exec /bin/bash --login +h

Modified: trunk/text/chapter06/37-file.txt
===================================================================
--- trunk/text/chapter06/37-file.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/37-file.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,5 +1,6 @@
 - Chapter 6 - Installing File 4.12
 
+patch -Np1 -i ../file-4.12-hardened_cflags-1.patch &&
 ./configure --prefix=/usr ${disable_nls} \
 	--disable-static &&
 make &&

Modified: trunk/text/chapter06/38-libtool.txt
===================================================================
--- trunk/text/chapter06/38-libtool.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/38-libtool.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,5 +1,8 @@
 - Chapter 6 - Installing Libtool 1.5.10
 
+# The only C code in this package is for a library. Libtool is a shell script.
+# So -fpie is not needed here.
+
 ./configure --prefix=/usr ${disable_nls} \
 	--disable-static &&
 make

Modified: trunk/text/chapter06/39-bzip2.txt
===================================================================
--- trunk/text/chapter06/39-bzip2.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/39-bzip2.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,8 +1,9 @@
 - Chapter 6 - Installing Bzip2 1.0.2
 
+patch -Np1 -i ../bzip2-1.0.2-hardened_cflags-1.patch &&
 make -f Makefile-libbz2_so &&
 make clean &&
-make CC="gcc -pie -fPIE" &&
+make &&
 make install &&
 install bzip2-shared /bin/bzip2 &&
 cp -a libbz2.so* /lib &&

Modified: trunk/text/chapter06/40-diffutils.txt
===================================================================
--- trunk/text/chapter06/40-diffutils.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/40-diffutils.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,5 +1,6 @@
 - Chapter 6 - Installing Diffutils 2.8.1
 
+sed -e 's/^CFLAGS .*$/& -pie -fpie/' -i src/Makefile.in &&
 ./configure --prefix=/usr ${disable_nls} &&
 make &&
 make install

Modified: trunk/text/chapter06/41-kbd.txt
===================================================================
--- trunk/text/chapter06/41-kbd.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/41-kbd.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -1,6 +1,7 @@
 - Chapter 6 - Installing Kbd 1.12
 
+sed -e 's/^CFLAGS.*$/& -pie -fpie/' -i openvt/Makefile src/Makefile.in &&
 ./configure &&
-make CC="gcc -pie -fPIE" &&
+make &&
 make install
 

Modified: trunk/text/chapter06/42-e2fsprogs.txt
===================================================================
--- trunk/text/chapter06/42-e2fsprogs.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/42-e2fsprogs.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -3,6 +3,8 @@
 # --with-gnu-ld is added because the configure script seems to think
 # we are not using GNU ld. Its only a cosmetic issue.
 
+find resize/ debugfs/ e2fsck/ misc/ -type f -name Makefile.in \
+	| xargs sed -e 's@\$(ALL_CFLAGS)@& -pie -fpie at g' -i &&
 mkdir build &&
 cd build &&
 ../configure --prefix=/usr --with-root-prefix="" \

Modified: trunk/text/chapter06/43-grep.txt
===================================================================
--- trunk/text/chapter06/43-grep.txt	2005-02-03 18:17:57 UTC (rev 142)
+++ trunk/text/chapter06/43-grep.txt	2005-02-04 08:08:45 UTC (rev 143)
@@ -2,6 +2,7 @@
 
 # Configure and make Grep.
 
+sed -e 's/^CFLAGS .*$/& -pie -fpie/' -i src/Makefile.in &&
 ./configure --prefix=/usr --bindir=/bin \
 	--with-included-regex ${disable_nls} &&
 make




More information about the hlfs-dev mailing list