Skip to content

Commit

Permalink
Auto merge of #3355 - asomers:freebsd-14-beta2, r=JohnTitor
Browse files Browse the repository at this point in the history
Reenable FreeBSD 14 CI, and update definitions to match 14.0-RC1.

This reverts commit c9643c8.

New FreeBSD images have been available in gcloud since July.  Update the testing image to the latest, 14.0-BETA2
  • Loading branch information
bors committed Oct 19, 2023
2 parents df3f7c1 + b9671de commit 5cd9cd7
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .cirrus.yml
Expand Up @@ -29,9 +29,7 @@ task:
task:
name: nightly x86_64-unknown-freebsd-14
freebsd_instance:
# FIXME: FreeBSD 14 CI fails due to pkg installation.
# Use 14 again once a new image is available on Cirrus CI.
image_family: freebsd-13-2
image: freebsd-14-0-rc1-amd64
setup_script:
- pkg install -y libnghttp2 curl
- curl https://sh.rustup.rs -sSf --output rustup.sh
Expand Down
14 changes: 6 additions & 8 deletions ci/build.sh
Expand Up @@ -102,6 +102,12 @@ i686-linux-android \
i686-unknown-freebsd \
i686-unknown-linux-gnu \
i686-unknown-linux-musl \
mips-unknown-linux-gnu \
mips-unknown-linux-musl \
mips64-unknown-linux-gnuabi64 \
mips64el-unknown-linux-gnuabi64 \
mipsel-unknown-linux-gnu \
mipsel-unknown-linux-musl \
powerpc-unknown-linux-gnu \
powerpc64-unknown-linux-gnu \
powerpc64le-unknown-linux-gnu \
Expand All @@ -112,14 +118,6 @@ x86_64-unknown-linux-musl \
x86_64-unknown-netbsd \
"

# FIXME: builds of MIPS targets are currently broken on nightly.
# mips-unknown-linux-gnu \
# mips-unknown-linux-musl \
# mips64-unknown-linux-gnuabi64 \
# mips64el-unknown-linux-gnuabi64 \
# mipsel-unknown-linux-gnu \
# mipsel-unknown-linux-musl \

