From 07b3befeb3108438c87e07c3860a0328ab4af50c Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu Date: Thu, 18 Feb 2021 00:21:53 +0900 Subject: [PATCH] arm Signed-off-by: Ishimoto Shinobu --- build.sh | 40 +++---------------- stuff/rust/0001-LLVM-clang-build.patch | 6 +-- .../0002-linux-musl-disable-crt-static.patch | 6 +-- ...psel-disable-soft-float-on-musl-libc.patch | 6 +-- ...nssl-src-add-more-linux-musl-targets.patch | 6 +-- .../rust/0005-force-clear_cache-for-arm.patch | 33 +++++++++++++++ 6 files changed, 50 insertions(+), 47 deletions(-) create mode 100644 stuff/rust/0005-force-clear_cache-for-arm.patch diff --git a/build.sh b/build.sh index f89c954..65842cd 100755 --- a/build.sh +++ b/build.sh @@ -19,7 +19,7 @@ main() { exit 1 fi - for i in amd64 x86 arm64 armv7l mips64 mips64el mipsel mips; do + for i in amd64 x86 arm64 armv7l; do if [ ! -f "$ATAROOT/OUT.${i}/.toolchain_stamp" ]; then echo "Toolchain for $i is not found" exit 1 @@ -40,8 +40,10 @@ main() { patch -Np1 -i "$STUFF"/rust/0002-linux-musl-disable-crt-static.patch patch -Np1 -i "$STUFF"/rust/0003-mips-and-mipsel-disable-soft-float-on-musl-libc.patch patch -Np1 -i "$STUFF"/rust/0004-openssl-src-add-more-linux-musl-targets.patch + patch -Np1 -i "$STUFF"/rust/0005-force-clear_cache-for-arm.patch clear_vendor_checksums openssl-src + clear_vendor_checksums compiler_builtins cat >> config.toml <<-EOF [llvm] @@ -50,7 +52,7 @@ main() { assertions = false static-libstdcpp = true ninja = true - targets = "AArch64;ARM;Mips;X86" + targets = "AArch64;ARM;X86" experimental-targets = "" [build] @@ -58,11 +60,7 @@ main() { "x86_64-unknown-linux-musl", "i686-unknown-linux-musl", "aarch64-unknown-linux-musl", - "armv7-unknown-linux-musleabihf", - "mips64-unknown-linux-muslabi64", - "mips64el-unknown-linux-muslabi64", - "mips-unknown-linux-musl", - "mipsel-unknown-linux-musl" + "armv7-unknown-linux-musleabihf" ] cargo-native-static = true compiler-docs = false @@ -117,34 +115,6 @@ main() { linker = "armv7l-linux-musleabihf-clang" musl-root = "$ATAROOT/OUT.armv7l/rootfs/usr" crt-static = false - - [target.mips64-unknown-linux-muslabi64] - cc = "mips64-linux-musl-clang" - cxx = "mips64-linux-musl-clang++" - linker = "mips64-linux-musl-clang" - musl-root = "$ATAROOT/OUT.mips64/rootfs/usr" - crt-static = false - - [target.mips64el-unknown-linux-muslabi64] - cc = "mips64el-linux-musl-clang" - cxx = "mips64el-linux-musl-clang++" - linker = "mips64el-linux-musl-clang" - musl-root = "$ATAROOT/OUT.mips64el/rootfs/usr" - crt-static = false - - [target.mips-unknown-linux-musl] - cc = "mips-linux-musl-clang" - cxx = "mips-linux-musl-clang++" - linker = "mips-linux-musl-clang" - musl-root = "$ATAROOT/OUT.mips/rootfs/usr" - crt-static = false - - [target.mipsel-unknown-linux-musl] - cc = "mipsel-linux-musl-clang" - cxx = "mipsel-linux-musl-clang++" - linker = "mipsel-linux-musl-clang" - musl-root = "$ATAROOT/OUT.mipsel/rootfs/usr" - crt-static = false EOF ./x.py dist -j$(nproc) diff --git a/stuff/rust/0001-LLVM-clang-build.patch b/stuff/rust/0001-LLVM-clang-build.patch index 81763b4..f4e29c3 100644 --- a/stuff/rust/0001-LLVM-clang-build.patch +++ b/stuff/rust/0001-LLVM-clang-build.patch @@ -1,7 +1,7 @@ -From cad32b6b6cce6c5232065d8fd7fbe33bc6dff15b Mon Sep 17 00:00:00 2001 +From bc6f332c36eaa942f4fcd2ae8bf1fcf681bb2d86 Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu -Date: Wed, 17 Feb 2021 01:28:49 +0900 -Subject: [PATCH 1/4] LLVM/clang build +Date: Wed, 17 Feb 2021 06:52:44 +0900 +Subject: [PATCH 1/5] LLVM/clang build Signed-off-by: Ishimoto Shinobu --- diff --git a/stuff/rust/0002-linux-musl-disable-crt-static.patch b/stuff/rust/0002-linux-musl-disable-crt-static.patch index f554474..c65c1ac 100644 --- a/stuff/rust/0002-linux-musl-disable-crt-static.patch +++ b/stuff/rust/0002-linux-musl-disable-crt-static.patch @@ -1,7 +1,7 @@ -From dfb3b14916833632e5c95adf2dbec32bb5133b4a Mon Sep 17 00:00:00 2001 +From d0488e4ca557f21a139c92fd49eb3ded48511d08 Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu -Date: Wed, 17 Feb 2021 01:29:37 +0900 -Subject: [PATCH 2/4] linux-musl: disable crt-static +Date: Wed, 17 Feb 2021 06:53:07 +0900 +Subject: [PATCH 2/5] linux-musl: disable crt-static Signed-off-by: Ishimoto Shinobu --- diff --git a/stuff/rust/0003-mips-and-mipsel-disable-soft-float-on-musl-libc.patch b/stuff/rust/0003-mips-and-mipsel-disable-soft-float-on-musl-libc.patch index 1d36731..ebbe0f4 100644 --- a/stuff/rust/0003-mips-and-mipsel-disable-soft-float-on-musl-libc.patch +++ b/stuff/rust/0003-mips-and-mipsel-disable-soft-float-on-musl-libc.patch @@ -1,7 +1,7 @@ -From caeb8fe79ebf701f042b77abd99e722db88d82b8 Mon Sep 17 00:00:00 2001 +From b333b22441983ee69f588080007b61faf840979c Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu -Date: Wed, 17 Feb 2021 01:30:14 +0900 -Subject: [PATCH 3/4] mips and mipsel: disable soft-float on musl libc +Date: Wed, 17 Feb 2021 06:53:23 +0900 +Subject: [PATCH 3/5] mips and mipsel: disable soft-float on musl libc Signed-off-by: Ishimoto Shinobu --- diff --git a/stuff/rust/0004-openssl-src-add-more-linux-musl-targets.patch b/stuff/rust/0004-openssl-src-add-more-linux-musl-targets.patch index 24de330..ea43357 100644 --- a/stuff/rust/0004-openssl-src-add-more-linux-musl-targets.patch +++ b/stuff/rust/0004-openssl-src-add-more-linux-musl-targets.patch @@ -1,7 +1,7 @@ -From 430c2d9289713233669925f632853fd2ff929726 Mon Sep 17 00:00:00 2001 +From c92db3141f28812852109fc3a4ba174116247b93 Mon Sep 17 00:00:00 2001 From: Ishimoto Shinobu -Date: Wed, 17 Feb 2021 01:32:51 +0900 -Subject: [PATCH 4/4] openssl-src: add more linux-musl targets +Date: Wed, 17 Feb 2021 06:53:42 +0900 +Subject: [PATCH 4/5] openssl-src: add more linux-musl targets Signed-off-by: Ishimoto Shinobu --- diff --git a/stuff/rust/0005-force-clear_cache-for-arm.patch b/stuff/rust/0005-force-clear_cache-for-arm.patch new file mode 100644 index 0000000..e65994f --- /dev/null +++ b/stuff/rust/0005-force-clear_cache-for-arm.patch @@ -0,0 +1,33 @@ +From 0dd0a84cb70b35d0cb6a4440fdcb3d51bca3c29f Mon Sep 17 00:00:00 2001 +From: Ishimoto Shinobu +Date: Wed, 17 Feb 2021 06:55:50 +0900 +Subject: [PATCH 5/5] force clear_cache for arm + +Signed-off-by: Ishimoto Shinobu +--- + vendor/compiler_builtins/build.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/vendor/compiler_builtins/build.rs b/vendor/compiler_builtins/build.rs +index f948edba9..83a85acf2 100644 +--- a/vendor/compiler_builtins/build.rs ++++ b/vendor/compiler_builtins/build.rs +@@ -364,6 +364,7 @@ mod c { + ("__sync_fetch_and_umin_8", "arm/sync_fetch_and_umin_8.S"), + ("__sync_fetch_and_xor_4", "arm/sync_fetch_and_xor_4.S"), + ("__sync_fetch_and_xor_8", "arm/sync_fetch_and_xor_8.S"), ++ ("__clear_cache", "clear_cache.c"), + ]); + } + +@@ -414,6 +415,7 @@ mod c { + ("__floatunsitf", "floatunsitf.c"), + ("__trunctfdf2", "trunctfdf2.c"), + ("__trunctfsf2", "trunctfsf2.c"), ++ ("__clear_cache", "clear_cache.c"), + ]); + + if target_os != "windows" { +-- +2.29.2 +