Skip to content

Commit 874e527

Browse files
committed
Upgrade FreeBSD ABi used on std to 12
1 parent 614d5e2 commit 874e527

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

build.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ fn main() {
5959
);
6060
}
6161

62-
// The ABI of libc used by libstd is backward compatible with FreeBSD 10.
62+
// The ABI of libc used by std is backward compatible with FreeBSD 12.
6363
// The ABI of libc from crates.io is backward compatible with FreeBSD 11.
6464
//
6565
// On CI, we detect the actual FreeBSD version and match its ABI exactly,
6666
// running tests to ensure that the ABI is correct.
6767
match which_freebsd() {
68-
Some(10) if libc_ci || rustc_dep_of_std => set_cfg("freebsd10"),
68+
Some(10) if libc_ci => set_cfg("freebsd10"),
6969
Some(11) if libc_ci => set_cfg("freebsd11"),
70-
Some(12) if libc_ci => set_cfg("freebsd12"),
70+
Some(12) if libc_ci || rustc_dep_of_std => set_cfg("freebsd12"),
7171
Some(13) if libc_ci => set_cfg("freebsd13"),
7272
Some(14) if libc_ci => set_cfg("freebsd14"),
7373
Some(_) | None => set_cfg("freebsd11"),

ci/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ test_target() {
3939
done
4040
fi
4141

42-
# Test that libc builds without any default features (no libstd)
42+
# Test that libc builds without any default features (no std)
4343
if [ "${NO_STD}" != "1" ]; then
4444
cargo "+${RUST}" "${BUILD_CMD}" -vv --no-default-features --target "${TARGET}"
4545
else
4646
# FIXME: With `build-std` feature, `compiler_builtins` emits a lof of lint warnings.
4747
RUSTFLAGS="-A improper_ctypes_definitions" cargo "+${RUST}" "${BUILD_CMD}" \
4848
-Z build-std=core,alloc -vv --no-default-features --target "${TARGET}"
4949
fi
50-
# Test that libc builds with default features (e.g. libstd)
51-
# if the target supports libstd
50+
# Test that libc builds with default features (e.g. std)
51+
# if the target supports std
5252
if [ "$NO_STD" != "1" ]; then
5353
cargo "+${RUST}" "${BUILD_CMD}" -vv --target "${TARGET}"
5454
else

ci/docker/aarch64-unknown-linux-musl/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
77
COPY install-musl.sh /
88
RUN sh /install-musl.sh aarch64
99

10-
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
10+
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in std?
1111
ENV PATH=$PATH:/musl-aarch64/bin:/rust/bin \
1212
CC_aarch64_unknown_linux_musl=musl-gcc \
1313
RUSTFLAGS='-Clink-args=-lgcc -L /musl-aarch64/lib' \

ci/docker/s390x-unknown-linux-musl/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
99
COPY install-musl.sh /
1010
RUN sh /install-musl.sh s390x
1111

12-
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in libstd?
12+
# FIXME: shouldn't need the `-lgcc` here, shouldn't that be in std?
1313
ENV CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_LINKER=s390x-linux-gnu-gcc \
1414
CARGO_TARGET_S390X_UNKNOWN_LINUX_GNU_RUNNER="qemu-s390x -L /musl-s390x" \
1515
CC_s390x_unknown_linux_gnu=musl-gcc \

libc-test/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ fn test_apple(target: &str) {
349349
// close calls the close_nocancel system call
350350
"close" => true,
351351

352-
// FIXME: libstd removed libresolv support: https://github.com/rust-lang/rust/pull/102766
352+
// FIXME: std removed libresolv support: https://github.com/rust-lang/rust/pull/102766
353353
"res_init" => true,
354354

355355
// FIXME: remove once the target in CI is updated

src/unix/haiku/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ pub const LC_NUMERIC: ::c_int = 4;
865865
pub const LC_TIME: ::c_int = 5;
866866
pub const LC_MESSAGES: ::c_int = 6;
867867

868-
// FIXME: Haiku does not have MAP_FILE, but libstd/os.rs requires it
868+
// FIXME: Haiku does not have MAP_FILE, but library/std/os.rs requires it
869869
pub const MAP_FILE: ::c_int = 0x00;
870870
pub const MAP_SHARED: ::c_int = 0x01;
871871
pub const MAP_PRIVATE: ::c_int = 0x02;

src/unix/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ cfg_if! {
321321
if #[cfg(any(target_os = "l4re", target_os = "espidf"))] {
322322
// required libraries for L4Re and the ESP-IDF framework are linked externally, ATM
323323
} else if #[cfg(feature = "std")] {
324-
// cargo build, don't pull in anything extra as the libstd dep
324+
// cargo build, don't pull in anything extra as the std dep
325325
// already pulls in all libs.
326326
} else if #[cfg(all(target_os = "linux",
327327
any(target_env = "gnu", target_env = "uclibc"),

src/unix/redox/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub type nfds_t = ::c_ulong;
2828
pub type nlink_t = ::c_ulong;
2929
pub type off_t = ::c_longlong;
3030
pub type pthread_t = *mut ::c_void;
31-
// Must be usize due to libstd/sys_common/thread_local.rs,
31+
// Must be usize due to library/std/sys_common/thread_local.rs,
3232
// should technically be *mut ::c_void
3333
pub type pthread_key_t = usize;
3434
pub type rlim_t = ::c_ulonglong;

src/vxworks/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ pub const EAI_SERVICE: ::c_int = 9;
582582
pub const EAI_SOCKTYPE: ::c_int = 10;
583583
pub const EAI_SYSTEM: ::c_int = 11;
584584

585-
// This is not defined in vxWorks, but we have to define it here
586-
// to make the building pass for getrandom and libstd, FIXME
585+
// FIXME: This is not defined in vxWorks, but we have to define it here
586+
// to make the building pass for getrandom and std
587587
pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void;
588588

589589
//Clock Lib Stuff

0 commit comments

Comments
 (0)