RUST_GT_1_13_LINUX_TARGETS="\
arm-unknown-linux-musleabi \
arm-unknown-linux-musleabihf \
Expand Down
3 changes: 0 additions & 3 deletions ci/install-rust.sh
Expand Up @@ -12,9 +12,6 @@ else
# https://github.com/rust-lang/rust/issues/103673 contains related information.
case "$TARGET" in
*android*) toolchain=nightly-2022-10-09;;
# FIXME: Unpin once mips' components are available on nightly.
# https://rust-lang.github.io/rustup-components-history/mips-unknown-linux-gnu.html
*mips*) toolchain=nightly-2023-07-04;;
*) toolchain=nightly;;
esac
fi
Expand Down
10 changes: 8 additions & 2 deletions libc-test/build.rs
Expand Up @@ -2196,6 +2196,12 @@ fn test_freebsd(target: &str) {
// should've been used anywhere anyway.
"TDF_UNUSED23" => true,

// Removed in FreeBSD 14 (git a6b55ee6be1)
"IFF_KNOWSEPOCH" => true,

// Removed in FreeBSD 14 (git 7ff9ae90f0b)
"IFF_NOGROUP" => true,

// FIXME: These are deprecated - remove in a couple of releases.
// These symbols are not stable across OS-versions. They were
// changed for FreeBSD 14 in git revisions b62848b0c3f and
Expand Down Expand Up @@ -2277,8 +2283,8 @@ fn test_freebsd(target: &str) {
// Added in freebsd 14.
"IFCAP_MEXTPG" if Some(14) > freebsd_ver => true,
// Added in freebsd 13.
"IFF_KNOWSEPOCH" | "IFCAP_TXTLS4" | "IFCAP_TXTLS6" | "IFCAP_VXLAN_HWCSUM"
| "IFCAP_VXLAN_HWTSO" | "IFCAP_TXTLS_RTLMT" | "IFCAP_TXTLS"
"IFCAP_TXTLS4" | "IFCAP_TXTLS6" | "IFCAP_VXLAN_HWCSUM" | "IFCAP_VXLAN_HWTSO"
| "IFCAP_TXTLS_RTLMT" | "IFCAP_TXTLS"
if Some(13) > freebsd_ver =>
{
true
Expand Down
36 changes: 32 additions & 4 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Expand Up @@ -365,9 +365,13 @@ s! {
}

pub struct cpuset_t {
#[cfg(target_pointer_width = "64")]
#[cfg(all(freebsd14, target_pointer_width = "64"))]
__bits: [::c_long; 16],
#[cfg(all(freebsd14, target_pointer_width = "32"))]
__bits: [::c_long; 32],
#[cfg(all(not(freebsd14), target_pointer_width = "64"))]
__bits: [::c_long; 4],
#[cfg(target_pointer_width = "32")]
#[cfg(all(not(freebsd14), target_pointer_width = "32"))]
__bits: [::c_long; 8],
}

Expand Down Expand Up @@ -998,6 +1002,8 @@ s! {
pub pcbcnt: u32,
}

// Note: this structure will change in a backwards-incompatible way in
// FreeBSD 15.
pub struct tcp_info {
pub tcpi_state: u8,
pub __tcpi_ca_state: u8,
Expand Down Expand Up @@ -1055,7 +1061,21 @@ s! {
#[cfg(freebsd14)]
pub __tcpi_received_ce_bytes: u32,
#[cfg(freebsd14)]
pub __tcpi_pad: [u32; 19],
pub tcpi_total_tlp: u32,
#[cfg(freebsd14)]
pub tcpi_total_tlp_bytes: u64,
#[cfg(freebsd14)]
pub tcpi_snd_una: u32,
#[cfg(freebsd14)]
pub tcpi_snd_max: u32,
#[cfg(freebsd14)]
pub tcpi_rcv_numsacks: u32,
#[cfg(freebsd14)]
pub tcpi_rcv_adv: u32,
#[cfg(freebsd14)]
pub tcpi_dupacks: u32,
#[cfg(freebsd14)]
pub __tcpi_pad: [u32; 10],
#[cfg(not(freebsd14))]
pub __tcpi_pad: [u32; 26],
}
Expand Down Expand Up @@ -2599,7 +2619,13 @@ pub const DEVSTAT_N_TRANS_FLAGS: ::c_int = 4;
pub const DEVSTAT_NAME_LEN: ::c_int = 16;

// sys/cpuset.h
pub const CPU_SETSIZE: ::c_int = 256;
cfg_if! {
if #[cfg(freebsd14)] {
pub const CPU_SETSIZE: ::c_int = 1024;
} else {
pub const CPU_SETSIZE: ::c_int = 256;
}
}

pub const SIGEV_THREAD_ID: ::c_int = 4;

Expand Down Expand Up @@ -3172,6 +3198,7 @@ pub const IFF_LOOPBACK: ::c_int = 0x8;
/// (i) is a point-to-point link
pub const IFF_POINTOPOINT: ::c_int = 0x10;
/// (i) calls if_input in net epoch
#[deprecated(since = "0.2.149", note = "Removed in FreeBSD 14")]
pub const IFF_KNOWSEPOCH: ::c_int = 0x20;
/// (d) resources allocated
pub const IFF_RUNNING: ::c_int = 0x40;
Expand Down Expand Up @@ -3219,6 +3246,7 @@ pub const IFF_DYING: ::c_int = 0x200000;
/// (n) interface is being renamed
pub const IFF_RENAMING: ::c_int = 0x400000;
/// interface is not part of any groups
#[deprecated(since = "0.2.149", note = "Removed in FreeBSD 14")]
pub const IFF_NOGROUP: ::c_int = 0x800000;

/// link invalid/unknown
Expand Down

0 comments on commit 5cd9cd7

Please sign in to comment.