>> I think one needs to add the configure parameters "--with-arch=mips64 -- >> with-abi=64" to the cross build of gcc; and maybe "-march=mip64 -mabi=64" >> to the binutils and glibc. Ludovic should know best where to do it in the >> code. > I would add a keyword parameter to ‘cross-gcc’ to allow extra configure > flags to be passed, or perhaps just an abstract #:abi flag. I tried to add "--with-arch=mips64" "--with-abi=64" to '#:configure-flags' of 'cross-gcc'. It failed: /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/ld: /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_fpcmp_parts_tf.o): ABI is incompatible with that of the selected emulation /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/libexec/gcc/mips64el-linux-gnu/ld: failed to merge target specific data of file /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_fpcmp_parts_tf.o) [...] /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In function `_fpadd_parts': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:617:(.text+0x3a0): relocation truncated to fit: R_MIPS_GOT_DISP against `__thenan_tf' /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In function `__addtf3': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:744:(.text+0x3c4): relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:745:(.text+0x3e8): relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:747:(.text+0x3f8): relocation truncated to fit: R_MIPS_GOT_PAGE against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:747:(.text+0x404): relocation truncated to fit: R_MIPS_GOT_OFST against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:749:(.text+0x410): relocation truncated to fit: R_MIPS_CALL16 against `__pack_t' /nix/store/g9js73bwv1fl92h1nnf50vf1619irnxf-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2/lib/gcc/mips64el-linux-gnu/4.7.2/libgcc.a(_addsub_tf.o): In function `__subtf3': /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:764:(.text+0x454): relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:765:(.text+0x478): relocation truncated to fit: R_MIPS_CALL16 against `__unpack_t' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:769:(.text+0x488): relocation truncated to fit: R_MIPS_GOT_PAGE against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:769:(.text+0x49c): relocation truncated to fit: R_MIPS_GOT_OFST against `.text' /tmp/nix-build-gcc-cross-sans-libc-mips64el-linux-gnu-4.7.2.drv-0/build/mips64el-linux-gnu/libgcc/../../../gcc-4.7.2/libgcc/fp-bit.c:771:(.text+0x4ac): additional relocation overflows omitted from the output collect2: error: ld returned 1 exit status make[2]: *** [/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-0/build/libc.so] Error 1 make[2]: Leaving directory `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-0/glibc-2.17/elf' make[1]: *** [elf/subdir_lib] Error 2 make[1]: Leaving directory `/tmp/nix-build-glibc-cross-mips64el-linux-gnu-2.17.drv-0/glibc-2.17' make: *** [all] Error 2 phase `build' failed after 286 seconds builder for `/nix/store/jk6f01ribh66daq71b1rzyijm7jqb8w1-glibc-cross-mips64el-linux-gnu-2.17.drv' failed with exit code 1 @ build-failed /nix/store/jk6f01ribh66daq71b1rzyijm7jqb8w1-glibc-cross-mips64el-linux-gnu-2.17.drv /nix/store/74147nkjp39bpiqcpzvmj2gw6a216jzc-glibc-cross-mips64el-linux-gnu-2.17 1 builder for `/nix/store/jk6f01ribh66daq71b1rzyijm7jqb8w1-glibc-cross-mips64el-linux-gnu-2.17.drv' failed with exit code 1 cannot build derivation `/nix/store/68m2mhwasx65793bnnwl4kadckw2rh30-gcc-cross-mips64el-linux-gnu-4.7.2.drv': 1 dependencies couldn't be built error: build failed: build of `/nix/store/68m2mhwasx65793bnnwl4kadckw2rh30-gcc-cross-mips64el-linux-gnu-4.7.2.drv' failed I'd also wanted to add "-march=mips64 -mabi=64" to 'cross' but failed to do it properly.