Guide I am following:
https://doc.rust-lang.org/book/advanced-linking.html
$ make x86_64-unknown-linux-musl/rt/compiler-rt/absvdi2.o | |
cfg: version 1.12.0-dev (561c4e1dd 2016-08-09) | |
cfg: build triple x86_64-unknown-linux-gnu | |
cfg: host triples x86_64-unknown-linux-gnu | |
cfg: target triples x86_64-unknown-linux-gnu x86_64-unknown-linux-musl | |
cfg: non-build target triples x86_64-unknown-linux-musl | |
cfg: host for x86_64-unknown-linux-gnu is x86_64 | |
cfg: host for x86_64-unknown-linux-musl is x86_64 | |
cfg: os for x86_64-unknown-linux-gnu is unknown-linux-gnu | |
cfg: os for x86_64-unknown-linux-musl is unknown-linux-musl | |
cfg: have good valgrind for x86_64-unknown-linux-gnu | |
cfg: no good valgrind for x86_64-unknown-linux-musl | |
cfg: using CC=gcc (CFG_CC) | |
cfg: enabling valgrind run-pass tests (CFG_ENABLE_VALGRIND_RPASS) | |
cfg: valgrind-rpass command set to "/usr/bin/valgrind" --error-exitcode=100 --fair-sched=try --quiet --soname-synonyms=somalloc=NONE --suppressions=/home/lampam/build/musl/muslrust/src/etc/x86.supp --tool=memcheck --leak-check=full | |
compile: x86_64-unknown-linux-musl/rt/compiler-rt/absvdi2.o | |
as: unrecognized option '-mrelax-relocations=no' | |
make: *** [x86_64-unknown-linux-musl/rt/compiler-rt/absvdi2.o] Error 1 |
# Note this isn't necessarily line-for-line what I did; | |
# I copied it from .bash_history, and it may be jumbled or incomplete | |
# due to working in multiple terminal windows. | |
# | |
# It's provided moreso on the basis of "well at least you can see what | |
# versions I downloaded" | |
mkdir musl && cd musl | |
mkdir distrib | |
PREFIX=$(pwd)/distrib | |
curl -O http://www.musl-libc.org/releases/musl-1.1.10.tar.gz | |
tar xf musl-1.1.10.tar.gz | |
cd musl-1.1.10/ | |
./configure --disable-shared --prefix=$PREFIX | |
make -j4 && make install | |
curl -O http://llvm.org/releases/3.7.0/llvm-3.7.0.src.tar.xz | |
tar xf llvm-3.7.0.src.tar.xz | |
cd llvm-3.7.0.src/projects/ | |
curl http://llvm.org/releases/3.7.0/libunwind-3.7.0.src.tar.xz | tar xJf - | |
mv libunwind-3.7.0.src libunwind | |
mkdir libunwind/build | |
cd libunwind/build | |
cmake -DLLVM_PATH=../../.. -DLIBUNWIND_ENABLE_SHARED=0 .. | |
cp lib/libunwind.a $PREFIX/lib/ | |
cd ../../../../ | |
git clone https://github.com/rust-lang/rust.git muslrust | |
cd muslrust | |
./configure --target=x86_64-unknown-linux-musl --musl-root=$PREFIX --prefix=$PREFIX | |
make -j2 2>&1 | grep -i error -C10 |
$ as --version | |
GNU assembler (GNU Binutils for Ubuntu) 2.24 | |
Copyright 2013 Free Software Foundation, Inc. | |
This program is free software; you may redistribute it under the terms of | |
the GNU General Public License version 3 or later. | |
This program has absolutely no warranty. | |
This assembler was configured for a target of `x86_64-linux-gnu'. | |
$ uname -a | |
Linux lampam-T430-ub3 3.13.0-66-generic #108-Ubuntu SMP Wed Oct 7 15:20:27 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux |