UmVirt LFS Package info
DB commit: 87572d7cf5c2e4fc6a7d33abc05341175a2c925a
APP commit: e905d50832f25d6e1ea1c062c557c2674e1072f0
mrustc
Mutabah's Rust Compiler is in-progress alternative rust compiler. Capable of building a fully-working copy of rustc, but not suitable for everyday use (due to terrible error messages).Package info
Template:
Codename: mrustc
Source file: mrustc-0.11.2.tar.gz
Source directory: mrustc-0.11.2
Package URL: https://umvirt.com/linux/downloads/0.2.4/packages/m/mrustc-0.11.2.tar.gz
Package md5-checksum URL: https://umvirt.com/linux/downloads/0.2.4/packages/m/mrustc-0.11.2.tar.gz.md5sum
Dependances: git.
Dependance of: *** NO PACKAGES FOUND ***
Patches: mrustc-minicargo.patch.
Addons: rustc-1.74.0-src.tar.gz.
Nestings *** NO NESTINGS FOUND ***
Configuration script:
#copy rustc source
cp -v ../rustc-1.74.0-src.tar.gz .
#speedup
sed "s/PARLEVEL ?= 1/PARLEVEL ?= `nproc`/" -i minicargo.mk
sed "s/LLVM_TARGETS ?= X86;ARM;AArch64#;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX/LLVM_TARGETS ?= X86/" -i minicargo.mk
sed "s/LLVM_TARGETS ?= X86;ARM;AArch64#;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX/LLVM_TARGETS ?= X86/" -i run_rustc/Makefile
sed "s/PARLEVEL ?= 1/PARLEVEL ?= `nproc`/" -i run_rustc/Makefile
#build std library
echo "LIBGIT2_SYS_USE_PKG_CONFIG=1 make -C run_rustc \$@" >> build-1.74.0.sh
Build script:
./build-1.74.0.sh
Install script:
#create directories
install -vdm755 /opt/mrustc
install -vdm755 /opt/mrustc/bin
install -vdm755 /opt/mrustc/lib
install -vdm755 /opt/mrustc/test
#install binaries
install -v -m555 output-1.74.0/rustc /opt/mrustc/bin/mrustc
install -v -m555 output-1.74.0/cargo /opt/mrustc/bin
#install libraries
install -v -m644 run_rustc/output-1.74.0/prefix/lib/rustlib/`uname -m`-unknown-linux-gnu/lib/*.rlib /opt/mrustc/lib
cat > /etc/profile.d/rustc.sh << "EOF"
# Begin /etc/profile.d/rustc.sh
pathprepend /opt/mrustc/bin PATH
RUSTFLAGS='-L /opt/mrustc/lib '
export RUSTFLAGS
# End /etc/profile.d/rustc.sh
EOF
cat > /opt/mrustc/bin/rustc << "EOF"
/opt/mrustc/bin/mrustc -L /opt/mrustc/lib $@
EOF
chmod -v 555 /opt/mrustc/bin/rustc
#test. executable file must built
pathprepend /opt/mrustc/bin PATH
cat > /opt/mrustc/test/hello.rs << "EOF"
fn main() {
println!("Rustc is works!");
}
EOF
cd /opt/mrustc/test/
rustc hello.rs
./hello