Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6659bae
semver: powerpc64le: Move glibc-only symbols into separate file
Gelbpunkt Jul 2, 2025
6811dc9
semver: powerpc64(le): Rename powerpc64le files to powerpc64
Gelbpunkt Jul 2, 2025
593aad1
musl: Fix definition of NCCS on powerpc(64)
Gelbpunkt Jul 2, 2025
26e4245
musl: powerpc64: Fix definition of MAP_LOCKED and MAP_NORESERVE
Gelbpunkt Jul 3, 2025
9fdb596
musl: powerpc64: Fix definition of EDEADLK
Gelbpunkt Jul 3, 2025
f70fefb
musl: powerpc(64): Decommonize termios definitions
Gelbpunkt Jul 3, 2025
e7ac5e5
musl: powerpc64: Decommonize definition of shmid_ds
Gelbpunkt Jul 3, 2025
080d5ae
triagebot: Add autolabels for PowerPC
tgross35 Jul 3, 2025
d790f18
musl: Clarify reason for CPU_SETSIZE value
Gelbpunkt Jul 2, 2025
a788f14
linux-musl-s390x: Remove bogus definition of RTLD_DEEPBIND
neuschaefer Jul 2, 2025
c68703d
linux-musl-s390x: Remove bogus definition of O_FSYNC
neuschaefer Jul 2, 2025
1b906fe
Add function getpeereid.
Jul 3, 2025
679799a
musl: mips64: Use special MIPS definition of statfs
Gelbpunkt Jul 4, 2025
f59c197
musl: mips64: Swap order of si_errno and si_code in siginfo_t
Gelbpunkt Jul 4, 2025
f42fee1
linux_like: mips64: Fix SI_TIMER, SI_MESGQ and SI_ASYNCIO definitions
Gelbpunkt Jul 4, 2025
8b72a5f
musl: mips64: Use special MIPS definition of stack_t
Gelbpunkt Jul 4, 2025
8b0de1d
ci: Update RUSTFLAGS to attempt to resolve cache issues
tgross35 Jul 7, 2025
a14fcb3
ci: Only build `core` with `-Zbuild-std`
tgross35 Jul 7, 2025
b56684c
libc-test: fix lint error
mbyx Jul 15, 2025
78baa91
build: Fix incorrect `target_os` -> `target_arch` check
tgross35 Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ jobs:
TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v4
# Remove `-Dwarnings` at the MSRV since lints may be different or buffier
- name: Update RUSTFLAGS
run: |
set -eux
[ "${{ matrix.toolchain }}" = "1.63.0" ] && echo 'RUSTFLAGS=' >> "$GITHUB_ENV" || true

- name: Setup Rust toolchain
run: ./ci/install-rust.sh

Expand All @@ -85,7 +79,11 @@ jobs:
run: du -sh target | sort -k 2 || true

- name: Execute build.sh
run: ./ci/verify-build.sh
run: |
set -eux
# Remove `-Dwarnings` at the MSRV since lints may be different
[ "${{ matrix.toolchain }}" = "1.63.0" ] && export RUSTFLAGS=""
./ci/verify-build.sh
- name: Target size after job completion
run: du -sh target | sort -k 2

Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fn main() {
let musl_v1_2_3 = env::var("RUST_LIBC_UNSTABLE_MUSL_V1_2_3").is_ok();
println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_MUSL_V1_2_3");
// loongarch64 and ohos have already updated
if musl_v1_2_3 || target_os == "loongarch64" || target_env == "ohos" {
if musl_v1_2_3 || target_arch == "loongarch64" || target_env == "ohos" {
// FIXME(musl): enable time64 api as well
set_cfg("musl_v1_2_3");
}
Expand Down
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if [ -n "${QEMU:-}" ]; then
cargo build \
--manifest-path libc-test/Cargo.toml \
--target "$target" \
--test main ${LIBC_CI_ZBUILD_STD+"-Zbuild-std"}
--test main ${LIBC_CI_ZBUILD_STD+"-Zbuild-std=core"}
rm "${CARGO_TARGET_DIR}/${target}"/debug/main-*.d
cp "${CARGO_TARGET_DIR}/${target}"/debug/main-* "${tmpdir}"/mount/libc-test
# shellcheck disable=SC2016
Expand Down
2 changes: 1 addition & 1 deletion ci/verify-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ test_target() {

if [ "${no_dist}" != "0" ]; then
# If we can't download a `core`, we need to build it
cmd="$cmd -Zbuild-std=core,alloc"
cmd="$cmd -Zbuild-std=core"

# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
RUSTFLAGS="${RUSTFLAGS:-} -Aimproper_ctypes_definitions"
Expand Down
5 changes: 4 additions & 1 deletion libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3580,7 +3580,7 @@ fn test_neutrino(target: &str) {
)
});

cfg.skip_static(move |name| (name == "__dso_handle"));
cfg.skip_static(move |name| name == "__dso_handle");

cfg.generate(src_hotfix_dir().join("lib.rs"), "main.rs");
}
Expand Down Expand Up @@ -5729,6 +5729,9 @@ fn test_aix(target: &str) {
// https://github.com/gnzlbg/ctest/issues/68.
"lio_listio" => true,

// The function is only available under macro _KERNEL in 'proto_uipc.h'.
"getpeereid" => true,

_ => false,
}
});
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/aix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,7 @@ getmntent
getnameinfo
getopt
getpagesize
getpeereid
getpeername
getpgid
getpgrp
Expand Down
14 changes: 14 additions & 0 deletions libc-test/semver/linux-gnu-powerpc64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
KEYCTL_CAPABILITIES
KEYCTL_CAPS0_BIG_KEY
KEYCTL_CAPS0_CAPABILITIES
KEYCTL_CAPS0_DIFFIE_HELLMAN
KEYCTL_CAPS0_INVALIDATE
KEYCTL_CAPS0_MOVE
KEYCTL_CAPS0_PERSISTENT_KEYRINGS
KEYCTL_CAPS0_PUBLIC_KEY
KEYCTL_CAPS0_RESTRICT_KEYRING
KEYCTL_CAPS1_NS_KEYRING_NAME
KEYCTL_CAPS1_NS_KEY_TAG
KEYCTL_MOVE
max_align_t
sysctl
19 changes: 0 additions & 19 deletions libc-test/semver/linux-powerpc64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,12 @@ B2500000
B3000000
B3500000
B4000000
Elf32_Rela
Elf64_Rela
KEYCTL_CAPABILITIES
KEYCTL_CAPS0_BIG_KEY
KEYCTL_CAPS0_CAPABILITIES
KEYCTL_CAPS0_DIFFIE_HELLMAN
KEYCTL_CAPS0_INVALIDATE
KEYCTL_CAPS0_MOVE
KEYCTL_CAPS0_PERSISTENT_KEYRINGS
KEYCTL_CAPS0_PUBLIC_KEY
KEYCTL_CAPS0_RESTRICT_KEYRING
KEYCTL_CAPS1_NS_KEYRING_NAME
KEYCTL_CAPS1_NS_KEY_TAG
KEYCTL_MOVE
MADV_SOFT_OFFLINE
MAP_SYNC
NFT_MSG_DELOBJ
NFT_MSG_GETOBJ
NFT_MSG_GETOBJ_RESET
NFT_MSG_NEWOBJ
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
SCM_TIMESTAMPNS
SCM_WIFI_STATUS
SIGSTKFLT
Expand Down Expand Up @@ -161,5 +144,3 @@ TIOCGRS485
TIOCSBRK
TIOCSRS485
flock64
max_align_t
sysctl
163 changes: 0 additions & 163 deletions libc-test/semver/linux-powerpc64le.txt

