Author: robert
Date: 2010-02-18 15:52:38 -0700 (Thu, 18 Feb 2010)
New Revision: 1542

Added:
   branches/Onward/temporary_system/gmp.txt
   branches/Onward/temporary_system/mpfr.txt
Modified:
   branches/Onward/temporary_system/gcc_pass1.txt
   branches/Onward/temporary_system/gcc_pass2.txt
   branches/Onward/temporary_system/index.txt
Log:
Added GMP and MPFR before GCC pass 2. Coreutils uses the the GMP library.

Modified: branches/Onward/temporary_system/gcc_pass1.txt
===================================================================
--- branches/Onward/temporary_system/gcc_pass1.txt      2010-02-17 20:52:36 UTC 
(rev 1541)
+++ branches/Onward/temporary_system/gcc_pass1.txt      2010-02-18 22:52:38 UTC 
(rev 1542)
@@ -51,12 +51,14 @@
 mkdir -v obj/ &&
 cd obj/ &&
 ../configure --prefix=/tools --with-local-prefix=/tools \
-       --libexecdir=/tools/lib --enable-shared --enable-languages=c \
+       --libexecdir=/tools/lib --enable-shared --enable-languages=c,c++ \
        --disable-nls --disable-multilib --disable-libssp --disable-libgomp \
        --disable-libmudflap --disable-decimal-float \
        --without-cloog --without-ppl \
        --infodir=$(pwd)/DESTDIR --mandir=$(pwd)/DESTDIR &&
 
+# c++ is added for GMP.
+
 # --disable-libssp prevents GCC from building the independent SSP library.
 # Everything in this library is included in Glibc, and so we do not need it.
 

Modified: branches/Onward/temporary_system/gcc_pass2.txt
===================================================================
--- branches/Onward/temporary_system/gcc_pass2.txt      2010-02-17 20:52:36 UTC 
(rev 1541)
+++ branches/Onward/temporary_system/gcc_pass2.txt      2010-02-18 22:52:38 UTC 
(rev 1542)
@@ -1,18 +1,5 @@
 # Temporary tools - GCC Pass 2
 
-# Unpack GMP and MPFR:
-
-tar -jxf ../gmp-5.0.1.tar.bz2 &&
-ln -vs gmp-5.0.1 gmp &&
-tar -jxf ../mpfr-2.4.2.tar.bz2 &&
-ln -vs mpfr-2.4.2 mpfr &&
-
-# Patch MPFR with upstream fixes:
-
-cd mpfr-2.4.2/ &&
-patch -p1 -i ../../mpfr-2.4.2-branch_update.diff &&
-cd ../ &&
-
 # Modify the source so the unwanted fixincludes script does not get used:
 
 cp -v gcc/Makefile.in{,.orig} &&

Added: branches/Onward/temporary_system/gmp.txt
===================================================================
--- branches/Onward/temporary_system/gmp.txt                            (rev 0)
+++ branches/Onward/temporary_system/gmp.txt    2010-02-18 22:52:38 UTC (rev 
1542)
@@ -0,0 +1,24 @@
+# Temporary tools - GMP
+
+# Configure GMP:
+
+mkdir -v obj/ &&
+cd obj/ &&
+env CC="gcc -fstack-protector-all" \
+       CPPFLAGS="-fexceptions -D_FORTIFY_SOURCE=2" \
+       LDFLAGS="-Wl,-z,relro -Wl,-z,now" \
+       ../configure --prefix=/tools --enable-cxx &&
+
+# Hardening options are added here because GCC is not adding them by default
+# yet. -fstack-protector-all is added to $CC and $CXX so it does not affect
+# GMP's prefered CFLAGS.
+
+# -fexceptions is added to prevent memory exaustion errors. See:
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552959
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555817
+
+# Build and install GMP:
+
+make &&
+make install
+

Modified: branches/Onward/temporary_system/index.txt
===================================================================
--- branches/Onward/temporary_system/index.txt  2010-02-17 20:52:36 UTC (rev 
1541)
+++ branches/Onward/temporary_system/index.txt  2010-02-18 22:52:38 UTC (rev 
1542)
@@ -1,11 +1,13 @@
-binutils_pass1.txt # Binutils - Pass 1
-gcc_pass1.txt #GCC - Pass 1
-linux-headers.txt # Linux API Headers
-glibc.txt # Glibc
-adjusting.txt # Adjusting the Toolchain
-gcc_pass2.txt # GCC - Pass 2
+binutils_pass1.txt
+gcc_pass1.txt
+linux-headers.txt
+glibc.txt
+adjusting.txt
+gmp.txt
+mpfr.txt
+gcc_pass2.txt
 zlib.txt
-binutils_pass2.txt # Binutils - Pass 2
+binutils_pass2.txt
 ncurses.txt
 bash.txt
 bison.txt

Added: branches/Onward/temporary_system/mpfr.txt
===================================================================
--- branches/Onward/temporary_system/mpfr.txt                           (rev 0)
+++ branches/Onward/temporary_system/mpfr.txt   2010-02-18 22:52:38 UTC (rev 
1542)
@@ -0,0 +1,19 @@
+# Temporary tools - MPFR
+
+# Patch MPFR with upstream fixes:
+
+patch -p1 -i ../mpfr-2.4.2-branch_update.diff &&
+
+# Configure and build MPFR:
+
+mkdir -v obj/ &&
+cd obj/ &&
+env CC="gcc -fstack-protector-all" CPPFLAGS="-D_FORTIFY_SOURCE=2"  \
+       LDFLAGS="-Wl,-z,relro -Wl,-z,now" \
+       ../configure --prefix=/tools --enable-thread-safe &&
+make &&
+
+# Install MPFR:
+
+make install
+

-- 
http://linuxfromscratch.org/mailman/listinfo/hlfs-book
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to