Index: cross-tools/alpha/glibc-headers.xml
===================================================================
--- cross-tools/alpha/glibc-headers.xml (revision f4ee56101618deb3af2599aa650057fc36c634e3)
+++ cross-tools/alpha/glibc-headers.xml (revision 16d0d7c50d2916ce30c3456d8522bcb1fac02553)
@@ -23,11 +23,11 @@
Installation of Glibc Headers
-
-
-
+ The following sed removes a dependency of gcc 3.4.x from
+ the glibc we are using in cross-lfs. The reason we are changing it is
+ because this only installs the headers, no compiling takes place. In the
+ next glibc chapter, we use the gcc that's build right after this chapter.
+
+cp configure{,.orig}
+sed -e 's/3.4/3.[0-9]/g' configure.orig > configure
-
-
-
-
-
+echo "libc_cv_forced_unwind=yes" > config.cache
+echo "libc_cv_c_cleanup=yes" >> config.cache
+echo "libc_cv_mlong_double_128=yes" >> config.cache
+echo "ibc_cv_alpha_tls=yes" >> config.cache
-
+CC=gcc ../glibc-&glibc-version;/configure --prefix=/tools \
+ --host=${LFS_TARGET} --build=${LFS_HOST} \
+ --disable-sanity-checks --enable-kernel=2.6.0 \
+ --with-headers=/tools/include --cache-file=config.cache \
+ --with-binutils=/cross-tools/${LFS_TARGET}/bin
-
+
+ Any error message you see about nptl at this point
+ can safely be ignored.
+
-
+
+ The meaning of the configure options:
+
+
+ CC=gcc
+
+ Tells GLIBC to use the hosts GCC compiler.
+
+
+
+
+ --prefix=/tools
+
+ This tells the configure script to prepare to install the
+ package in the /tools
+ directory.
+
+
+
+
+ --build=${LFS_HOST}
+
+ When used with --host, this creates a cross-architecture
+ executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).
+
+
+
+
+ --host=${LFS_TARGET}
+
+ When used with --build, this creates a cross-architecture
+ executable that creates files for ${LFS_TARGET} but runs on ${LFS_HOST).
+
+
+
+
+ --disable-sanity-checks
+
+ This switch disables any checks that are in place.
+
+
+
+
+ --enable-kernel=2.6.0
+
+ This tells Glibc to compile the library with support
+ for 2.6.x Linux kernels.
+
+
+
+
+ --with-headers=/tools/include
+
+ This tells Glibc to compile itself against the headers
+ recently installed to the /tools
+ directory, so that it knows exactly what features the kernel has
+ and can optimize itself accordingly.
+
+
+
+
+ --with-binutils=/cross-tools/${LFS_TARGET}/bin
+
+ This tells GLIBC to use the binutils for our specific target architecture.
+
+
+
+
+
+ Now, install the headers:
-
+make install-headers
-
+ Some files aren't installed by the above command, then
+ we will copy the header files we need:
-
+ First we will copy a common file over to /tools/include:
-
+install -d /tools/include/bits
+cp bits/stdio_lim.h /tools/include/bits
-
+ Now we will create a blank stub file:
-
+touch /tools/include/gnu/stubs.h
-
-
-
-
-
-
-
-
+ For NPTL we use the following command:
+
cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h /tools/include/bits/
Index: cross-tools/ppc64/glibc-headers.xml
===================================================================
--- cross-tools/ppc64/glibc-headers.xml (revision f4ee56101618deb3af2599aa650057fc36c634e3)
+++ cross-tools/ppc64/glibc-headers.xml (revision 16d0d7c50d2916ce30c3456d8522bcb1fac02553)
@@ -24,9 +24,9 @@
@@ -48,66 +48,50 @@
-
-
-
-
-
-
-
-
cp -v ../glibc-&glibc-version;/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h /tools/include/bits/