From 3992ed1e7a468bdb1f54219987dddfc3cda4cba2 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 30 Dec 2016 23:18:17 -0500 Subject: [PATCH] CI: use a recent nightly - add #[no_mangle] to the panic_fmt lang item to adjust to changes in the visibility algorithm - adjust to changes in the layout of Cargo's target directory - use a newer Xargo to reduce the build time of the sysroot (only core is compiled as part of the sysroot now) --- .travis.yml | 3 +-- ci/docker/thumbv6m-none-eabi/Dockerfile | 2 +- ci/docker/thumbv7em-none-eabi/Dockerfile | 2 +- ci/docker/thumbv7em-none-eabihf/Dockerfile | 2 +- ci/docker/thumbv7m-none-eabi/Dockerfile | 2 +- ci/run.sh | 24 +++++++++++++--------- src/bin/intrinsics.rs | 1 + 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82ca5d8..96bd24a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ cache: cargo dist: trusty language: rust -# NOTE(nightly-2016-12-05) work around for rust-lang/rust#38281 -rust: nightly-2016-12-05 +rust: nightly services: docker sudo: required diff --git a/ci/docker/thumbv6m-none-eabi/Dockerfile b/ci/docker/thumbv6m-none-eabi/Dockerfile index 09c3203..2a2d127 100644 --- a/ci/docker/thumbv6m-none-eabi/Dockerfile +++ b/ci/docker/thumbv6m-none-eabi/Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin + sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin ENV AR_thumbv6m_none_eabi=arm-none-eabi-ar \ CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER=arm-none-eabi-gcc \ CC_thumbv6m_none_eabi=arm-none-eabi-gcc \ diff --git a/ci/docker/thumbv7em-none-eabi/Dockerfile b/ci/docker/thumbv7em-none-eabi/Dockerfile index 73ebf81..fda5dcb 100644 --- a/ci/docker/thumbv7em-none-eabi/Dockerfile +++ b/ci/docker/thumbv7em-none-eabi/Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin + sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin ENV AR_thumbv7em_none_eabi=arm-none-eabi-ar \ CARGO_TARGET_THUMBV7EM_NONE_EABI_LINKER=arm-none-eabi-gcc \ CC_thumbv7em_none_eabi=arm-none-eabi-gcc \ diff --git a/ci/docker/thumbv7em-none-eabihf/Dockerfile b/ci/docker/thumbv7em-none-eabihf/Dockerfile index 7ec622b..5395e74 100644 --- a/ci/docker/thumbv7em-none-eabihf/Dockerfile +++ b/ci/docker/thumbv7em-none-eabihf/Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin + sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin ENV AR_thumbv7em_none_eabihf=arm-none-eabi-ar \ CARGO_TARGET_THUMBV7EM_NONE_EABIHF_LINKER=arm-none-eabi-gcc \ CC_thumbv7em_none_eabihf=arm-none-eabi-gcc \ diff --git a/ci/docker/thumbv7m-none-eabi/Dockerfile b/ci/docker/thumbv7m-none-eabi/Dockerfile index f5a4931..e09c020 100644 --- a/ci/docker/thumbv7m-none-eabi/Dockerfile +++ b/ci/docker/thumbv7m-none-eabi/Dockerfile @@ -3,7 +3,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates curl gcc gcc-arm-none-eabi libc6-dev libcurl4-openssl-dev libssh2-1 libnewlib-dev RUN curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- --git japaric/xargo --tag v0.2.1 --target x86_64-unknown-linux-gnu --to /usr/bin + sh -s -- --git japaric/xargo --tag v0.3.1 --target x86_64-unknown-linux-gnu --to /usr/bin ENV AR_thumbv7m_none_eabi=arm-none-eabi-ar \ CARGO_TARGET_THUMBV7M_NONE_EABI_LINKER=arm-none-eabi-gcc \ CC_thumbv7m_none_eabi=arm-none-eabi-gcc \ diff --git a/ci/run.sh b/ci/run.sh index 382d70f..b30fad1 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -26,7 +26,7 @@ esac # TODO(#79) fix the undefined references problem for debug-assertions+lto case $1 in thumb*) - RUSTFLAGS="-C debug-assertions=no -C link-arg=-nostartfiles" xargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto + RUSTFLAGS="-C debug-assertions=no" xargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto -C link-arg=-nostartfiles xargo rustc --no-default-features --features c --target $1 --bin intrinsics --release -- -C lto ;; *) @@ -61,18 +61,22 @@ case $TRAVIS_OS_NAME in ;; esac -# NOTE On i586, It's normal that the get_pc_thunk symbol appears several times so ignore it if [ $TRAVIS_OS_NAME = osx ]; then - path=target/${1}/debug/libcompiler_builtins.rlib + path=target/${1}/debug/deps/libcompiler_builtins-*.rlib else - path=/target/${1}/debug/libcompiler_builtins.rlib + path=/target/${1}/debug/deps/libcompiler_builtins-*.rlib fi -stdout=$($PREFIX$NM -g --defined-only $path) +for rlib in $(echo $path); do + stdout=$($PREFIX$NM -g --defined-only $rlib) -set +e -echo "$stdout" | sort | uniq -d | grep -v __x86.get_pc_thunk | grep 'T __' + # NOTE On i586, It's normal that the get_pc_thunk symbol appears several times so ignore it + set +e + echo "$stdout" | sort | uniq -d | grep -v __x86.get_pc_thunk | grep 'T __' -if test $? = 0; then - exit 1 -fi + if test $? = 0; then + exit 1 + fi +done + +true diff --git a/src/bin/intrinsics.rs b/src/bin/intrinsics.rs index 5a4a345..b0de331 100644 --- a/src/bin/intrinsics.rs +++ b/src/bin/intrinsics.rs @@ -403,5 +403,6 @@ pub fn _Unwind_Resume() {} extern "C" fn eh_personality() {} #[cfg(not(test))] +#[no_mangle] #[lang = "panic_fmt"] extern "C" fn panic_fmt() {}