From c22340d56f9ab82434b50695c65add5dd9b871cb Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 12 Aug 2022 10:02:09 +0200 Subject: [PATCH 1/2] rustc: Add version 1.63.0-0 --- rustc-1.63.0-0.build.sh | 100 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100755 rustc-1.63.0-0.build.sh diff --git a/rustc-1.63.0-0.build.sh b/rustc-1.63.0-0.build.sh new file mode 100755 index 0000000..05d6c92 --- /dev/null +++ b/rustc-1.63.0-0.build.sh @@ -0,0 +1,100 @@ +#! /bin/bash + +PKG=rustc +VERSION=1.63.0 +BUILD=0 + +PREFIX=/pkg/$PKG-$VERSION-$BUILD +if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi + +set -xe +umask 022 + +BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp +test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR +mkdir -p $BUILD_TMPDIR/home +export TMPDIR=$BUILD_TMPDIR +export HOME=$BUILD_TMPDIR/home + +exec $PREFIX/profile <<-EOF + PATH=$PREFIX/bin:\$PATH + LD_LIBRARY_PATH=$PREFIX/lib:\$LD_LIBRARY_PATH + export PATH LD_LIBRARY_PATH + if [ -d /pkg/${PKG}-${VERSION}-${BUILD}/.compatlibs ]; then LD_LIBRARY_PATH=${PREFIX}/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi +EOF +. $PREFIX/profile + +export MAKEFLAGS="-j $(nproc)" + +BUILDDIR=$PREFIX/build + +mkdir -p $BUILDDIR +cd $BUILDDIR + +test -e $PKG-$VERSION-src.tar.gz || wget https://static.rust-lang.org/dist/$PKG-$VERSION-src.tar.gz +test -d $PKG-$VERSION-src || tar xvf $PKG-$VERSION-src.tar.gz +cd $PKG-$VERSION-src +cat << EOF > config.toml +# see config.toml.example for more possible options +[llvm] + +# use ninja +ninja = true + +targets = "X86" +# When compiling LLVM, the experimental targets (WebAssembly +# and RISCV) are built by default - omit them +experimental-targets = "" + +[build] +# omit HTML docs to save time and space (comment this to build them) +docs = false + +# install cargo as well as rust +extended = true + +[install] +# Adjust the prefix for the desired destination +prefix = "$PREFIX" +sysconfdir = "etc" + +# docdir is used even if the full awesome docs are not installed +docdir = "share/doc/rustc-${VERSION}" + +[rust] +channel = "stable" +rpath = false + +# BLFS does not install the FileCheck executable from llvm, +# so disable codegen tests +codegen-tests = false + +# get a trace if there is an Internal Compiler Exception +backtrace-on-ice = false + +EOF + +export RUSTFLAGS="$RUSTFLAGS -C link-args=-lffi" && +python3 ./x.py build --exclude src/tools/miri + +python3 ./x.py install + +cd ${BUILDDIR} + +BINDGENVERS=0.24.3 + +test -e ${BUILDDIR}/cbindgen-${BINDGENVERS}.tar.gz || wget https://github.com/eqrion/cbindgen/archive/v${BINDGENVERS}/cbindgen-${BINDGENVERS}.tar.gz -O ${BUILDDIR}/cbindgen-${BINDGENVERS}.tar.gz +test -d cbindgen-${BINDGENVERS} || tar xvf ${BUILDDIR}/cbindgen-${BINDGENVERS}.tar.gz + +cd cbindgen-${BINDGENVERS} + +source ${PREFIX}/profile + +cargo build --release +install -Dm755 target/release/cbindgen $PREFIX/bin + + +exit From 0f4691d937d8747bc107066bb2b750b145dd4424 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Sat, 13 Aug 2022 02:35:22 +0200 Subject: [PATCH 2/2] rustc-1.63.0-0: Build with vendor sources The build fails without it as addr2line 0.16.0 cannot be downloaded [1]. Downloaded 49 crates (3.7 MB) in 0.48s Finished dev [unoptimized] target(s) in 44.74s warning: x.py has made several changes recently you may want to look at help: consider looking at the changes in `src/bootstrap/CHANGELOG.md` note: to silence this warning, add `changelog-seen = 2` at the top of `config.toml` Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) error: failed to download `addr2line v0.16.0` Caused by: attempting to make an HTTP request, but --frozen was specified Use vendored sources [2]: # Indicate whether the vendored sources are used for Rust dependencies or not #vendor = false [1]: https://github.com/rust-lang/rust/issues/100459 [2]: https://github.com/rust-lang/rust/blob/75b7e52e92c3b00fc891b47f5b2efdff0a2be55a/config.toml.example#L261-L262 --- rustc-1.63.0-0.build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rustc-1.63.0-0.build.sh b/rustc-1.63.0-0.build.sh index 05d6c92..82a9893 100755 --- a/rustc-1.63.0-0.build.sh +++ b/rustc-1.63.0-0.build.sh @@ -56,6 +56,8 @@ docs = false # install cargo as well as rust extended = true +vendor = true + [install] # Adjust the prefix for the desired destination prefix = "$PREFIX"