Skip to content

Commit 8521530

Browse files
committed
Fix __divsi3 and __udivsi3 on thumbv6m targets
This commit fixes a bug accidentally introduced in #285 where some lingering references remained to `#[cfg(thumbv6m)]` but this, since the historical revert, was renamed to `#[cfg(thumb_1)]`. This caused on the thumbv6m platform for the intrinsics to be accidentally omitted because the build script didn't actually compile them but the Rust code thought the C code was in use. After correcting the `#[cfg]` statements the CI configuration for the `thumb*` family of targets was all updated. The support for xargo testing was removed from `run.sh` since it had long since bitrotted, and the script was updated to simply build the intrinsics example to attempt to link for each of these targets. This in turn exposed the bug locally and allowed to confirm a fix once the `#[cfg]` statements were corrected. cc rust-lang/rust#60782
1 parent e3b53f9 commit 8521530

File tree

15 files changed

+64
-95
lines changed

15 files changed

+64
-95
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ rustc-dep-of-std = ['c', 'compiler-builtins', 'core']
6262

6363
[[example]]
6464
name = "intrinsics"
65-
required-features = ["c", "compiler-builtins"]
65+
required-features = ["compiler-builtins"]
6666

6767
[workspace]
6868
members = ["testcrate"]

azure-pipelines.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,14 @@ jobs:
3333
TARGET: powerpc64-unknown-linux-gnu
3434
powerpc64le:
3535
TARGET: powerpc64le-unknown-linux-gnu
36-
# thumbv6m:
37-
# TARGET: thumbv6m-linux-eabi
38-
# XARGO: 1
39-
# thumbv7em:
40-
# TARGET: thumbv7em-linux-eabi
41-
# XARGO: 1
42-
# thumbv7emhf:
43-
# TARGET: thumbv7em-linux-eabihf
44-
# XARGO: 1
45-
# thumbv7m:
46-
# TARGET: thumbv7m-linux-eabi
47-
# XARGO: 1
36+
thumbv6m:
37+
TARGET: thumbv6m-none-eabi
38+
thumbv7em:
39+
TARGET: thumbv7em-none-eabi
40+
thumbv7emhf:
41+
TARGET: thumbv7em-none-eabihf
42+
thumbv7m:
43+
TARGET: thumbv7m-none-eabi
4844
wasm32:
4945
TARGET: wasm32-unknown-unknown
5046
ONLY_BUILD: 1

ci/docker/thumbv6m-linux-eabi/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu:18.04
2+
RUN apt-get update && \
3+
apt-get install -y --no-install-recommends \
4+
gcc libc6-dev ca-certificates \
5+
gcc-arm-none-eabi \
6+
libnewlib-arm-none-eabi
7+
ENV XARGO=1

ci/docker/thumbv7em-linux-eabi/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

ci/docker/thumbv7em-linux-eabihf/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu:18.04
2+
RUN apt-get update && \
3+
apt-get install -y --no-install-recommends \
4+
gcc libc6-dev ca-certificates \
5+
gcc-arm-none-eabi \
6+
libnewlib-arm-none-eabi
7+
ENV XARGO=1
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu:18.04
2+
RUN apt-get update && \
3+
apt-get install -y --no-install-recommends \
4+
gcc libc6-dev ca-certificates \
5+
gcc-arm-none-eabi \
6+
libnewlib-arm-none-eabi
7+
ENV XARGO=1

ci/docker/thumbv7m-linux-eabi/Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM ubuntu:18.04
2+
RUN apt-get update && \
3+
apt-get install -y --no-install-recommends \
4+
gcc libc6-dev ca-certificates \
5+
gcc-arm-none-eabi \
6+
libnewlib-arm-none-eabi
7+
ENV XARGO=1

0 commit comments

Comments
 (0)