From nobody Wed Apr 19 10:43:35 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q1cpJ3Zbmz45JlT; Wed, 19 Apr 2023 10:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q1cpH5wMRz3rNm; Wed, 19 Apr 2023 10:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681901015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmNC2+PV5iz1EQm3DwNKJp4/0fq4a5a6u4yEGYYdJO8=; b=R6lunplhuhURTMVapaJR7eRTmN59YaGYYl4wZb0QnWyfziuwRTN0ZCRu6OHbHOmG3L0Q86 XqM/reB9fkC7KSRBdm4XKHrWyAziDEmfff9db6N2QxafKWYQ1PEjyBpdV9z2QPtCXWr6xn /E9ZPvbLlItqFo7qsz7DfwjLRyao0Mspb7lnj1evnhiqZl1lxykV9cnXuXLTgOaueh3Xxg Wjp22DDeOqF8pQWML3mHllHbh+eijYzBYORDXa2XQKIPJk9RoRXjO0LdnBAobAU92DsQFO fCNx0NxJprYlDKOdwoM6TAxw4gN6L5l/5nQnWJlMwLCx0ca0hoskH/AnZQFArA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681901015; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XmNC2+PV5iz1EQm3DwNKJp4/0fq4a5a6u4yEGYYdJO8=; b=W1tMGw0UVfMrK7qJrQXb+MAVvlmkfqunpLnGzln8JxXKQUTjCLgrFHaXlmxvswu9DvrpRV 7JAJaj4aicM4QwzSE9hmoz4/vlBUvXSmhYBw7VMLeREDxi3h45zsQxN7lE8X5L1AmEsl4n UhItWo/q7vzAs0CIMxSD5MIL131bxPVym3yvAWKg7U44ifOQiE8RN4+6R1/cZE/8Cw7Lq3 7gEAcweCZBP2X0+7UCb0BMfTm0XzSyJU9JIVRTwb3Hvb9hp7KmqBV9c7I6j3nkQoNuMcbB E4UqgpQxIxcxahi8Qf8PRBueOzJHkN4G3tDR6se5esstojMlS/CXMchGZ6FqSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681901015; a=rsa-sha256; cv=none; b=T56vSMxZZL/rb7h1GUdt4xkkl4Cq73mhEgTkGqSejvzvPY+3BbrXshcRAqU+1I3Tts1CuG cRqBvJJrr2guBQQyPsgQ4Aj1DRedElTeTCCIE2pcgz3DqUFLKSCfgOQ3mD5472p/IHPh6d itD9A1T+agDlp2TXkE623kUGhCPde8buWu7Y7D921YnOTgJTJu2Dopr5ab6unKQ91RX7hG uH7BKjV8LMuFo3dSKyoXskrYLvFuzLuupxUmIkDFjBpLeAkpiK/VQhoc6EDnbcZYco5D0d E+ryEyC9uTxGW3QVqPYbvPuxAivgCWjQJRkezwP+2fqU3joXKw4ZspbwCCUJ9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Q1cpH50DJzrV4; Wed, 19 Apr 2023 10:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33JAhZkQ029994; Wed, 19 Apr 2023 10:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33JAhZ1Z029993; Wed, 19 Apr 2023 10:43:35 GMT (envelope-from git) Date: Wed, 19 Apr 2023 10:43:35 GMT Message-Id: <202304191043.33JAhZ1Z029993@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Jan Beich Subject: git: 590d0f796c28 - 2023Q2 - games/veloren-weekly: unbreak build on i386 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/2023Q2 X-Git-Reftype: branch X-Git-Commit: 590d0f796c288877d94c087bd9b1b552b3ab7be0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2023Q2 has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=590d0f796c288877d94c087bd9b1b552b3ab7be0 commit 590d0f796c288877d94c087bd9b1b552b3ab7be0 Author: Jan Beich AuthorDate: 2023-04-18 23:40:34 +0000 Commit: Jan Beich CommitDate: 2023-04-19 10:43:30 +0000 games/veloren-weekly: unbreak build on i386 (cherry picked from commit 6f656934f1aac9adb640591967820bf67578a9ca) --- games/veloren-weekly/Makefile | 2 +- games/veloren-weekly/files/patch-z-i386 | 233 ++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+), 1 deletion(-) diff --git a/games/veloren-weekly/Makefile b/games/veloren-weekly/Makefile index c27dcdb84e97..68087eb017b9 100644 --- a/games/veloren-weekly/Makefile +++ b/games/veloren-weekly/Makefile @@ -13,7 +13,7 @@ WWW= https://veloren.net/ LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE -ONLY_FOR_ARCHS= aarch64 amd64 +ONLY_FOR_ARCHS= aarch64 amd64 i386 # https://gitlab.com/veloren/veloren/-/issues/1006 ONLY_FOR_ARCHS_REASON= unsupported platform by https://github.com/wasmerio/wasmer diff --git a/games/veloren-weekly/files/patch-z-i386 b/games/veloren-weekly/files/patch-z-i386 new file mode 100644 index 000000000000..9d86b1945286 --- /dev/null +++ b/games/veloren-weekly/files/patch-z-i386 @@ -0,0 +1,233 @@ +https://github.com/rust-lang/libc/pull/3202 +https://github.com/wasmerio/wasmer/pull/3782 + +error[E0308]: mismatched types + --> rtsim/src/gen/mod.rs:30:43 + | +30 | let mut rng = SmallRng::from_seed(seed); + | ------------------- ^^^^ expected an array with a fixed size of 16 elements, found one with 32 elements + | | + | arguments to this function are incorrect + | +note: associated function defined here + --> cargo-crates/rand_core-0.6.4/src/lib.rs:319:8 + | +319 | fn from_seed(seed: Self::Seed) -> Self; + | ^^^^^^^^^ + +--- cargo-crates/libc-0.2.133/src/unix/bsd/freebsdlike/freebsd/x86.rs.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/libc-0.2.133/src/unix/bsd/freebsdlike/freebsd/x86.rs +@@ -6,6 +6,41 @@ pub type register_t = i32; + pub type suseconds_t = i32; + pub type register_t = i32; + ++s_no_extra_traits! { ++ pub struct mcontext_t { ++ pub mc_onstack: register_t, ++ pub mc_gs: register_t, ++ pub mc_fs: register_t, ++ pub mc_es: register_t, ++ pub mc_ds: register_t, ++ pub mc_edi: register_t, ++ pub mc_esi: register_t, ++ pub mc_ebp: register_t, ++ pub mc_isp: register_t, ++ pub mc_ebx: register_t, ++ pub mc_edx: register_t, ++ pub mc_ecx: register_t, ++ pub mc_eax: register_t, ++ pub mc_trapno: register_t, ++ pub mc_err: register_t, ++ pub mc_eip: register_t, ++ pub mc_cs: register_t, ++ pub mc_eflags: register_t, ++ pub mc_esp: register_t, ++ pub mc_ss: register_t, ++ pub mc_len: ::c_int, ++ pub mc_fpformat: ::c_int, ++ pub mc_ownedfp: ::c_int, ++ pub mc_flags: register_t, ++ pub mc_fpstate: [[::c_int; 32]; 4], ++ pub mc_fsbase: register_t, ++ pub mc_gsbase: register_t, ++ pub mc_xfpustate: register_t, ++ pub mc_xfpustate_len: register_t, ++ pub mc_spare2: [::c_int; 4], ++ } ++} ++ + s! { + pub struct stat { + pub st_dev: ::dev_t, +@@ -31,6 +66,15 @@ s! { + pub st_birthtime_nsec: ::c_long, + __unused: [u8; 8], + } ++ ++ pub struct ucontext_t { ++ pub uc_sigmask: ::sigset_t, ++ pub uc_mcontext: ::mcontext_t, ++ pub uc_link: *mut ::ucontext_t, ++ pub uc_stack: ::stack_t, ++ pub uc_flags: ::c_int, ++ __spare__: [::c_int; 4], ++ } + } + + // should be pub(crate), but that requires Rust 1.18.0 +@@ -43,4 +87,115 @@ cfg_if! { + pub const _ALIGNBYTES: usize = 4 - 1; + } + } ++ ++cfg_if! { ++ if #[cfg(feature = "extra_traits")] { ++ impl PartialEq for mcontext_t { ++ fn eq(&self, other: &mcontext_t) -> bool { ++ self.mc_onstack == other.mc_onstack && ++ self.mc_gs == other.mc_gs && ++ self.mc_fs == other.mc_fs && ++ self.mc_es == other.mc_es && ++ self.mc_ds == other.mc_ds && ++ self.mc_edi == other.mc_edi && ++ self.mc_esi == other.mc_esi && ++ self.mc_ebp == other.mc_ebp && ++ self.mc_isp == other.mc_isp && ++ self.mc_ebx == other.mc_ebx && ++ self.mc_edx == other.mc_edx && ++ self.mc_ecx == other.mc_ecx && ++ self.mc_eax == other.mc_eax && ++ self.mc_trapno == other.mc_trapno && ++ self.mc_err == other.mc_err && ++ self.mc_eip == other.mc_eip && ++ self.mc_cs == other.mc_cs && ++ self.mc_eflags == other.mc_eflags && ++ self.mc_esp == other.mc_esp && ++ self.mc_ss == other.mc_ss && ++ self.mc_len == other.mc_len && ++ self.mc_fpformat == other.mc_fpformat && ++ self.mc_ownedfp == other.mc_ownedfp && ++ self.mc_flags == other.mc_flags && ++ self.mc_fpstate.iter().zip(other.mc_fpstate.iter()).all(|(a, b)| a == b) && ++ self.mc_fsbase == other.mc_fsbase && ++ self.mc_gsbase == other.mc_gsbase && ++ self.mc_xfpustate == other.mc_xfpustate && ++ self.mc_xfpustate_len == other.mc_xfpustate_len && ++ self.mc_spare2.iter().zip(other.mc_spare2.iter()).all(|(a, b)| a == b) ++ } ++ } ++ impl Eq for mcontext_t {} ++ impl ::fmt::Debug for mcontext_t { ++ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { ++ f.debug_struct("mcontext_t") ++ .field("mc_onstack", &self.mc_onstack) ++ .field("mc_gs", &self.mc_gs) ++ .field("mc_fs", &self.mc_fs) ++ .field("mc_es", &self.mc_es) ++ .field("mc_ds", &self.mc_ds) ++ .field("mc_edi", &self.mc_edi) ++ .field("mc_esi", &self.mc_esi) ++ .field("mc_ebp", &self.mc_ebp) ++ .field("mc_isp", &self.mc_isp) ++ .field("mc_ebx", &self.mc_ebx) ++ .field("mc_edx", &self.mc_edx) ++ .field("mc_ecx", &self.mc_ecx) ++ .field("mc_eax", &self.mc_eax) ++ .field("mc_trapno", &self.mc_trapno) ++ .field("mc_err", &self.mc_err) ++ .field("mc_eip", &self.mc_eip) ++ .field("mc_cs", &self.mc_cs) ++ .field("mc_eflags", &self.mc_eflags) ++ .field("mc_esp", &self.mc_esp) ++ .field("mc_ss", &self.mc_ss) ++ .field("mc_len", &self.mc_len) ++ .field("mc_fpformat", &self.mc_fpformat) ++ .field("mc_ownedfp", &self.mc_ownedfp) ++ .field("mc_flags", &self.mc_flags) ++ .field("mc_fpstate", &self.mc_fpstate) ++ .field("mc_fsbase", &self.mc_fsbase) ++ .field("mc_gsbase", &self.mc_gsbase) ++ .field("mc_xfpustate", &self.mc_xfpustate) ++ .field("mc_xfpustate_len", &self.mc_xfpustate_len) ++ .field("mc_spare2", &self.mc_spare2) ++ .finish() ++ } ++ } ++ impl ::hash::Hash for mcontext_t { ++ fn hash(&self, state: &mut H) { ++ self.mc_onstack.hash(state); ++ self.mc_gs.hash(state); ++ self.mc_fs.hash(state); ++ self.mc_es.hash(state); ++ self.mc_ds.hash(state); ++ self.mc_edi.hash(state); ++ self.mc_esi.hash(state); ++ self.mc_ebp.hash(state); ++ self.mc_isp.hash(state); ++ self.mc_ebx.hash(state); ++ self.mc_edx.hash(state); ++ self.mc_ecx.hash(state); ++ self.mc_eax.hash(state); ++ self.mc_trapno.hash(state); ++ self.mc_err.hash(state); ++ self.mc_eip.hash(state); ++ self.mc_cs.hash(state); ++ self.mc_eflags.hash(state); ++ self.mc_esp.hash(state); ++ self.mc_ss.hash(state); ++ self.mc_len.hash(state); ++ self.mc_fpformat.hash(state); ++ self.mc_ownedfp.hash(state); ++ self.mc_flags.hash(state); ++ self.mc_fpstate.hash(state); ++ self.mc_fsbase.hash(state); ++ self.mc_gsbase.hash(state); ++ self.mc_xfpustate.hash(state); ++ self.mc_xfpustate_len.hash(state); ++ self.mc_spare2.hash(state); ++ } ++ } ++ } ++} ++ + pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 +--- cargo-crates/wasmer-vm-2.3.0/src/trap/traphandlers.rs.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/wasmer-vm-2.3.0/src/trap/traphandlers.rs +@@ -271,7 +271,10 @@ cfg_if::cfg_if! { + ))] { + pc = context.uc_mcontext.gregs[libc::REG_EIP as usize] as usize; + sp = context.uc_mcontext.gregs[libc::REG_ESP as usize] as usize; +- } else if #[cfg(all(target_os = "freebsd", any(target_arch = "x86", target_arch = "x86_64")))] { ++ } else if #[cfg(all(target_os = "freebsd", target_arch = "x86"))] { ++ pc = context.uc_mcontext.mc_eip as usize; ++ sp = context.uc_mcontext.mc_esp as usize; ++ } else if #[cfg(all(target_os = "freebsd", target_arch = "x86_64"))] { + pc = context.uc_mcontext.mc_rip as usize; + sp = context.uc_mcontext.mc_rsp as usize; + } else if #[cfg(all(target_vendor = "apple", target_arch = "x86_64"))] { +@@ -337,6 +340,13 @@ cfg_if::cfg_if! { + (*context.uc_mcontext).__ss.__rbp = rbp; + (*context.uc_mcontext).__ss.__rdi = rdi; + (*context.uc_mcontext).__ss.__rsi = rsi; ++ } else if #[cfg(all(target_os = "freebsd", target_arch = "x86"))] { ++ let TrapHandlerRegs { eip, esp, ebp, ecx, edx } = regs; ++ context.uc_mcontext.mc_eip = eip as libc::register_t; ++ context.uc_mcontext.mc_esp = esp as libc::register_t; ++ context.uc_mcontext.mc_ebp = ebp as libc::register_t; ++ context.uc_mcontext.mc_ecx = ecx as libc::register_t; ++ context.uc_mcontext.mc_edx = edx as libc::register_t; + } else if #[cfg(all(target_os = "freebsd", target_arch = "x86_64"))] { + let TrapHandlerRegs { rip, rsp, rbp, rdi, rsi } = regs; + context.uc_mcontext.mc_rip = rip as libc::register_t; +--- rtsim/src/gen/mod.rs.orig 2023-04-14 03:41:36 UTC ++++ rtsim/src/gen/mod.rs +@@ -23,6 +23,9 @@ impl Data { + + impl Data { + pub fn generate(settings: &WorldSettings, world: &World, index: IndexRef) -> Self { ++#[cfg(target_pointer_width = "32")] ++ let mut seed = [0; 16]; ++#[cfg(not(target_pointer_width = "32"))] + let mut seed = [0; 32]; + seed.iter_mut() + .zip(&mut index.seed.to_le_bytes())