guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with natively-built armhf bootstrap compiler


From: Mark H Weaver
Subject: Problem with natively-built armhf bootstrap compiler
Date: Thu, 01 Jan 2015 13:53:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I was able to natively build bootstrap tarballs on the Novena.  However,
the compiler in these new bootstrap tarballs is broken.  The problem is
that the new compiler driver (gcc) passes -lgcc_s when linking, but
libgcc_s.so does not exist in the gcc bootstrap tarball.

It seems that libgcc_s.so does not exist in any of our bootstrap
tarballs, so I guess that's intentional.  However, for some reason this
new bootstrap gcc is trying to link to it.

I've done a careful comparison of the output of "gcc -v bare-test.c"
between the old (cross-compiled) and new (native-compiled) bootstrap
tarballs.  bare-test.c contains only an empty main() function.  These
tests are run outside of the guix-daemon but using only the environment
variables set in the 'make-boot0' build.  Here are the non-trivial
differences:

* The GNU triplet is different.  The old (working) cross-compiled ones
  use "arm-linux-gnueabihf", but the new (broken) ones use
  "armv7l-unknown-linux-gnueabihf", the result of 'config.guess'.

* The LIBRARY_PATHs printed by "gcc -v" before running 'collect2' are
  different.  The old (working) cross-compiled one includes
  ":/lib/:/usr/lib/" at the end, whereas the new (broken) one includes
  only directories from /gnu/store.

* There are several differences in the call to 'collect2':

   * The old (working) cross-compiled one passes "-dynamic-linker
     /lib/ld-linux-armhf.so.3" early in the command line, whereas the
     new (broken) one passes "-dynamic-linker
     
/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.20/lib/ld-linux-armhf.so.3".

     However, both of them pass a second -dynamic-linker argument that
     points to /gnu/store/*-glibc-bootstrap-0//lib/ld-linux-armhf.so.3
     which seems to be correct.

   * The new (broken) one passes the following extra flags to 'collect2':
     "-L/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.20/lib
     -rpath=/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.20/lib
     -rpath=/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-static-4.8.4/lib64
     -rpath=/gnu/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-static-4.8.4/lib
     -lgcc_s"

Obviously, that last -lgcc_s is what's causing problems here.
Any idea what's causing this, or how to fix it?

      Mark



reply via email to

[Prev in Thread] Current Thread [Next in Thread]