~ruther/guix-local

01d45404f69025c757c1800e8b64fdd29a8134a6 — Ludovic Courtès 13 years ago ec4d308
distro: Configure ld and GCC to not look under /usr & co.

This fixes impurities with non-chroot builds on LFS-style distros.

* distro/packages/base.scm (binutils): Pass `--with-lib-path'.
  (gcc-4.7): Pass `--with-local-prefix'.
* distro/packages/make-bootstrap.scm (%binutils-static): Pass
  `--with-lib-path'.
2 files changed, 9 insertions(+), 4 deletions(-)

M distro/packages/base.scm
M distro/packages/make-bootstrap.scm
M distro/packages/base.scm => distro/packages/base.scm +8 -3
@@ 320,10 320,12 @@ that it is possible to use Make to build and install the program.")
    `(("patch/new-dtags" ,(search-patch "binutils-ld-new-dtags.patch"))))
   (arguments
    `(#:patches (list (assoc-ref %build-inputs "patch/new-dtags"))
      #:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
                          ;; on GCC when bootstrapping.
                          "LDFLAGS=-static-libgcc"

      ;; Add `-static-libgcc' to not retain a dependency on GCC when
      ;; bootstrapping.
      #:configure-flags '("LDFLAGS=-static-libgcc")))
                          ;; Don't search under /usr/lib & co.
                          "--with-lib-path=/no-ld-lib-path")))

   (synopsis "GNU Binutils, tools for manipulating binaries (linker,
assembler, etc.)")


@@ 358,6 360,9 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
          `("--enable-plugin"
            "--enable-languages=c,c++"
            "--disable-multilib"

            "--with-local-prefix=/no-gcc-local-prefix"

            ,(let ((libc (assoc-ref %build-inputs "libc")))
               (if libc
                   (string-append "--with-native-system-header-dir=" libc

M distro/packages/make-bootstrap.scm => distro/packages/make-bootstrap.scm +1 -1
@@ 225,7 225,7 @@
  (package (inherit binutils)
    (name "binutils-static")
    (arguments
     `(#:configure-flags '("--disable-gold")
     `(#:configure-flags '("--disable-gold" "--with-lib-path=/no-ld-lib-path")
       #:strip-flags '("--strip-all")
       #:phases (alist-cons-before
                 'configure 'all-static