Skip to content

Commit 71005a5

Browse files
brad0tgross35
authored andcommitted
add HWCAP consts
(backport <#4734>) (cherry picked from commit e5b7775)
1 parent 8f47d96 commit 71005a5

File tree

7 files changed

+21
-0
lines changed

7 files changed

+21
-0
lines changed

libc-test/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2233,6 +2233,9 @@ fn test_android(target: &str) {
22332233
// FIXME(android): Requires >= 6.12 kernel headers.
22342234
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,
22352235

2236+
// FIXME(android): Requires >= 6.9 kernel headers.
2237+
"AT_HWCAP3" | "AT_HWCAP4" => true,
2238+
22362239
_ => false,
22372240
}
22382241
});
@@ -2829,6 +2832,9 @@ fn test_freebsd(target: &str) {
28292832
// FIXME(deprecated): deprecated in 0.2, removed in main
28302833
"TIOCMGDTRWAIT" | "TIOCMSDTRWAIT" => true,
28312834

2835+
// Added in FreeBSD 15
2836+
"AT_HWCAP3" | "AT_HWCAP4" if Some(15) > freebsd_ver => true,
2837+
28322838
_ => false,
28332839
}
28342840
});
@@ -4733,6 +4739,9 @@ fn test_linux(target: &str) {
47334739
// FIXME(linux): Value changed in 6.14
47344740
"SECURE_ALL_BITS" | "SECURE_ALL_LOCKS" => true,
47354741

4742+
// FIXME(linux): Requires >= 6.9 kernel headers.
4743+
"AT_HWCAP3" | "AT_HWCAP4" => true,
4744+
47364745
_ => false,
47374746
}
47384747
});

libc-test/semver/android.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ AT_FLAGS
150150
AT_GID
151151
AT_HWCAP
152152
AT_HWCAP2
153+
AT_HWCAP3
154+
AT_HWCAP4
153155
AT_IGNORE
154156
AT_MINSIGSTKSZ
155157
AT_NOTELF

libc-test/semver/freebsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ AT_FLAGS
9696
AT_GID
9797
AT_HWCAP
9898
AT_HWCAP2
99+
AT_HWCAP3
100+
AT_HWCAP4
99101
AT_NCPUS
100102
AT_NOTELF
101103
AT_NULL

libc-test/semver/linux.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ AT_FLAGS
168168
AT_GID
169169
AT_HWCAP
170170
AT_HWCAP2
171+
AT_HWCAP3
172+
AT_HWCAP4
171173
AT_IGNORE
172174
AT_MINSIGSTKSZ
173175
AT_NOTELF

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3807,6 +3807,8 @@ pub const AT_HWCAP: c_int = 25;
38073807
pub const AT_HWCAP2: c_int = 26;
38083808
pub const AT_USRSTACKBASE: c_int = 35;
38093809
pub const AT_USRSTACKLIM: c_int = 36;
3810+
pub const AT_HWCAP3: c_int = 38;
3811+
pub const AT_HWCAP4: c_int = 39;
38103812

38113813
pub const TABDLY: crate::tcflag_t = 0x00000004;
38123814
pub const TAB0: crate::tcflag_t = 0x00000000;

src/unix/linux_like/android/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,8 @@ pub const AT_RANDOM: c_ulong = 25;
35083508
pub const AT_HWCAP2: c_ulong = 26;
35093509
pub const AT_RSEQ_FEATURE_SIZE: c_ulong = 27;
35103510
pub const AT_RSEQ_ALIGN: c_ulong = 28;
3511+
pub const AT_HWCAP3: c_ulong = 29;
3512+
pub const AT_HWCAP4: c_ulong = 30;
35113513
pub const AT_EXECFN: c_ulong = 31;
35123514
pub const AT_MINSIGSTKSZ: c_ulong = 51;
35133515

src/unix/linux_like/linux/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2544,6 +2544,8 @@ pub const AT_BASE_PLATFORM: c_ulong = 24;
25442544
pub const AT_RANDOM: c_ulong = 25;
25452545
pub const AT_HWCAP2: c_ulong = 26;
25462546

2547+
pub const AT_HWCAP3: c_ulong = 29;
2548+
pub const AT_HWCAP4: c_ulong = 30;
25472549
pub const AT_EXECFN: c_ulong = 31;
25482550

25492551
// defined in arch/<arch>/include/uapi/asm/auxvec.h but has the same value

0 commit comments

Comments
 (0)