diff --git a/docker/test-base/patches/libc+armv5te-unknown-linux-uclibceabi.diff b/docker/test-base/patches/libc+armv5te-unknown-linux-uclibceabi.diff index 92ed8bb..87a1e0e 100644 --- a/docker/test-base/patches/libc+armv5te-unknown-linux-uclibceabi.diff +++ b/docker/test-base/patches/libc+armv5te-unknown-linux-uclibceabi.diff @@ -1,70 +1,70 @@ diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs -index 4afb98e95..67d5ba1b3 100644 +index 48b03e9ee..3df2f7b3c 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -107,6 +107,68 @@ struct siginfo_si_value { } } -+cfg_if! { -+ if #[cfg(libc_union)] { -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ struct sifields_sigchld { -+ si_pid: ::pid_t, -+ si_uid: ::uid_t, -+ si_status: ::c_int, -+ si_utime: ::c_long, -+ si_stime: ::c_long, -+ } -+ impl ::Copy for sifields_sigchld {} -+ impl ::Clone for sifields_sigchld { -+ fn clone(&self) -> sifields_sigchld { -+ *self -+ } -+ } ++extern "C" { ++ pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; ++} ++ ++// Internal, for casts to access union fields ++#[repr(C)] ++struct sifields_sigchld { ++ si_pid: ::pid_t, ++ si_uid: ::uid_t, ++ si_status: ::c_int, ++ si_utime: ::c_long, ++ si_stime: ::c_long, ++} ++impl ::Copy for sifields_sigchld {} ++impl ::Clone for sifields_sigchld { ++ fn clone(&self) -> sifields_sigchld { ++ *self ++ } ++} + -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ union sifields { -+ _align_pointer: *mut ::c_void, -+ sigchld: sifields_sigchld, -+ } ++// Internal, for casts to access union fields ++#[repr(C)] ++union sifields { ++ _align_pointer: *mut ::c_void, ++ sigchld: sifields_sigchld, ++} + -+ // Internal, for casts to access union fields. Note that some variants -+ // of sifields start with a pointer, which makes the alignment of -+ // sifields vary on 32-bit and 64-bit architectures. -+ #[repr(C)] -+ struct siginfo_f { -+ _siginfo_base: [::c_int; 3], -+ sifields: sifields, -+ } ++// Internal, for casts to access union fields. Note that some variants ++// of sifields start with a pointer, which makes the alignment of ++// sifields vary on 32-bit and 64-bit architectures. ++#[repr(C)] ++struct siginfo_f { ++ _siginfo_base: [::c_int; 3], ++ sifields: sifields, ++} + -+ impl siginfo_t { -+ unsafe fn sifields(&self) -> &sifields { -+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields -+ } ++impl siginfo_t { ++ unsafe fn sifields(&self) -> &sifields { ++ &(*(self as *const siginfo_t as *const siginfo_f)).sifields ++ } + -+ pub unsafe fn si_pid(&self) -> ::pid_t { -+ self.sifields().sigchld.si_pid -+ } ++ pub unsafe fn si_pid(&self) -> ::pid_t { ++ self.sifields().sigchld.si_pid ++ } + -+ pub unsafe fn si_uid(&self) -> ::uid_t { -+ self.sifields().sigchld.si_uid -+ } ++ pub unsafe fn si_uid(&self) -> ::uid_t { ++ self.sifields().sigchld.si_uid ++ } + -+ pub unsafe fn si_status(&self) -> ::c_int { -+ self.sifields().sigchld.si_status -+ } ++ pub unsafe fn si_status(&self) -> ::c_int { ++ self.sifields().sigchld.si_status ++ } + -+ pub unsafe fn si_utime(&self) -> ::c_long { -+ self.sifields().sigchld.si_utime -+ } ++ pub unsafe fn si_utime(&self) -> ::c_long { ++ self.sifields().sigchld.si_utime ++ } + -+ pub unsafe fn si_stime(&self) -> ::c_long { -+ self.sifields().sigchld.si_stime -+ } -+ } ++ pub unsafe fn si_stime(&self) -> ::c_long { ++ self.sifields().sigchld.si_stime + } +} + diff --git a/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabi.diff b/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabi.diff index 92ed8bb..87a1e0e 100644 --- a/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabi.diff +++ b/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabi.diff @@ -1,70 +1,70 @@ diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs -index 4afb98e95..67d5ba1b3 100644 +index 48b03e9ee..3df2f7b3c 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -107,6 +107,68 @@ struct siginfo_si_value { } } -+cfg_if! { -+ if #[cfg(libc_union)] { -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ struct sifields_sigchld { -+ si_pid: ::pid_t, -+ si_uid: ::uid_t, -+ si_status: ::c_int, -+ si_utime: ::c_long, -+ si_stime: ::c_long, -+ } -+ impl ::Copy for sifields_sigchld {} -+ impl ::Clone for sifields_sigchld { -+ fn clone(&self) -> sifields_sigchld { -+ *self -+ } -+ } ++extern "C" { ++ pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; ++} ++ ++// Internal, for casts to access union fields ++#[repr(C)] ++struct sifields_sigchld { ++ si_pid: ::pid_t, ++ si_uid: ::uid_t, ++ si_status: ::c_int, ++ si_utime: ::c_long, ++ si_stime: ::c_long, ++} ++impl ::Copy for sifields_sigchld {} ++impl ::Clone for sifields_sigchld { ++ fn clone(&self) -> sifields_sigchld { ++ *self ++ } ++} + -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ union sifields { -+ _align_pointer: *mut ::c_void, -+ sigchld: sifields_sigchld, -+ } ++// Internal, for casts to access union fields ++#[repr(C)] ++union sifields { ++ _align_pointer: *mut ::c_void, ++ sigchld: sifields_sigchld, ++} + -+ // Internal, for casts to access union fields. Note that some variants -+ // of sifields start with a pointer, which makes the alignment of -+ // sifields vary on 32-bit and 64-bit architectures. -+ #[repr(C)] -+ struct siginfo_f { -+ _siginfo_base: [::c_int; 3], -+ sifields: sifields, -+ } ++// Internal, for casts to access union fields. Note that some variants ++// of sifields start with a pointer, which makes the alignment of ++// sifields vary on 32-bit and 64-bit architectures. ++#[repr(C)] ++struct siginfo_f { ++ _siginfo_base: [::c_int; 3], ++ sifields: sifields, ++} + -+ impl siginfo_t { -+ unsafe fn sifields(&self) -> &sifields { -+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields -+ } ++impl siginfo_t { ++ unsafe fn sifields(&self) -> &sifields { ++ &(*(self as *const siginfo_t as *const siginfo_f)).sifields ++ } + -+ pub unsafe fn si_pid(&self) -> ::pid_t { -+ self.sifields().sigchld.si_pid -+ } ++ pub unsafe fn si_pid(&self) -> ::pid_t { ++ self.sifields().sigchld.si_pid ++ } + -+ pub unsafe fn si_uid(&self) -> ::uid_t { -+ self.sifields().sigchld.si_uid -+ } ++ pub unsafe fn si_uid(&self) -> ::uid_t { ++ self.sifields().sigchld.si_uid ++ } + -+ pub unsafe fn si_status(&self) -> ::c_int { -+ self.sifields().sigchld.si_status -+ } ++ pub unsafe fn si_status(&self) -> ::c_int { ++ self.sifields().sigchld.si_status ++ } + -+ pub unsafe fn si_utime(&self) -> ::c_long { -+ self.sifields().sigchld.si_utime -+ } ++ pub unsafe fn si_utime(&self) -> ::c_long { ++ self.sifields().sigchld.si_utime ++ } + -+ pub unsafe fn si_stime(&self) -> ::c_long { -+ self.sifields().sigchld.si_stime -+ } -+ } ++ pub unsafe fn si_stime(&self) -> ::c_long { ++ self.sifields().sigchld.si_stime + } +} + diff --git a/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabihf.diff b/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabihf.diff index 92ed8bb..87a1e0e 100644 --- a/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabihf.diff +++ b/docker/test-base/patches/libc+armv7-unknown-linux-uclibceabihf.diff @@ -1,70 +1,70 @@ diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs -index 4afb98e95..67d5ba1b3 100644 +index 48b03e9ee..3df2f7b3c 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -107,6 +107,68 @@ struct siginfo_si_value { } } -+cfg_if! { -+ if #[cfg(libc_union)] { -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ struct sifields_sigchld { -+ si_pid: ::pid_t, -+ si_uid: ::uid_t, -+ si_status: ::c_int, -+ si_utime: ::c_long, -+ si_stime: ::c_long, -+ } -+ impl ::Copy for sifields_sigchld {} -+ impl ::Clone for sifields_sigchld { -+ fn clone(&self) -> sifields_sigchld { -+ *self -+ } -+ } ++extern "C" { ++ pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; ++} ++ ++// Internal, for casts to access union fields ++#[repr(C)] ++struct sifields_sigchld { ++ si_pid: ::pid_t, ++ si_uid: ::uid_t, ++ si_status: ::c_int, ++ si_utime: ::c_long, ++ si_stime: ::c_long, ++} ++impl ::Copy for sifields_sigchld {} ++impl ::Clone for sifields_sigchld { ++ fn clone(&self) -> sifields_sigchld { ++ *self ++ } ++} + -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ union sifields { -+ _align_pointer: *mut ::c_void, -+ sigchld: sifields_sigchld, -+ } ++// Internal, for casts to access union fields ++#[repr(C)] ++union sifields { ++ _align_pointer: *mut ::c_void, ++ sigchld: sifields_sigchld, ++} + -+ // Internal, for casts to access union fields. Note that some variants -+ // of sifields start with a pointer, which makes the alignment of -+ // sifields vary on 32-bit and 64-bit architectures. -+ #[repr(C)] -+ struct siginfo_f { -+ _siginfo_base: [::c_int; 3], -+ sifields: sifields, -+ } ++// Internal, for casts to access union fields. Note that some variants ++// of sifields start with a pointer, which makes the alignment of ++// sifields vary on 32-bit and 64-bit architectures. ++#[repr(C)] ++struct siginfo_f { ++ _siginfo_base: [::c_int; 3], ++ sifields: sifields, ++} + -+ impl siginfo_t { -+ unsafe fn sifields(&self) -> &sifields { -+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields -+ } ++impl siginfo_t { ++ unsafe fn sifields(&self) -> &sifields { ++ &(*(self as *const siginfo_t as *const siginfo_f)).sifields ++ } + -+ pub unsafe fn si_pid(&self) -> ::pid_t { -+ self.sifields().sigchld.si_pid -+ } ++ pub unsafe fn si_pid(&self) -> ::pid_t { ++ self.sifields().sigchld.si_pid ++ } + -+ pub unsafe fn si_uid(&self) -> ::uid_t { -+ self.sifields().sigchld.si_uid -+ } ++ pub unsafe fn si_uid(&self) -> ::uid_t { ++ self.sifields().sigchld.si_uid ++ } + -+ pub unsafe fn si_status(&self) -> ::c_int { -+ self.sifields().sigchld.si_status -+ } ++ pub unsafe fn si_status(&self) -> ::c_int { ++ self.sifields().sigchld.si_status ++ } + -+ pub unsafe fn si_utime(&self) -> ::c_long { -+ self.sifields().sigchld.si_utime -+ } ++ pub unsafe fn si_utime(&self) -> ::c_long { ++ self.sifields().sigchld.si_utime ++ } + -+ pub unsafe fn si_stime(&self) -> ::c_long { -+ self.sifields().sigchld.si_stime -+ } -+ } ++ pub unsafe fn si_stime(&self) -> ::c_long { ++ self.sifields().sigchld.si_stime + } +} + diff --git a/docker/test-base/patches/libc+mips-unknown-linux-uclibc.diff b/docker/test-base/patches/libc+mips-unknown-linux-uclibc.diff index 92ed8bb..87a1e0e 100644 --- a/docker/test-base/patches/libc+mips-unknown-linux-uclibc.diff +++ b/docker/test-base/patches/libc+mips-unknown-linux-uclibc.diff @@ -1,70 +1,70 @@ diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs -index 4afb98e95..67d5ba1b3 100644 +index 48b03e9ee..3df2f7b3c 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -107,6 +107,68 @@ struct siginfo_si_value { } } -+cfg_if! { -+ if #[cfg(libc_union)] { -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ struct sifields_sigchld { -+ si_pid: ::pid_t, -+ si_uid: ::uid_t, -+ si_status: ::c_int, -+ si_utime: ::c_long, -+ si_stime: ::c_long, -+ } -+ impl ::Copy for sifields_sigchld {} -+ impl ::Clone for sifields_sigchld { -+ fn clone(&self) -> sifields_sigchld { -+ *self -+ } -+ } ++extern "C" { ++ pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; ++} ++ ++// Internal, for casts to access union fields ++#[repr(C)] ++struct sifields_sigchld { ++ si_pid: ::pid_t, ++ si_uid: ::uid_t, ++ si_status: ::c_int, ++ si_utime: ::c_long, ++ si_stime: ::c_long, ++} ++impl ::Copy for sifields_sigchld {} ++impl ::Clone for sifields_sigchld { ++ fn clone(&self) -> sifields_sigchld { ++ *self ++ } ++} + -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ union sifields { -+ _align_pointer: *mut ::c_void, -+ sigchld: sifields_sigchld, -+ } ++// Internal, for casts to access union fields ++#[repr(C)] ++union sifields { ++ _align_pointer: *mut ::c_void, ++ sigchld: sifields_sigchld, ++} + -+ // Internal, for casts to access union fields. Note that some variants -+ // of sifields start with a pointer, which makes the alignment of -+ // sifields vary on 32-bit and 64-bit architectures. -+ #[repr(C)] -+ struct siginfo_f { -+ _siginfo_base: [::c_int; 3], -+ sifields: sifields, -+ } ++// Internal, for casts to access union fields. Note that some variants ++// of sifields start with a pointer, which makes the alignment of ++// sifields vary on 32-bit and 64-bit architectures. ++#[repr(C)] ++struct siginfo_f { ++ _siginfo_base: [::c_int; 3], ++ sifields: sifields, ++} + -+ impl siginfo_t { -+ unsafe fn sifields(&self) -> &sifields { -+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields -+ } ++impl siginfo_t { ++ unsafe fn sifields(&self) -> &sifields { ++ &(*(self as *const siginfo_t as *const siginfo_f)).sifields ++ } + -+ pub unsafe fn si_pid(&self) -> ::pid_t { -+ self.sifields().sigchld.si_pid -+ } ++ pub unsafe fn si_pid(&self) -> ::pid_t { ++ self.sifields().sigchld.si_pid ++ } + -+ pub unsafe fn si_uid(&self) -> ::uid_t { -+ self.sifields().sigchld.si_uid -+ } ++ pub unsafe fn si_uid(&self) -> ::uid_t { ++ self.sifields().sigchld.si_uid ++ } + -+ pub unsafe fn si_status(&self) -> ::c_int { -+ self.sifields().sigchld.si_status -+ } ++ pub unsafe fn si_status(&self) -> ::c_int { ++ self.sifields().sigchld.si_status ++ } + -+ pub unsafe fn si_utime(&self) -> ::c_long { -+ self.sifields().sigchld.si_utime -+ } ++ pub unsafe fn si_utime(&self) -> ::c_long { ++ self.sifields().sigchld.si_utime ++ } + -+ pub unsafe fn si_stime(&self) -> ::c_long { -+ self.sifields().sigchld.si_stime -+ } -+ } ++ pub unsafe fn si_stime(&self) -> ::c_long { ++ self.sifields().sigchld.si_stime + } +} + diff --git a/docker/test-base/patches/libc+mipsel-unknown-linux-uclibc.diff b/docker/test-base/patches/libc+mipsel-unknown-linux-uclibc.diff index 92ed8bb..87a1e0e 100644 --- a/docker/test-base/patches/libc+mipsel-unknown-linux-uclibc.diff +++ b/docker/test-base/patches/libc+mipsel-unknown-linux-uclibc.diff @@ -1,70 +1,70 @@ diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs -index 4afb98e95..67d5ba1b3 100644 +index 48b03e9ee..3df2f7b3c 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -107,6 +107,68 @@ struct siginfo_si_value { } } -+cfg_if! { -+ if #[cfg(libc_union)] { -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ struct sifields_sigchld { -+ si_pid: ::pid_t, -+ si_uid: ::uid_t, -+ si_status: ::c_int, -+ si_utime: ::c_long, -+ si_stime: ::c_long, -+ } -+ impl ::Copy for sifields_sigchld {} -+ impl ::Clone for sifields_sigchld { -+ fn clone(&self) -> sifields_sigchld { -+ *self -+ } -+ } ++extern "C" { ++ pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; ++} ++ ++// Internal, for casts to access union fields ++#[repr(C)] ++struct sifields_sigchld { ++ si_pid: ::pid_t, ++ si_uid: ::uid_t, ++ si_status: ::c_int, ++ si_utime: ::c_long, ++ si_stime: ::c_long, ++} ++impl ::Copy for sifields_sigchld {} ++impl ::Clone for sifields_sigchld { ++ fn clone(&self) -> sifields_sigchld { ++ *self ++ } ++} + -+ // Internal, for casts to access union fields -+ #[repr(C)] -+ union sifields { -+ _align_pointer: *mut ::c_void, -+ sigchld: sifields_sigchld, -+ } ++// Internal, for casts to access union fields ++#[repr(C)] ++union sifields { ++ _align_pointer: *mut ::c_void, ++ sigchld: sifields_sigchld, ++} + -+ // Internal, for casts to access union fields. Note that some variants -+ // of sifields start with a pointer, which makes the alignment of -+ // sifields vary on 32-bit and 64-bit architectures. -+ #[repr(C)] -+ struct siginfo_f { -+ _siginfo_base: [::c_int; 3], -+ sifields: sifields, -+ } ++// Internal, for casts to access union fields. Note that some variants ++// of sifields start with a pointer, which makes the alignment of ++// sifields vary on 32-bit and 64-bit architectures. ++#[repr(C)] ++struct siginfo_f { ++ _siginfo_base: [::c_int; 3], ++ sifields: sifields, ++} + -+ impl siginfo_t { -+ unsafe fn sifields(&self) -> &sifields { -+ &(*(self as *const siginfo_t as *const siginfo_f)).sifields -+ } ++impl siginfo_t { ++ unsafe fn sifields(&self) -> &sifields { ++ &(*(self as *const siginfo_t as *const siginfo_f)).sifields ++ } + -+ pub unsafe fn si_pid(&self) -> ::pid_t { -+ self.sifields().sigchld.si_pid -+ } ++ pub unsafe fn si_pid(&self) -> ::pid_t { ++ self.sifields().sigchld.si_pid ++ } + -+ pub unsafe fn si_uid(&self) -> ::uid_t { -+ self.sifields().sigchld.si_uid -+ } ++ pub unsafe fn si_uid(&self) -> ::uid_t { ++ self.sifields().sigchld.si_uid ++ } + -+ pub unsafe fn si_status(&self) -> ::c_int { -+ self.sifields().sigchld.si_status -+ } ++ pub unsafe fn si_status(&self) -> ::c_int { ++ self.sifields().sigchld.si_status ++ } + -+ pub unsafe fn si_utime(&self) -> ::c_long { -+ self.sifields().sigchld.si_utime -+ } ++ pub unsafe fn si_utime(&self) -> ::c_long { ++ self.sifields().sigchld.si_utime ++ } + -+ pub unsafe fn si_stime(&self) -> ::c_long { -+ self.sifields().sigchld.si_stime -+ } -+ } ++ pub unsafe fn si_stime(&self) -> ::c_long { ++ self.sifields().sigchld.si_stime + } +} + diff --git a/docker/test-base/patches/std+armv5te-unknown-linux-uclibceabi.diff b/docker/test-base/patches/std+armv5te-unknown-linux-uclibceabi.diff new file mode 100644 index 0000000..c2d9bbc --- /dev/null +++ b/docker/test-base/patches/std+armv5te-unknown-linux-uclibceabi.diff @@ -0,0 +1,14 @@ +diff --git a/src/sys/pal/unix/stack_overflow.rs b/src/sys/pal/unix/stack_overflow.rs +index 78a5990..1b875e5 100644 +--- a/src/sys/pal/unix/stack_overflow.rs ++++ b/src/sys/pal/unix/stack_overflow.rs +@@ -213,6 +213,9 @@ pub unsafe fn drop_handler(data: *mut libc::c_void) { + fn sigstack_size() -> usize { + // FIXME: reuse const from libc when available? + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; ++ #[cfg(target_env = "uclibc")] ++ let dynamic_sigstksz: crate::ffi::c_ulong = 0; ++ #[cfg(not(target_env = "uclibc"))] + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval. diff --git a/docker/test-base/patches/std+armv7-unknown-linux-uclibceabi.diff b/docker/test-base/patches/std+armv7-unknown-linux-uclibceabi.diff new file mode 100644 index 0000000..c2d9bbc --- /dev/null +++ b/docker/test-base/patches/std+armv7-unknown-linux-uclibceabi.diff @@ -0,0 +1,14 @@ +diff --git a/src/sys/pal/unix/stack_overflow.rs b/src/sys/pal/unix/stack_overflow.rs +index 78a5990..1b875e5 100644 +--- a/src/sys/pal/unix/stack_overflow.rs ++++ b/src/sys/pal/unix/stack_overflow.rs +@@ -213,6 +213,9 @@ pub unsafe fn drop_handler(data: *mut libc::c_void) { + fn sigstack_size() -> usize { + // FIXME: reuse const from libc when available? + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; ++ #[cfg(target_env = "uclibc")] ++ let dynamic_sigstksz: crate::ffi::c_ulong = 0; ++ #[cfg(not(target_env = "uclibc"))] + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval. diff --git a/docker/test-base/patches/std+armv7-unknown-linux-uclibceabihf.diff b/docker/test-base/patches/std+armv7-unknown-linux-uclibceabihf.diff new file mode 100644 index 0000000..c2d9bbc --- /dev/null +++ b/docker/test-base/patches/std+armv7-unknown-linux-uclibceabihf.diff @@ -0,0 +1,14 @@ +diff --git a/src/sys/pal/unix/stack_overflow.rs b/src/sys/pal/unix/stack_overflow.rs +index 78a5990..1b875e5 100644 +--- a/src/sys/pal/unix/stack_overflow.rs ++++ b/src/sys/pal/unix/stack_overflow.rs +@@ -213,6 +213,9 @@ pub unsafe fn drop_handler(data: *mut libc::c_void) { + fn sigstack_size() -> usize { + // FIXME: reuse const from libc when available? + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; ++ #[cfg(target_env = "uclibc")] ++ let dynamic_sigstksz: crate::ffi::c_ulong = 0; ++ #[cfg(not(target_env = "uclibc"))] + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval. diff --git a/docker/test-base/patches/std+mips-unknown-linux-uclibc.diff b/docker/test-base/patches/std+mips-unknown-linux-uclibc.diff new file mode 100644 index 0000000..c2d9bbc --- /dev/null +++ b/docker/test-base/patches/std+mips-unknown-linux-uclibc.diff @@ -0,0 +1,14 @@ +diff --git a/src/sys/pal/unix/stack_overflow.rs b/src/sys/pal/unix/stack_overflow.rs +index 78a5990..1b875e5 100644 +--- a/src/sys/pal/unix/stack_overflow.rs ++++ b/src/sys/pal/unix/stack_overflow.rs +@@ -213,6 +213,9 @@ pub unsafe fn drop_handler(data: *mut libc::c_void) { + fn sigstack_size() -> usize { + // FIXME: reuse const from libc when available? + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; ++ #[cfg(target_env = "uclibc")] ++ let dynamic_sigstksz: crate::ffi::c_ulong = 0; ++ #[cfg(not(target_env = "uclibc"))] + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval. diff --git a/docker/test-base/patches/std+mipsel-unknown-linux-uclibc.diff b/docker/test-base/patches/std+mipsel-unknown-linux-uclibc.diff new file mode 100644 index 0000000..c2d9bbc --- /dev/null +++ b/docker/test-base/patches/std+mipsel-unknown-linux-uclibc.diff @@ -0,0 +1,14 @@ +diff --git a/src/sys/pal/unix/stack_overflow.rs b/src/sys/pal/unix/stack_overflow.rs +index 78a5990..1b875e5 100644 +--- a/src/sys/pal/unix/stack_overflow.rs ++++ b/src/sys/pal/unix/stack_overflow.rs +@@ -213,6 +213,9 @@ pub unsafe fn drop_handler(data: *mut libc::c_void) { + fn sigstack_size() -> usize { + // FIXME: reuse const from libc when available? + const AT_MINSIGSTKSZ: crate::ffi::c_ulong = 51; ++ #[cfg(target_env = "uclibc")] ++ let dynamic_sigstksz: crate::ffi::c_ulong = 0; ++ #[cfg(not(target_env = "uclibc"))] + let dynamic_sigstksz = unsafe { libc::getauxval(AT_MINSIGSTKSZ) }; + // If getauxval couldn't find the entry, it returns 0, + // so take the higher of the "constant" and auxval.