Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSP430] Build std components for msp430. #51250

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/ci/docker/dist-various-1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
27 changes: 27 additions & 0 deletions src/ci/docker/dist-various-1/install-msp430-elf.sh
Original file line number Diff line number Diff line change
@@ -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 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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
2 changes: 2 additions & 0 deletions src/liballoc/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down