diff options
Diffstat (limited to 'development')
-rw-r--r-- | development/rust/link_libffi.diff.gz | bin | 0 -> 300 bytes | |||
-rw-r--r-- | development/rust/rust.SlackBuild | 62 | ||||
-rw-r--r-- | development/rust/rust.info | 10 |
3 files changed, 61 insertions, 11 deletions
diff --git a/development/rust/link_libffi.diff.gz b/development/rust/link_libffi.diff.gz Binary files differnew file mode 100644 index 0000000000000..0469634292166 --- /dev/null +++ b/development/rust/link_libffi.diff.gz diff --git a/development/rust/rust.SlackBuild b/development/rust/rust.SlackBuild index c85c808a99e57..c007f91c222e1 100644 --- a/development/rust/rust.SlackBuild +++ b/development/rust/rust.SlackBuild @@ -2,8 +2,8 @@ # Slackware build script for rust -# Copyright 2017-2018 Andrew Clemons, Wellington, New Zealand -# Copyright 2017 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2017, 2018 Andrew Clemons, Wellington, New Zealand +# Copyright 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # Copyright 2017 Stuart Winter # All rights reserved. # @@ -26,7 +26,7 @@ PRGNAM=rust SRCNAM="${PRGNAM}c" -VERSION=${VERSION:-1.24.0} +VERSION=${VERSION:-1.24.1} # src/stage0.txt RSTAGE0_VERSION=${RSTAGE0_VERSION:-1.23.0} @@ -104,6 +104,10 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +# Not needed, as the build will automatically use as many jobs as there are +# cores. +#NUMJOBS=${NUMJOBS:-" -j7 "} + if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" @@ -146,13 +150,17 @@ fi # needed during the build, and then we'll strip the rpaths out of the # binaries later. -# LLVM in Slackware14.2 is now too old to build rust 1.24.0, so the rust build -# falls back to building its own +# LLVM in Slackware14.2 is now too old to build rust 1.24.1, so the rust build +# falls back to building its own. You can force using the system LLVM with this +# flag. +SYSTEM_LLVM=${SYSTEM_LLVM:-no} + cat << EOF > config.toml [build] build = "$BARCH-unknown-linux-$BABI" host = ["$TARCH-unknown-linux-$BABI"] target = ["$TARCH-unknown-linux-$BABI"] +full-bootstrap = false submodules = false vendor = true extended = true @@ -171,6 +179,48 @@ codegen-tests = false ignore-git = true EOF +if [ "$SYSTEM_LLVM" = "yes" ] ; then + cat << EOF >> config.toml + +[target.i586-unknown-linux-gnu] +llvm-config = "/usr/bin/llvm-config" + +[target.i686-unknown-linux-gnu] +llvm-config = "/usr/bin/llvm-config" + +[target.x86_64-unknown-linux-gnu] +llvm-config = "/usr/bin/llvm-config" + +[target.armv7-unknown-linux-gnueabihf] +llvm-config = "/usr/bin/llvm-config" +EOF + + if [ "$(llvm-config --version)" = "5.0.1" ] ; then + # llvm-config --cflags returns a set of flags including -Wcovered-switch-default + # and -Wstring-conversion which gcc does not support, breaking the build. + cat << EOF > local-llvm-config +#!/bin/bash + +set -e +set -o pipefail + +/usr/bin/llvm-config "\$@" | sed 's/-Wcovered-switch-default//g;s/-Wstring-conversion//g' +EOF + + chmod 0755 local-llvm-config + sed -i "s|/usr/bin/llvm-config|$(pwd)/local-llvm-config|" config.toml + fi + + # Link with -lffi in case of using system LLVM: + zcat $CWD/link_libffi.diff.gz | patch -p1 --verbose +fi + +FULL_BOOTSTRAP="${FULL_BOOTSTRAP:-no}" + +if [ "$FULL_BOOTSTRAP" = "yes" ] ; then + sed -i 's/^full-bootstrap.*$/full-bootstrap = true/' config.toml +fi + if [ "$LOCAL_BOOTSTRAP" = "yes" ] ; then sed -i "s|^\(extended = true\)$|\1\nrustc = \"/usr/bin/rustc\"\ncargo = \"/usr/bin/cargo\"|" config.toml fi @@ -232,7 +282,7 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr # Remove any compiled-in RPATHs: find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ - | cut -f 1 -d : | xargs patchelf --remove-rpath 2> /dev/null || true + | cut -f 1 -d : | xargs -I xx patchelf --remove-rpath xx 2> /dev/null || true # Compress man pages: find $PKG/usr/man -type f -exec gzip -9 {} \; diff --git a/development/rust/rust.info b/development/rust/rust.info index 881c456a92fd8..bb2204a6414b7 100644 --- a/development/rust/rust.info +++ b/development/rust/rust.info @@ -1,25 +1,25 @@ PRGNAM="rust" -VERSION="1.24.0" +VERSION="1.24.1" HOMEPAGE="https://www.rust-lang.org" -DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.24.0-src.tar.xz \ +DOWNLOAD="https://static.rust-lang.org/dist/rustc-1.24.1-src.tar.xz \ https://static.rust-lang.org/dist/2018-01-04/cargo-0.24.0-i686-unknown-linux-gnu.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rust-std-1.23.0-i686-unknown-linux-gnu.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rustc-1.23.0-i686-unknown-linux-gnu.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/cargo-0.24.0-arm-unknown-linux-gnueabi.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rust-std-1.23.0-arm-unknown-linux-gnueabi.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rustc-1.23.0-arm-unknown-linux-gnueabi.tar.gz" -MD5SUM="1203b1273e329f5190b5b06706687c26 \ +MD5SUM="1961ffb0a0293e30e5a8fda4f15d2959 \ 5f149398a682fac3ee88cfa35cc7339a \ 48507590e56854ab5d2bc672b75568da \ d38866fdb43baec3c53d05b37e165b1c \ 6606bf8fd070e34821fb3bb2dbce561f \ 1c13d338132e3b3777ec53b340de4761 \ 9374f161d94606772acaacdb70d81bec" -DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.24.0-src.tar.xz \ +DOWNLOAD_x86_64="https://static.rust-lang.org/dist/rustc-1.24.1-src.tar.xz \ https://static.rust-lang.org/dist/2018-01-04/cargo-0.24.0-x86_64-unknown-linux-gnu.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rust-std-1.23.0-x86_64-unknown-linux-gnu.tar.gz \ https://static.rust-lang.org/dist/2018-01-04/rustc-1.23.0-x86_64-unknown-linux-gnu.tar.gz" -MD5SUM_x86_64="1203b1273e329f5190b5b06706687c26 \ +MD5SUM_x86_64="1961ffb0a0293e30e5a8fda4f15d2959 \ 830041cfc8627d3f7187954993449cf9 \ f9f89caf41e3f9c092118272ceb5bf6b \ 068fc6566772c4ce165cc547151f514c" |