This file was deleted.

1 change: 1 addition & 0 deletions src/unix/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2949,6 +2949,7 @@ extern "C" {
flags: c_int,
) -> c_int;
pub fn getpagesize() -> c_int;
pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int;
pub fn getpriority(which: c_int, who: crate::id_t) -> c_int;
pub fn getpwent() -> *mut crate::passwd;
#[link_name = "_posix_getpwnam_r"]
Expand Down
11 changes: 11 additions & 0 deletions src/unix/linux_like/linux/musl/b32/powerpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ use crate::prelude::*;
pub type wchar_t = i32;

s! {
pub struct termios {
pub c_iflag: crate::tcflag_t,
pub c_oflag: crate::tcflag_t,
pub c_cflag: crate::tcflag_t,
pub c_lflag: crate::tcflag_t,
pub c_cc: [crate::cc_t; crate::NCCS],
pub c_line: crate::cc_t,
pub __c_ispeed: crate::speed_t,
pub __c_ospeed: crate::speed_t,
}

pub struct stat {
pub st_dev: crate::dev_t,
pub st_ino: crate::ino_t,
Expand Down
36 changes: 36 additions & 0 deletions src/unix/linux_like/linux/musl/b64/mips64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ s! {
__pad5: [c_int; 14],
}

pub struct stack_t {
pub ss_sp: *mut c_void,
pub ss_size: size_t,
pub ss_flags: c_int,
}

pub struct ipc_perm {
#[cfg(musl_v1_2_3)]
pub __key: crate::key_t,
Expand All @@ -76,6 +82,36 @@ s! {
__unused1: c_ulong,
__unused2: c_ulong,
}

pub struct statfs {
pub f_type: c_ulong,
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt_t,
pub f_bfree: crate::fsblkcnt_t,
pub f_files: crate::fsfilcnt_t,
pub f_ffree: crate::fsfilcnt_t,
pub f_bavail: crate::fsblkcnt_t,
pub f_fsid: crate::fsid_t,
pub f_namelen: c_ulong,
pub f_flags: c_ulong,
pub f_spare: [c_ulong; 5],
}

pub struct statfs64 {
pub f_type: c_ulong,
pub f_bsize: c_ulong,
pub f_frsize: c_ulong,
pub f_blocks: crate::fsblkcnt64_t,
pub f_bfree: crate::fsblkcnt64_t,
pub f_files: crate::fsfilcnt64_t,
pub f_ffree: crate::fsfilcnt64_t,
pub f_bavail: crate::fsblkcnt64_t,
pub f_fsid: crate::fsid_t,
pub f_namelen: c_ulong,
pub f_flags: c_ulong,
pub f_spare: [c_ulong; 5],
}
}

pub const SIGSTKSZ: size_t = 8192;
Expand Down
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/musl/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ use crate::prelude::*;
pub type regoff_t = c_long;

s! {
// MIPS implementation is special, see the subfolder.
#[cfg(not(target_arch = "mips64"))]
pub struct stack_t {
pub ss_sp: *mut c_void,
pub ss_flags: c_int,
Expand All @@ -17,6 +19,8 @@ s! {
__val: [c_ulong; 16],
}

// PowerPC implementation is special, see the subfolder.
#[cfg(not(target_arch = "powerpc64"))]
pub struct shmid_ds {
pub shm_perm: crate::ipc_perm,
pub shm_segsz: size_t,
Expand Down
Loading
Loading