From: Mark H Weaver <mhw@netris.org>
To: guix-devel@gnu.org
Subject: MIPS bootstrap problem in core-updates
Date: Mon, 08 Jun 2015 00:31:54 -0400 [thread overview]
Message-ID: <87zj4ahlc5.fsf@netris.org> (raw)
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---
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0$ env -i bash
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0$ source environment-variables
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ cd /tmp/nix-build-glibc-intermediate-2.21.drv-0/build
mhw@librenote:/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'
mhw@librenote:/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'
mhw@librenote:/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
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ type as
as is /gnu/store/g48d71zxfb7w7iskz35hijyxsxmly0m5-binutils-bootstrap-0/bin/as
mhw@librenote:/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
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ mkdir tmp-bin
mhw@librenote:/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
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ PATH=$(pwd)/tmp-bin:$PATH
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$ mips64el-guix-linux-gnu-gcc -c conftest.c
mhw@librenote:/tmp/nix-build-glibc-intermediate-2.21.drv-0/build$
--8<---------------cut here---------------end--------------->8---
next reply other threads:[~2015-06-08 4:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 4:31 Mark H Weaver [this message]
2015-06-08 14:01 ` MIPS bootstrap problem in core-updates Ludovic Courtès
2015-06-08 17:52 ` Mark H Weaver
2015-06-08 22:13 ` Mark H Weaver
2015-06-09 15:52 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zj4ahlc5.fsf@netris.org \
--to=mhw@netris.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.