guix-devel
[Top][All Lists]
Advanced

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

MIPS bootstrap problem in core-updates


From: Mark H Weaver
Subject: MIPS bootstrap problem in core-updates
Date: Mon, 08 Jun 2015 00:31:54 -0400

In core-updates, 'glibc-final-with-bootstrap-bash' fails to build on
MIPS, because 'gcc-boot0' doesn't work.  The problem is that we've
switched to gcc-4.9, which on MIPS now emits a new ".nan" assembler
directive which is not understood by the assembler in binutils-2.23.2,
the version in our binutils-bootstrap-0.

The assembler in binutils-2.25 understands ".nan", and that version of
binutils is an input to 'glibc-final-with-bootstrap-bash' (via
%boot1-inputs), so one might expect this to work.  There's just one
problem: the assembler in 'binutils-boot0' is named
'mips64el-guix-linux-gnu-as', but the compiler in 'gcc-boot0' runs 'as'.

Historically, we've worked around this by including the bootstrap
binutils in %boot1-inputs:

(define %boot1-inputs
  ;; 2nd stage inputs.
  `(("gcc" ,gcc-boot0)
    ("binutils-cross" ,binutils-boot0)

    ;; Keep "binutils" here because the cross-gcc invokes `as', not the
    ;; cross-`as'.
    ,@%boot0-inputs))

The first solution that comes to mind is to remove this workaround, and
configure 'gcc-boot0' to use 'mips64el-guix-linux-gnu-as' instead of
'as' as its assembler.  This seems doable since 'binutils-boot0' is an
input to 'gcc-boot0'.

Alternatively, we could make a little 'wrapper' package that makes an
'as' symlink that points to 'mips64el-guix-linux-gnu-as', and then add
it to %boot1-inputs (instead of %boot0-inputs).

Ludovic, how do you think we should fix this?
Feel free to just do it :)

See below for an excerpted transcript of my investigation.

     Thanks,
       Mark


--8<---------------cut here---------------start------------->8---
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0$ env -i bash
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0$ source 
environment-variables 
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ cd 
/tmp/nix-build-glibc-intermediate-2.21.drv-0/build
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ 
mips64el-guix-linux-gnu-gcc -c   conftest.c
/tmp/nix-build-glibc-intermediate-2.21.drv-0/cc7dcByb.s: Assembler messages:
/tmp/nix-build-glibc-intermediate-2.21.drv-0/cc7dcByb.s:4: Error: unknown 
pseudo-op: `.nan'
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ 
mips64el-guix-linux-gnu-gcc -v -c   conftest.c
Using built-in specs.
COLLECT_GCC=mips64el-guix-linux-gnu-gcc
Target: mips64el-guix-linux-gnu
Configured with: 
Thread model: single
gcc version 4.9.2 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-mllsc' '-mno-shared' '-EL' '-mabi=n32'
 
/gnu/store/qj7hbr1lnxw540vqi1vc07npy5dgli3w-gcc-cross-boot0-4.9.2/libexec/gcc/mips64el-guix-linux-gnu/4.9.2/cc1
 -quiet -v conftest.c -mel -quiet -dumpbase conftest.c -mllsc -mno-shared 
-mabi=n32 -auxbase conftest -version -o 
/tmp/nix-build-glibc-intermediate-2.21.drv-0/ccDIBdKd.s
GNU C (GCC) version 4.9.2 (mips64el-guix-linux-gnu)
        compiled by GNU C version 4.8.2, GMP version 6.0.0, MPFR version 3.1.2, 
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory 
"/gnu/store/h7ilhyrmbm1k73dp9d4rcv4hxgac36by-gcc-cross-boot0-4.9.2-lib/lib/gcc/mips64el-guix-linux-gnu/4.9.2/../../../../../../../mips64el-guix-linux-gnu/sys-include"
ignoring nonexistent directory 
"/gnu/store/h7ilhyrmbm1k73dp9d4rcv4hxgac36by-gcc-cross-boot0-4.9.2-lib/lib/gcc/mips64el-guix-linux-gnu/4.9.2/../../../../../../../mips64el-guix-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 
/gnu/store/h7ilhyrmbm1k73dp9d4rcv4hxgac36by-gcc-cross-boot0-4.9.2-lib/lib/gcc/mips64el-guix-linux-gnu/4.9.2/include
 
/gnu/store/h7ilhyrmbm1k73dp9d4rcv4hxgac36by-gcc-cross-boot0-4.9.2-lib/lib/gcc/mips64el-guix-linux-gnu/4.9.2/include-fixed
End of search list.
GNU C (GCC) version 4.9.2 (mips64el-guix-linux-gnu)
        compiled by GNU C version 4.8.2, GMP version 6.0.0, MPFR version 3.1.2, 
MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: dea46b113a5433c6a02c028045bcda23
COLLECT_GCC_OPTIONS='-v' '-c' '-mllsc' '-mno-shared' '-EL' '-mabi=n32'
 as -v -EL -O1 -no-mdebug -mabi=n32 -mno-shared -KPIC -o conftest.o 
/tmp/nix-build-glibc-intermediate-2.21.drv-0/ccDIBdKd.s
GNU assembler version 2.23.2 (mips64el-unknown-linux-gnu) using BFD version 
(GNU Binutils) 2.23.2
/tmp/nix-build-glibc-intermediate-2.21.drv-0/ccDIBdKd.s: Assembler messages:
/tmp/nix-build-glibc-intermediate-2.21.drv-0/ccDIBdKd.s:4: Error: unknown 
pseudo-op: `.nan'
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ echo $PATH
/gnu/store/hb0j1ga45cd3vwnb1swyvv1gbaqsjika-texinfo-5.2/bin:/gnu/store/nmkffi8pjcf5aqimsv633qjbwl3pai4m-perl-5.16.1/bin:/gnu/store/qj7hbr1lnxw540vqi1vc07npy5dgli3w-gcc-cross-boot0-4.9.2/bin:/gnu/store/gnznbcg2cnwlmdi0mdj7ix8vfyl3i563-binutils-cross-boot0-2.25/bin:/gnu/store/cx944g8rh4gx2ar3nivk3i8imfcxqfgb-make-boot0-4.1/bin:/gnu/store/qhc2xv9n7gvsa3q38dmi6yvi987s70ys-diffutils-3.3/bin:/gnu/store/vbchmyzy7cylrzyfff04aixkss9a1hh8-findutils-4.4.2/bin:/gnu/store/zkxpl3ak7amfzz9473zkfp6wifp8v2a6-file-5.22/bin:/gnu/store/xn4c8dsj4cxrhk09nznv2xwvjj7f2rxy-gcc-bootstrap-0/bin:/gnu/store/g48d71zxfb7w7iskz35hijyxsxmly0m5-binutils-bootstrap-0/bin:/gnu/store/knz4nib6zrq1wy4bnqw55x6bln3nvqra-bootstrap-binaries-0/bin
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ type as
as is /gnu/store/g48d71zxfb7w7iskz35hijyxsxmly0m5-binutils-bootstrap-0/bin/as
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ ls 
/gnu/store/gnznbcg2cnwlmdi0mdj7ix8vfyl3i563-binutils-cross-boot0-2.25/bin
mips64el-guix-linux-gnu-addr2line  mips64el-guix-linux-gnu-nm
mips64el-guix-linux-gnu-ar         mips64el-guix-linux-gnu-objcopy
mips64el-guix-linux-gnu-as         mips64el-guix-linux-gnu-objdump
mips64el-guix-linux-gnu-c++filt    mips64el-guix-linux-gnu-ranlib
mips64el-guix-linux-gnu-elfedit    mips64el-guix-linux-gnu-readelf
mips64el-guix-linux-gnu-gprof      mips64el-guix-linux-gnu-size
mips64el-guix-linux-gnu-ld         mips64el-guix-linux-gnu-strings
mips64el-guix-linux-gnu-ld.bfd     mips64el-guix-linux-gnu-strip
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ mkdir tmp-bin
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ ln -s 
/gnu/store/gnznbcg2cnwlmdi0mdj7ix8vfyl3i563-binutils-cross-boot0-2.25/bin/mips64el-guix-linux-gnu-as
 tmp-bin/as
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ 
PATH=$(pwd)/tmp-bin:$PATH
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ 
mips64el-guix-linux-gnu-gcc -c   conftest.c
address@hidden:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$
--8<---------------cut here---------------end--------------->8---



reply via email to

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