Skip to content

Commit aecd60b

Browse files
brad0tgross35
authored andcommitted
add HWCAP consts
(backport <rust-lang#4734>) (cherry picked from commit e5b7775)
1 parent a8c1f58 commit aecd60b

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
@@ -2237,6 +2237,9 @@ fn test_android(target: &str) {
22372237
// FIXME(android): Requires >= 6.12 kernel headers.
22382238
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,
22392239

2240+
// FIXME(android): Requires >= 6.9 kernel headers.
2241+
"AT_HWCAP3" | "AT_HWCAP4" => true,
2242+
22402243
_ => false,
22412244
}
22422245
});
@@ -2833,6 +2836,9 @@ fn test_freebsd(target: &str) {
28332836
// FIXME(deprecated): deprecated in 0.2, removed in main
28342837
"TIOCMGDTRWAIT" | "TIOCMSDTRWAIT" => true,
28352838

2839+
// Added in FreeBSD 15
2840+
"AT_HWCAP3" | "AT_HWCAP4" if Some(15) > freebsd_ver => true,
2841+
28362842
_ => false,
28372843
}
28382844
});
@@ -4737,6 +4743,9 @@ fn test_linux(target: &str) {
47374743
// FIXME(linux): Value changed in 6.14
47384744
"SECURE_ALL_BITS" | "SECURE_ALL_LOCKS" => true,
47394745

4746+
// FIXME(linux): Requires >= 6.9 kernel headers.
4747+
"AT_HWCAP3" | "AT_HWCAP4" => true,
4748+
47404749
_ => false,
47414750
}
47424751
});

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)