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..c890b18b7ab9b --- /dev/null +++ b/src/ci/docker/dist-various-1/install-msp430-elf.sh @@ -0,0 +1,27 @@ +# 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 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")]