Skip to content

Commit

Permalink
Update for 8.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kleisauke committed Nov 11, 2023
1 parent 0243152 commit 43cef13
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 55 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help.
| [librsvg] | 2.57.0 | LGPLv3 |
| [libspng] | 0.7.4 | BSD 2-Clause |
| [libtiff] | 4.6.0 | [libtiff License] (BSD-like) |
| [libvips] | 8.15.0² | LGPLv3 |
| [libvips] | 8.15.0 | LGPLv3 |
| [libwebp] | 1.3.2 | New BSD License |
| [libxml2] | 2.11.5 | MIT Licence |
| [mozjpeg] | 4.1.5 | [zlib License, IJG License, BSD-3-Clause] |
Expand All @@ -48,8 +48,6 @@ Run the top-level [build script](build.sh) with the `--help` parameter for help.
| [zlib-ng] | 2.1.4 | [zlib-ng Licence] |

¹ [A fork](https://github.com/lovell/libimagequant) of the BSD 2-Clause licensed libimagequant v2.4.1 is used.
² libvips is built from the [`v8.15.0-rc2`](https://github.com/libvips/libvips/tree/v8.15.0-rc2) tag, see:
https://github.com/libvips/libvips/releases/tag/v8.15.0-rc2

[aom]: https://aomedia.googlesource.com/aom/
[Alliance for Open Media Patent License 1.0]: https://aomedia.org/license/patent-license/
Expand Down
2 changes: 1 addition & 1 deletion build/overrides.mk
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ define librsvg_BUILD
(cd '$(SOURCE_DIR)' && $(PATCH) -p1 -u) < $(realpath $(dir $(lastword $(librsvg_PATCHES))))/librsvg-llvm-mingw.patch \
# Update expected Cargo SHA256 hashes for the vendored files we have patched
$(SED) -i 's/1cb3a78f27813219776604dc99a86b95c3c4649c34a06f840440433ffb178c1d/930123760293dc184dbabc209c73cbfc079af5ca3eaabd76a06316bafbd399a3/' '$(SOURCE_DIR)/vendor/cfg-expr/.cargo-checksum.json'; \
$(SED) -i 's/254c36fa4cd3835468e679fdf7e47abe98570a4af35afa215cf252eeaa818151/0f0a18fa2e517bb2c439a13c9c24bb27f7b8f63f06123af7094eca58b57905ce/' '$(SOURCE_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
$(SED) -i 's/c3d31731175775918d2e7b3e4c19457085be966b85992e33e75435bda32acd9f/0ffa5a52d0b1c19b327ead7d1d39c9582c950a4d0770bf8c0ec2ec462ff710c7/' '$(SOURCE_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
$(SED) -i 's/8bf710288f88cfbf67e510f68abbb5a4f7173d2ea9ef32f98d594935fc051641/891c080ebd853786846af1987ca5bdb92485a792d3ec7281cf20ddaef94c9b21/' '$(SOURCE_DIR)/vendor/compiler_builtins/.cargo-checksum.json'; \
$(SED) -i 's/01bdacaccadd2b9b69183f9b5a28d010d3454d886841432f51aa79cb274c24ec/014ceac5eddbc6492e09f1a1f1bbc6dc65bb061450df613f1b3e32c00387e1df/' '$(SOURCE_DIR)/vendor/windows-sys/.cargo-checksum.json'; \
$(SED) -i 's/e990dd3ef1561f99521c4129a261a38130c823addf52f46b341fe99960d4cb74/b819750a2bb403807ebabb845b88707e81359b1c01782424dcb07f44acd001de/' '$(SOURCE_DIR)/vendor/windows-sys/.cargo-checksum.json'; \
Expand Down
8 changes: 4 additions & 4 deletions build/patches/librsvg-llvm-mingw.patch
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Mon, 21 Sep 2020 11:00:00 +0200
Subject: [PATCH 2/4] Fix linker error on llvm-mingw (targeting ARMv7)
Subject: [PATCH 2/4] Fix linker error on `armv7-pc-windows-gnullvm`

Details:
lld-link: error: undefined symbol: __aeabi_idiv
Expand All @@ -66,10 +66,10 @@ diff --git a/vendor/compiler_builtins/build.rs b/vendor/compiler_builtins/build.
index 1111111..2222222 100644
--- a/vendor/compiler_builtins/build.rs
+++ b/vendor/compiler_builtins/build.rs
@@ -391,7 +391,7 @@ mod c {
if target_arch == "arm"
@@ -393,7 +393,7 @@ mod c {
&& target_os != "ios"
&& target_os != "watchos"
&& target_os != "tvos"
- && target_env != "msvc"
+ && target_os != "windows"
{
Expand Down Expand Up @@ -194,7 +194,7 @@ index 1111111..2222222 100644
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <[email protected]>
Date: Sat, 30 Apr 2022 16:05:00 +0200
Subject: [PATCH 4/4] Fix build errors on llvm-mingw (targeting ARMv7)
Subject: [PATCH 4/4] Fix build errors on `armv7-pc-windows-gnullvm`

Details:
error[E0412]: cannot find type `WSADATA` in this scope
Expand Down
104 changes: 65 additions & 39 deletions build/plugins/llvm-mingw/patches/rust-1-fixes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ Subject: [PATCH 1/5] Add `armv7-pc-windows-gnullvm` triple

Upstream-Status: Pending

diff --git a/compiler/rustc_target/src/spec/armv7_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/armv7_pc_windows_gnullvm.rs
diff --git a/compiler/rustc_target/src/spec/targets/armv7_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/armv7_pc_windows_gnullvm.rs
new file mode 100644
index 0000000..1111111
--- /dev/null
+++ b/compiler/rustc_target/src/spec/armv7_pc_windows_gnullvm.rs
+++ b/compiler/rustc_target/src/spec/targets/armv7_pc_windows_gnullvm.rs
@@ -0,0 +1,17 @@
+use crate::spec::{FramePointer, Target};
+use crate::spec::{base, FramePointer, Target};
+
+pub fn target() -> Target {
+ let mut base = super::windows_gnullvm_base::opts();
+ let mut base = base::windows_gnullvm::opts();
+ base.max_atomic_width = Some(64);
+ base.frame_pointer = FramePointer::Always; // Required for backtraces
+ base.features = "+v7,+thumb-mode,+thumb2,+vfp3,+neon".into();
Expand All @@ -36,7 +36,7 @@ diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/s
index 1111111..2222222 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1629,6 +1629,7 @@ supported_targets! {
@@ -1595,6 +1595,7 @@ supported_targets! {
("i686-uwp-windows-gnu", i686_uwp_windows_gnu),
("x86_64-uwp-windows-gnu", x86_64_uwp_windows_gnu),

Expand Down Expand Up @@ -112,10 +112,10 @@ See: https://github.com/rust-lang/rust/pull/103894

Upstream-Status: Pending

diff --git a/compiler/rustc_target/src/spec/windows_gnullvm_base.rs b/compiler/rustc_target/src/spec/windows_gnullvm_base.rs
diff --git a/compiler/rustc_target/src/spec/base/windows_gnullvm.rs b/compiler/rustc_target/src/spec/base/windows_gnullvm.rs
index 1111111..2222222 100644
--- a/compiler/rustc_target/src/spec/windows_gnullvm_base.rs
+++ b/compiler/rustc_target/src/spec/windows_gnullvm_base.rs
--- a/compiler/rustc_target/src/spec/base/windows_gnullvm.rs
+++ b/compiler/rustc_target/src/spec/base/windows_gnullvm.rs
@@ -8,7 +8,7 @@ pub fn opts() -> TargetOptions {
// but LLVM maintainers rejected it: https://reviews.llvm.org/D51440
let pre_link_args = TargetOptions::link_args(
Expand Down Expand Up @@ -210,72 +210,98 @@ Subject: [PATCH 5/5] backtrace-rs: Fix build errors on `armv7-pc-windows-gnullvm

Resolves: https://github.com/rust-lang/backtrace-rs/issues/572

Upstream-Status: Submitted [https://github.com/rust-lang/backtrace-rs/pull/573]
Upstream-Status: Accepted [https://github.com/rust-lang/backtrace-rs/commit/3f9d175d402b7ecdd52524bf01e774a6059b5c3e]

diff --git a/library/backtrace/src/backtrace/dbghelp.rs b/library/backtrace/src/backtrace/dbghelp.rs
index 1111111..2222222 100644
--- a/library/backtrace/src/backtrace/dbghelp.rs
+++ b/library/backtrace/src/backtrace/dbghelp.rs
@@ -167,11 +167,21 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
@@ -86,6 +86,42 @@ impl MyContext {
}
}

+#[cfg(target_arch = "x86")]
+impl MyContext {
+ #[inline(always)]
+ fn ip(&self) -> DWORD {
+ self.0.Eip
+ }
+
+ #[inline(always)]
+ fn sp(&self) -> DWORD {
+ self.0.Esp
+ }
+
+ #[inline(always)]
+ fn fp(&self) -> DWORD {
+ self.0.Ebp
+ }
+}
+
+#[cfg(target_arch = "arm")]
+impl MyContext {
+ #[inline(always)]
+ fn ip(&self) -> DWORD {
+ self.0.Pc
+ }
+
+ #[inline(always)]
+ fn sp(&self) -> DWORD {
+ self.0.Sp
+ }
+
+ #[inline(always)]
+ fn fp(&self) -> DWORD {
+ self.0.R11
+ }
+}
+
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
#[inline(always)]
pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
@@ -167,11 +203,11 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
Some(StackWalkEx) => {
let mut stack_frame_ex: STACKFRAME_EX = mem::zeroed();
stack_frame_ex.StackFrameSize = mem::size_of::<STACKFRAME_EX>() as DWORD;
- stack_frame_ex.AddrPC.Offset = context.0.Eip as u64;
+
+ cfg_if::cfg_if! {
+ if #[cfg(target_arch = "x86")] {
+ stack_frame_ex.AddrPC.Offset = context.0.Eip as u64;
+ stack_frame_ex.AddrStack.Offset = context.0.Esp as u64;
+ stack_frame_ex.AddrFrame.Offset = context.0.Ebp as u64;
+ } else {
+ stack_frame_ex.AddrPC.Offset = context.0.Pc as u64;
+ stack_frame_ex.AddrStack.Offset = context.0.Sp as u64;
+ stack_frame_ex.AddrFrame.Offset = context.0.R11 as u64;
+ }
+ }
+
+ stack_frame_ex.AddrPC.Offset = context.ip() as u64;
stack_frame_ex.AddrPC.Mode = AddrModeFlat;
- stack_frame_ex.AddrStack.Offset = context.0.Esp as u64;
+ stack_frame_ex.AddrStack.Offset = context.sp() as u64;
stack_frame_ex.AddrStack.Mode = AddrModeFlat;
- stack_frame_ex.AddrFrame.Offset = context.0.Ebp as u64;
+ stack_frame_ex.AddrFrame.Offset = context.fp() as u64;
stack_frame_ex.AddrFrame.Mode = AddrModeFlat;

while StackWalkEx(
@@ -205,11 +215,21 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
@@ -205,11 +241,11 @@ pub unsafe fn trace(cb: &mut dyn FnMut(&super::Frame) -> bool) {
}
None => {
let mut stack_frame64: STACKFRAME64 = mem::zeroed();
- stack_frame64.AddrPC.Offset = context.0.Eip as u64;
+
+ cfg_if::cfg_if! {
+ if #[cfg(target_arch = "x86")] {
+ stack_frame64.AddrPC.Offset = context.0.Eip as u64;
+ stack_frame64.AddrStack.Offset = context.0.Esp as u64;
+ stack_frame64.AddrFrame.Offset = context.0.Ebp as u64;
+ } else {
+ stack_frame64.AddrPC.Offset = context.0.Pc as u64;
+ stack_frame64.AddrStack.Offset = context.0.Sp as u64;
+ stack_frame64.AddrFrame.Offset = context.0.R11 as u64;
+ }
+ }
+
+ stack_frame64.AddrPC.Offset = context.ip() as u64;
stack_frame64.AddrPC.Mode = AddrModeFlat;
- stack_frame64.AddrStack.Offset = context.0.Esp as u64;
+ stack_frame64.AddrStack.Offset = context.sp() as u64;
stack_frame64.AddrStack.Mode = AddrModeFlat;
- stack_frame64.AddrFrame.Offset = context.0.Ebp as u64;
+ stack_frame64.AddrFrame.Offset = context.fp() as u64;
stack_frame64.AddrFrame.Mode = AddrModeFlat;

while dbghelp.StackWalk64()(
diff --git a/library/backtrace/src/lib.rs b/library/backtrace/src/lib.rs
index 1111111..2222222 100644
--- a/library/backtrace/src/lib.rs
+++ b/library/backtrace/src/lib.rs
@@ -194,7 +194,7 @@ mod lock {
@@ -194,7 +194,10 @@ mod lock {

#[cfg(all(
windows,
- any(target_env = "msvc", all(target_env = "gnu", target_arch = "x86")),
+ any(target_env = "msvc", all(target_env = "gnu", any(target_arch = "x86", target_arch = "arm"))),
+ any(
+ target_env = "msvc",
+ all(target_env = "gnu", any(target_arch = "x86", target_arch = "arm"))
+ ),
not(target_vendor = "uwp")
))]
mod dbghelp;
6 changes: 3 additions & 3 deletions build/plugins/llvm-mingw/rust.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ PKG := rust
$(PKG)_WEBSITE := https://www.rust-lang.org/
$(PKG)_DESCR := A systems programming language focused on safety, speed and concurrency.
$(PKG)_IGNORE :=
# https://static.rust-lang.org/dist/2023-11-03/rustc-nightly-src.tar.xz.sha256
# https://static.rust-lang.org/dist/2023-11-11/rustc-nightly-src.tar.xz.sha256
$(PKG)_VERSION := nightly
$(PKG)_CHECKSUM := cd5803059bd5c713a3076c09ca55b974f10c29d4d58f04f0ad756ee0e21e2a2a
$(PKG)_CHECKSUM := 88f62643f1dc9bfa44a69a12651f7575f5dfd6046192f1fdd54292cbe927e9a4
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/$(PKG)-[0-9]*.patch)))
$(PKG)_SUBDIR := $(PKG)c-$($(PKG)_VERSION)-src
$(PKG)_FILE := $(PKG)c-$($(PKG)_VERSION)-src.tar.xz
$(PKG)_URL := https://static.rust-lang.org/dist/2023-11-03/$($(PKG)_FILE)
$(PKG)_URL := https://static.rust-lang.org/dist/2023-11-11/$($(PKG)_FILE)
$(PKG)_DEPS := $(BUILD)~$(PKG)
$(PKG)_TARGETS := $(BUILD) $(MXE_TARGETS)

Expand Down
2 changes: 1 addition & 1 deletion build/variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
vips_package=vips
vips_version=8.15
vips_patch_version=0
vips_pre_version=rc2
#vips_pre_version=rc2

if [ -n "$GIT_COMMIT" ]; then
vips_version=$GIT_COMMIT
Expand Down
4 changes: 2 additions & 2 deletions build/vips-all.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ $(PKG)_WEBSITE := https://libvips.github.io/libvips/
$(PKG)_DESCR := A fast image processing library with low memory needs.
$(PKG)_IGNORE :=
$(PKG)_VERSION := 8.15.0
$(PKG)_CHECKSUM := 104153ba40373f9e12ff50c7c30f4f36f8970ed35edef4cead500d548a79a509
$(PKG)_CHECKSUM := d33f81c6ab4bd1faeedc36dc32f880b19e9d5ff69b502e59d175332dfb8f63f1
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/vips-[0-9]*.patch)))
$(PKG)_GH_CONF := libvips/libvips/releases,v,-rc2,,,.tar.xz
$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,.tar.xz
$(PKG)_SUBDIR := vips-$($(PKG)_VERSION)
$(PKG)_FILE := vips-$($(PKG)_VERSION).tar.xz
$(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \
Expand Down
4 changes: 2 additions & 2 deletions build/vips-web.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ $(PKG)_WEBSITE := https://libvips.github.io/libvips/
$(PKG)_DESCR := A fast image processing library with low memory needs.
$(PKG)_IGNORE :=
$(PKG)_VERSION := 8.15.0
$(PKG)_CHECKSUM := 104153ba40373f9e12ff50c7c30f4f36f8970ed35edef4cead500d548a79a509
$(PKG)_CHECKSUM := d33f81c6ab4bd1faeedc36dc32f880b19e9d5ff69b502e59d175332dfb8f63f1
$(PKG)_PATCHES := $(realpath $(sort $(wildcard $(dir $(lastword $(MAKEFILE_LIST)))/patches/vips-[0-9]*.patch)))
$(PKG)_GH_CONF := libvips/libvips/releases,v,-rc2,,,.tar.xz
$(PKG)_GH_CONF := libvips/libvips/releases,v,,,,.tar.xz
$(PKG)_SUBDIR := vips-$($(PKG)_VERSION)
$(PKG)_FILE := vips-$($(PKG)_VERSION).tar.xz
$(PKG)_DEPS := cc meson-wrapper libwebp librsvg glib pango libarchive \
Expand Down

0 comments on commit 43cef13

Please sign in to comment.