-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #300 from tgross35/test-refactoring
Test more targets against a custom-built musl libm
- Loading branch information
Showing
32 changed files
with
3,007 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
**/*.rs.bk | ||
**.bk | ||
.#* | ||
/bin | ||
/math/src | ||
/math/target | ||
/target | ||
/tests | ||
Cargo.lock | ||
musl/ | ||
**.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc-multilib libc6-dev ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM ubuntu:24.04 | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev qemu-user-static ca-certificates \ | ||
gcc-riscv64-linux-gnu libc6-dev-riscv64-cross \ | ||
qemu-system-riscv64 | ||
|
||
ENV TOOLCHAIN_PREFIX=riscv64-linux-gnu- | ||
ENV CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER="$TOOLCHAIN_PREFIX"gcc \ | ||
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER=qemu-riscv64-static \ | ||
AR_riscv64gc_unknown_linux_gnu="$TOOLCHAIN_PREFIX"ar \ | ||
CC_riscv64gc_unknown_linux_gnu="$TOOLCHAIN_PREFIX"gcc \ | ||
QEMU_LD_PREFIX=/usr/riscv64-linux-gnu \ | ||
RUST_TEST_THREADS=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG IMAGE=ubuntu:24.04 | ||
FROM $IMAGE | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-arm-none-eabi \ | ||
libnewlib-arm-none-eabi | ||
ENV BUILD_ONLY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG IMAGE=ubuntu:24.04 | ||
FROM $IMAGE | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-arm-none-eabi \ | ||
libnewlib-arm-none-eabi | ||
ENV BUILD_ONLY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG IMAGE=ubuntu:24.04 | ||
FROM $IMAGE | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-arm-none-eabi \ | ||
libnewlib-arm-none-eabi | ||
ENV BUILD_ONLY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ARG IMAGE=ubuntu:24.04 | ||
FROM $IMAGE | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
gcc libc6-dev ca-certificates \ | ||
gcc-arm-none-eabi \ | ||
libnewlib-arm-none-eabi | ||
ENV BUILD_ONLY=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# Download the expected version of musl to a directory `musl` | ||
|
||
set -eux | ||
|
||
fname=musl-1.2.5.tar.gz | ||
sha=a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4 | ||
|
||
mkdir musl | ||
curl "https://musl.libc.org/releases/$fname" -O | ||
|
||
case "$(uname -s)" in | ||
MINGW*) | ||
# Need to extract the second line because certutil does human output | ||
fsha=$(certutil -hashfile "$fname" SHA256 | sed -n '2p') | ||
[ "$sha" = "$fsha" ] || exit 1 | ||
;; | ||
*) | ||
echo "$sha $fname" | shasum -a 256 --check || exit 1 | ||
;; | ||
esac | ||
|
||
tar -xzf "$fname" -C musl --strip-components 1 | ||
rm "$fname" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[package] | ||
name = "libm-macros" | ||
version = "0.1.0" | ||
edition = "2021" | ||
|
||
[lib] | ||
proc-macro = true | ||
|
||
[dependencies] | ||
proc-macro2 = "1.0.88" | ||
quote = "1.0.37" | ||
syn = { version = "2.0.79", features = ["full", "extra-traits", "visit-mut"] } |
Oops, something went wrong.