From 516b668fa04586bca9bbca6ee131f9f8299d6fc4 Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Sun, 13 Mar 2005 15:49:41 +0000 Subject: * Fix bug 1061 by dynamically linking the pass1 toolchain git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@4741 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/binutils-pass1.xml | 36 ++++++------------------------------ chapter05/gcc-pass1.xml | 21 ++++++--------------- chapter05/toolchaintechnotes.xml | 7 +++++-- 3 files changed, 17 insertions(+), 47 deletions(-) (limited to 'chapter05') diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml index 9f35ae722..e2eafc63e 100644 --- a/chapter05/binutils-pass1.xml +++ b/chapter05/binutils-pass1.xml @@ -54,8 +54,7 @@ command like this: time { ./configure ... && ... Now prepare Binutils for compilation: -../binutils-&binutils-version;/configure --prefix=/tools \ - --disable-nls +../binutils-&binutils-version;/configure --prefix=/tools --disable-nls The meaning of the configure options: @@ -68,36 +67,14 @@ programs in the /tools directory.< --disable-nls -This disables internationalization. This is not needed -for the static programs, and NLS can cause problems when linking -statically. +This disables internationalization. This is not needed for the +temporary tools. Continue with compiling the package: -make configure-host -make LDFLAGS="-all-static" - -The meaning of the make parameters: - - - -configure-host -This forces all subdirectories to be configured -immediately. A statically-linked build will fail without it. Use this -option to work around the problem. - - - -LDFLAGS="-all-static" -This tells the linker that all Binutils programs -should be linked statically. However, strictly speaking, -"-all-static" is passed to the -libtool program, which then passes -"-static" to the linker. - - +make Compilation is now complete. Ordinarily we would now run the test suite, but at this early stage the test suite framework (Tcl, @@ -113,7 +90,7 @@ first pass will soon be replaced by those from the second. later on: make -C ld clean -make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib +make -C ld LIB_PATH=/tools/lib The meaning of the make parameters: @@ -126,8 +103,7 @@ subdirectory. --C ld LDFLAGS="-all-static" -LIB_PATH=/tools/lib +-C ld LIB_PATH=/tools/lib This option rebuilds everything in the ld subdirectory. Specifying the LIB_PATH Makefile variable on the command diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 503438558..f2bec515b 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -63,16 +63,12 @@ system. --enable-shared -This switch may seem counter-intuitive at first. -However, this switch allows the building of +This switch allows the building of libgcc_s.so.1 and -libgcc_eh.a, and having -libgcc_eh.a available ensures that the configure -script for Glibc (the next package we compile) produces the proper -results. Note that the GCC binaries will still be linked statically -because this is controlled by the -static value of -the BOOT_LDFLAGS variable in the next -step. +libgcc_eh.a. Having +libgcc_eh.a available ensures that the +configure script for Glibc (the next package we compile) produces the proper +results. @@ -86,16 +82,11 @@ tarball. Continue with compiling the package: -make BOOT_LDFLAGS="-static" bootstrap +make bootstrap The meaning of the make parameters: - -BOOT_LDFLAGS="-static" -This tells GCC to link its programs statically. - - bootstrap This target does not just compile GCC, but compiles it diff --git a/chapter05/toolchaintechnotes.xml b/chapter05/toolchaintechnotes.xml index 9c2951387..9a065a054 100644 --- a/chapter05/toolchaintechnotes.xml +++ b/chapter05/toolchaintechnotes.xml @@ -175,7 +175,10 @@ class="directory">/usr, perform a quick changeover of the toolchain defaults, then proceed in building the rest of the target LFS system. - + + + -- cgit v1.2.3-54-g00ecf