From 6f85ff6a418918bfa72748ca07f88c66725e4826 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 1 Nov 2022 16:17:24 +0100 Subject: [PATCH] More notes on rust --- rust/build_rust.sh | 4 ++++ rust/install_gentoo.txt | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 rust/install_gentoo.txt diff --git a/rust/build_rust.sh b/rust/build_rust.sh index f96abf8..33ba9b5 100755 --- a/rust/build_rust.sh +++ b/rust/build_rust.sh @@ -20,6 +20,7 @@ cd "rustc-$version_rustc-src" --local-rust-root="$PWD/../install-rustc-$version_rustc_bootstrap" \ --llvm-root="$PWD/../install-llvm-$version_llvm" \ --enable-vendor +# --enable-llvm-link-shared case "$version_rustc" in 1.3[0-9].*|1.4[0-6].*) @@ -28,6 +29,9 @@ case "$version_rustc" in paths='library/std src/librustc cargo' ;; esac +# ./x.py install --stage 1 compiler/rustc library/std +# ./x.py install --stage 0 cargo + # Build and install mkdir -p "$dir_install" ./x.py install $MAKEFLAGS --stage 2 $paths diff --git a/rust/install_gentoo.txt b/rust/install_gentoo.txt new file mode 100644 index 0000000..d515e1b --- /dev/null +++ b/rust/install_gentoo.txt @@ -0,0 +1,10 @@ +Install to /usr/lib/rust/ + +ver= +cp /usr/lib/rust/$ver/bin/{rustc,rustc-$ver} +ln -s /usr/lib/rust/$ver/bin/rustc-$ver /usr/bin/rustc-$ver +touch /etc/env.d/rust/provider-rust-$ver +emerge -1 app-eselect/eselect-rust +eselect rust set rust-$ver +emerge -O1 dev-lang/rust +(might need to set CC=clang and CXX=clang++ for initial build...)