From 675e2660d72a7f9f40131a2d3baa58ba1eea268a Mon Sep 17 00:00:00 2001 From: Vadzim Dambrouski Date: Thu, 31 May 2018 01:33:35 +0300 Subject: [PATCH 1/3] [liballoc] Fix compile error on 16bit targets. --- src/liballoc/vec_deque.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liballoc/vec_deque.rs b/src/liballoc/vec_deque.rs index e917a65c9c5ad..90ca4458f895f 100644 --- a/src/liballoc/vec_deque.rs +++ b/src/liballoc/vec_deque.rs @@ -36,6 +36,8 @@ use vec::Vec; const INITIAL_CAPACITY: usize = 7; // 2^3 - 1 const MINIMUM_CAPACITY: usize = 1; // 2 - 1 +#[cfg(target_pointer_width = "16")] +const MAXIMUM_ZST_CAPACITY: usize = 1 << (16 - 1); // Largest possible power of two #[cfg(target_pointer_width = "32")] const MAXIMUM_ZST_CAPACITY: usize = 1 << (32 - 1); // Largest possible power of two #[cfg(target_pointer_width = "64")] From e3a0dcf873e4dff5a68e4c15fa8d6da9747dd098 Mon Sep 17 00:00:00 2001 From: Vadzim Dambrouski Date: Thu, 31 May 2018 17:05:03 +0300 Subject: [PATCH 2/3] [MSP430] Build std components for msp430. --- src/ci/docker/dist-various-1/Dockerfile | 10 ++++++- .../dist-various-1/install-msp430-elf.sh | 26 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100755 src/ci/docker/dist-various-1/install-msp430-elf.sh diff --git a/src/ci/docker/dist-various-1/Dockerfile b/src/ci/docker/dist-various-1/Dockerfile index b195decfcf574..4e6a534de5980 100644 --- a/src/ci/docker/dist-various-1/Dockerfile +++ b/src/ci/docker/dist-various-1/Dockerfile @@ -38,6 +38,9 @@ RUN ./install-mips-musl.sh COPY dist-various-1/install-mipsel-musl.sh /build RUN ./install-mipsel-musl.sh +COPY dist-various-1/install-msp430-elf.sh /build +RUN ./install-msp430-elf.sh + # Suppress some warnings in the openwrt toolchains we downloaded ENV STAGING_DIR=/tmp @@ -98,6 +101,10 @@ ENV TARGETS=$TARGETS,thumbv7m-none-eabi ENV TARGETS=$TARGETS,thumbv7em-none-eabi ENV TARGETS=$TARGETS,thumbv7em-none-eabihf +# The targets below are not required to build, so they can be commented +# out in case of regressions or other unwanted breakage. +ENV TARGETS=$TARGETS,msp430-none-elf + # FIXME: remove armv5te vars after https://github.com/alexcrichton/cc-rs/issues/271 # get fixed and cc update ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ @@ -107,7 +114,8 @@ ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \ CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \ CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft" \ CC_armv5te_unknown_linux_musleabi=arm-linux-gnueabi-gcc \ - CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" + CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft" \ + CC_msp430_none_elf=msp430-elf-gcc ENV RUST_CONFIGURE_ARGS \ --musl-root-armv5te=/musl-armv5te \ diff --git a/src/ci/docker/dist-various-1/install-msp430-elf.sh b/src/ci/docker/dist-various-1/install-msp430-elf.sh new file mode 100755 index 0000000000000..357bb6c627b91 --- /dev/null +++ b/src/ci/docker/dist-various-1/install-msp430-elf.sh @@ -0,0 +1,26 @@ +# Copyright 2018 The Rust Project Developers. See the COPYRIGHT +# file at the top-level directory of this distribution and at +# http://rust-lang.org/COPYRIGHT. +# +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. + +set -ex + +mkdir /usr/local/msp430-none-elf + +# Newer versions of toolchain can be found here +# http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/index_FDS.html +# Original link for version 5_01_02_00 (6.4.0.32) is +# http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/5_01_02_00/exports/msp430-gcc-6.4.0.32_linux64.tar.bz2 +# TI website doesn't allow curl, so we have to use mirror +URL="https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror" +FILE="msp430-gcc-6.4.0.32_linux64.tar.bz2" +curl -L "$URL/$FILE" | tar xjf - -C /usr/local/msp430-none-elf --strip-components=1 + +for file in /usr/local/msp430-none-elf/bin/msp430-elf-*; do + ln -s $file /usr/local/bin/`basename $file` +done From a447edfade06de243ba3f5281c3c0036e9e8e6c7 Mon Sep 17 00:00:00 2001 From: Vadzim Dambrouski Date: Thu, 31 May 2018 18:13:02 +0300 Subject: [PATCH 3/3] Break a long line --- src/ci/docker/dist-various-1/install-msp430-elf.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ci/docker/dist-various-1/install-msp430-elf.sh b/src/ci/docker/dist-various-1/install-msp430-elf.sh index 357bb6c627b91..c890b18b7ab9b 100755 --- a/src/ci/docker/dist-various-1/install-msp430-elf.sh +++ b/src/ci/docker/dist-various-1/install-msp430-elf.sh @@ -15,7 +15,8 @@ mkdir /usr/local/msp430-none-elf # Newer versions of toolchain can be found here # http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/index_FDS.html # Original link for version 5_01_02_00 (6.4.0.32) is -# http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/5_01_02_00/exports/msp430-gcc-6.4.0.32_linux64.tar.bz2 +# http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/5_01_02_00/exports/ +# msp430-gcc-6.4.0.32_linux64.tar.bz2 # TI website doesn't allow curl, so we have to use mirror URL="https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror" FILE="msp430-gcc-6.4.0.32_linux64.tar.bz2"