Skip to content

Commit bc30283

Browse files
committed
Auto merge of #1935 - JohnTitor:sparc, r=JohnTitor
Revive `sparc-unknown-linux-gnu` CI cc rust-lang/rust#58564
2 parents cf89907 + 2c99f4b commit bc30283

File tree

3 files changed

+106
-120
lines changed

3 files changed

+106
-120
lines changed

ci/build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@ for TARGET in $TARGETS; do
201201
fi
202202
done
203203

204-
# FIXME: https://github.com/rust-lang/rust/issues/58564
205-
# sparc-unknown-linux-gnu
206204
RUST_LINUX_NO_CORE_TARGETS="\
207205
aarch64-pc-windows-msvc \
208206
aarch64-unknown-cloudabi \
@@ -243,6 +241,7 @@ riscv32imc-unknown-none-elf \
243241
riscv32gc-unknown-linux-gnu \
244242
riscv64gc-unknown-none-elf \
245243
riscv64imac-unknown-none-elf \
244+
sparc-unknown-linux-gnu \
246245
sparc64-unknown-netbsd \
247246
248247
thumbv6m-none-eabi \

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 105 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -140,74 +140,128 @@ s! {
140140
}
141141
}
142142

143-
pub const O_NOATIME: ::c_int = 0o1000000;
144-
pub const O_PATH: ::c_int = 0o10000000;
145-
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
146-
147143
pub const SO_PRIORITY: ::c_int = 12;
148144
pub const SO_BSDCOMPAT: ::c_int = 14;
149-
pub const SO_BINDTODEVICE: ::c_int = 25;
150145
pub const SO_TIMESTAMP: ::c_int = 29;
151-
pub const SO_MARK: ::c_int = 36;
152-
pub const SO_RXQ_OVFL: ::c_int = 40;
153-
pub const SO_PEEK_OFF: ::c_int = 42;
154-
pub const SO_BUSY_POLL: ::c_int = 46;
155-
156-
pub const SA_ONSTACK: ::c_int = 0x08000000;
157146

158-
pub const PTRACE_DETACH: ::c_uint = 17;
159147
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
160148
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
161149

162-
pub const F_SETLK: ::c_int = 6;
163-
pub const F_SETLKW: ::c_int = 7;
164-
165-
pub const F_RDLCK: ::c_int = 0;
166-
pub const F_WRLCK: ::c_int = 1;
167-
pub const F_UNLCK: ::c_int = 2;
168-
169150
pub const F_OFD_GETLK: ::c_int = 36;
170151
pub const F_OFD_SETLK: ::c_int = 37;
171152
pub const F_OFD_SETLKW: ::c_int = 38;
172153

173-
pub const SFD_CLOEXEC: ::c_int = 0x080000;
174-
175-
pub const NCCS: usize = 32;
176-
177-
pub const O_TRUNC: ::c_int = 512;
178-
179-
pub const O_CLOEXEC: ::c_int = 0x80000;
180-
181-
pub const EBFONT: ::c_int = 59;
182-
pub const ENOSTR: ::c_int = 60;
183-
pub const ENODATA: ::c_int = 61;
184-
pub const ETIME: ::c_int = 62;
185-
pub const ENOSR: ::c_int = 63;
186-
pub const ENONET: ::c_int = 64;
187-
pub const ENOPKG: ::c_int = 65;
188-
pub const EREMOTE: ::c_int = 66;
189-
pub const ENOLINK: ::c_int = 67;
190-
pub const EADV: ::c_int = 68;
191-
pub const ESRMNT: ::c_int = 69;
192-
pub const ECOMM: ::c_int = 70;
193-
pub const EPROTO: ::c_int = 71;
194-
pub const EDOTDOT: ::c_int = 73;
195-
196-
pub const SA_NODEFER: ::c_int = 0x40000000;
197-
pub const SA_RESETHAND: ::c_int = 0x80000000;
198-
pub const SA_RESTART: ::c_int = 0x10000000;
199-
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
200-
201-
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
202-
203-
pub const EFD_CLOEXEC: ::c_int = 0x80000;
204-
205154
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
206155
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
207156
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
208157
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
209158
pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8;
210159

160+
cfg_if! {
161+
if #[cfg(target_arch = "sparc")] {
162+
pub const O_NOATIME: ::c_int = 0x200000;
163+
pub const O_PATH: ::c_int = 0x1000000;
164+
pub const O_TMPFILE: ::c_int = 0x2000000 | O_DIRECTORY;
165+
pub const SO_BINDTODEVICE: ::c_int = 0x000d;
166+
pub const SO_MARK: ::c_int = 0x0022;
167+
pub const SO_RXQ_OVFL: ::c_int = 0x0024;
168+
pub const SO_PEEK_OFF: ::c_int = 0x0026;
169+
pub const SO_BUSY_POLL: ::c_int = 0x0030;
170+
171+
pub const SA_ONSTACK: ::c_int = 1;
172+
173+
pub const PTRACE_DETACH: ::c_uint = 11;
174+
175+
pub const F_SETLK: ::c_int = 8;
176+
pub const F_SETLKW: ::c_int = 9;
177+
178+
pub const F_RDLCK: ::c_int = 1;
179+
pub const F_WRLCK: ::c_int = 2;
180+
pub const F_UNLCK: ::c_int = 3;
181+
182+
pub const SFD_CLOEXEC: ::c_int = 0x400000;
183+
184+
pub const NCCS: usize = 17;
185+
186+
pub const O_TRUNC: ::c_int = 0x400;
187+
pub const O_CLOEXEC: ::c_int = 0x400000;
188+
189+
pub const EBFONT: ::c_int = 109;
190+
pub const ENOSTR: ::c_int = 72;
191+
pub const ENODATA: ::c_int = 111;
192+
pub const ETIME: ::c_int = 73;
193+
pub const ENOSR: ::c_int = 74;
194+
pub const ENONET: ::c_int = 80;
195+
pub const ENOPKG: ::c_int = 113;
196+
pub const EREMOTE: ::c_int = 71;
197+
pub const ENOLINK: ::c_int = 82;
198+
pub const EADV: ::c_int = 83;
199+
pub const ESRMNT: ::c_int = 84;
200+
pub const ECOMM: ::c_int = 85;
201+
pub const EPROTO: ::c_int = 86;
202+
pub const EDOTDOT: ::c_int = 88;
203+
204+
pub const SA_NODEFER: ::c_int = 0x20;
205+
pub const SA_RESETHAND: ::c_int = 0x4;
206+
pub const SA_RESTART: ::c_int = 0x2;
207+
pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
208+
209+
pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
210+
211+
pub const EFD_CLOEXEC: ::c_int = 0x400000;
212+
} else {
213+
pub const O_NOATIME: ::c_int = 0o1000000;
214+
pub const O_PATH: ::c_int = 0o10000000;
215+
pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
216+
pub const SO_BINDTODEVICE: ::c_int = 25;
217+
pub const SO_MARK: ::c_int = 36;
218+
pub const SO_RXQ_OVFL: ::c_int = 40;
219+
pub const SO_PEEK_OFF: ::c_int = 42;
220+
pub const SO_BUSY_POLL: ::c_int = 46;
221+
222+
pub const SA_ONSTACK: ::c_int = 0x08000000;
223+
224+
pub const PTRACE_DETACH: ::c_uint = 17;
225+
226+
pub const F_SETLK: ::c_int = 6;
227+
pub const F_SETLKW: ::c_int = 7;
228+
229+
pub const F_RDLCK: ::c_int = 0;
230+
pub const F_WRLCK: ::c_int = 1;
231+
pub const F_UNLCK: ::c_int = 2;
232+
233+
pub const SFD_CLOEXEC: ::c_int = 0x080000;
234+
235+
pub const NCCS: usize = 32;
236+
237+
pub const O_TRUNC: ::c_int = 512;
238+
pub const O_CLOEXEC: ::c_int = 0x80000;
239+
pub const EBFONT: ::c_int = 59;
240+
pub const ENOSTR: ::c_int = 60;
241+
pub const ENODATA: ::c_int = 61;
242+
pub const ETIME: ::c_int = 62;
243+
pub const ENOSR: ::c_int = 63;
244+
pub const ENONET: ::c_int = 64;
245+
pub const ENOPKG: ::c_int = 65;
246+
pub const EREMOTE: ::c_int = 66;
247+
pub const ENOLINK: ::c_int = 67;
248+
pub const EADV: ::c_int = 68;
249+
pub const ESRMNT: ::c_int = 69;
250+
pub const ECOMM: ::c_int = 70;
251+
pub const EPROTO: ::c_int = 71;
252+
pub const EDOTDOT: ::c_int = 73;
253+
254+
pub const SA_NODEFER: ::c_int = 0x40000000;
255+
pub const SA_RESETHAND: ::c_int = 0x80000000;
256+
pub const SA_RESTART: ::c_int = 0x10000000;
257+
pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
258+
259+
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
260+
261+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
262+
}
263+
}
264+
211265
align_const! {
212266
#[cfg(target_endian = "little")]
213267
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t =

src/unix/linux_like/linux/gnu/b32/sparc/mod.rs

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,6 @@ s! {
204204
}
205205
}
206206

207-
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
208-
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
209-
210207
pub const RLIM_INFINITY: ::rlim_t = !0;
211208
pub const VEOF: usize = 4;
212209
pub const RTLD_DEEPBIND: ::c_int = 0x8;
@@ -231,9 +228,6 @@ pub const O_SYNC: ::c_int = 0x802000;
231228
pub const O_RSYNC: ::c_int = 0x802000;
232229
pub const O_DSYNC: ::c_int = 0x2000;
233230
pub const O_FSYNC: ::c_int = 0x802000;
234-
pub const O_NOATIME: ::c_int = 0x200000;
235-
pub const O_PATH: ::c_int = 0x1000000;
236-
pub const O_TMPFILE: ::c_int = 0x2000000 | O_DIRECTORY;
237231

238232
pub const MADV_SOFT_OFFLINE: ::c_int = 101;
239233
pub const MAP_GROWSDOWN: ::c_int = 0x0200;
@@ -330,12 +324,6 @@ pub const SOL_SOCKET: ::c_int = 0xffff;
330324

331325
pub const SO_PASSCRED: ::c_int = 2;
332326
pub const SO_REUSEADDR: ::c_int = 4;
333-
pub const SO_BINDTODEVICE: ::c_int = 0x000d;
334-
pub const SO_TIMESTAMP: ::c_int = 0x001d;
335-
pub const SO_MARK: ::c_int = 0x0022;
336-
pub const SO_RXQ_OVFL: ::c_int = 0x0024;
337-
pub const SO_PEEK_OFF: ::c_int = 0x0026;
338-
pub const SO_BUSY_POLL: ::c_int = 0x0030;
339327
pub const SO_TYPE: ::c_int = 0x1008;
340328
pub const SO_ERROR: ::c_int = 0x1007;
341329
pub const SO_DONTROUTE: ::c_int = 16;
@@ -354,7 +342,6 @@ pub const SO_ACCEPTCONN: ::c_int = 0x8000;
354342
pub const SOCK_STREAM: ::c_int = 1;
355343
pub const SOCK_DGRAM: ::c_int = 2;
356344

357-
pub const SA_ONSTACK: ::c_int = 1;
358345
pub const SA_SIGINFO: ::c_int = 0x200;
359346
pub const SA_NOCLDWAIT: ::c_int = 0x100;
360347

@@ -387,22 +374,11 @@ pub const POLLWRBAND: ::c_short = 0x100;
387374
pub const O_ASYNC: ::c_int = 0x40;
388375
pub const O_NDELAY: ::c_int = 0x4004;
389376

390-
pub const PTRACE_DETACH: ::c_uint = 11;
391-
392377
pub const EFD_NONBLOCK: ::c_int = 0x4000;
393378

394379
pub const F_GETLK: ::c_int = 7;
395380
pub const F_GETOWN: ::c_int = 5;
396381
pub const F_SETOWN: ::c_int = 6;
397-
pub const F_SETLK: ::c_int = 8;
398-
pub const F_SETLKW: ::c_int = 9;
399-
pub const F_OFD_GETLK: ::c_int = 36;
400-
pub const F_OFD_SETLK: ::c_int = 37;
401-
pub const F_OFD_SETLKW: ::c_int = 38;
402-
403-
pub const F_RDLCK: ::c_int = 1;
404-
pub const F_WRLCK: ::c_int = 2;
405-
pub const F_UNLCK: ::c_int = 3;
406382

407383
pub const SFD_NONBLOCK: ::c_int = 0x4000;
408384

@@ -429,37 +405,6 @@ pub const TIOCM_CAR: ::c_int = 0x040;
429405
pub const TIOCM_RNG: ::c_int = 0x080;
430406
pub const TIOCM_DSR: ::c_int = 0x100;
431407

432-
pub const SFD_CLOEXEC: ::c_int = 0x400000;
433-
434-
pub const NCCS: usize = 17;
435-
pub const O_TRUNC: ::c_int = 0x400;
436-
437-
pub const O_CLOEXEC: ::c_int = 0x400000;
438-
439-
pub const EBFONT: ::c_int = 109;
440-
pub const ENOSTR: ::c_int = 72;
441-
pub const ENODATA: ::c_int = 111;
442-
pub const ETIME: ::c_int = 73;
443-
pub const ENOSR: ::c_int = 74;
444-
pub const ENONET: ::c_int = 80;
445-
pub const ENOPKG: ::c_int = 113;
446-
pub const EREMOTE: ::c_int = 71;
447-
pub const ENOLINK: ::c_int = 82;
448-
pub const EADV: ::c_int = 83;
449-
pub const ESRMNT: ::c_int = 84;
450-
pub const ECOMM: ::c_int = 85;
451-
pub const EPROTO: ::c_int = 86;
452-
pub const EDOTDOT: ::c_int = 88;
453-
454-
pub const SA_NODEFER: ::c_int = 0x20;
455-
pub const SA_RESETHAND: ::c_int = 0x4;
456-
pub const SA_RESTART: ::c_int = 0x2;
457-
pub const SA_NOCLDSTOP: ::c_int = 0x00000008;
458-
459-
pub const EPOLL_CLOEXEC: ::c_int = 0x400000;
460-
461-
pub const EFD_CLOEXEC: ::c_int = 0x400000;
462-
463408
pub const O_DIRECTORY: ::c_int = 0o200000;
464409
pub const O_NOFOLLOW: ::c_int = 0o400000;
465410
pub const O_LARGEFILE: ::c_int = 0x40000;
@@ -965,18 +910,6 @@ pub const SYS_pidfd_open: ::c_long = 434;
965910
// Reserved in the kernel, but not actually implemented yet
966911
pub const SYS_clone3: ::c_long = 435;
967912

968-
#[link(name = "util")]
969-
extern "C" {
970-
pub fn sysctl(
971-
name: *mut ::c_int,
972-
namelen: ::c_int,
973-
oldp: *mut ::c_void,
974-
oldlenp: *mut ::size_t,
975-
newp: *mut ::c_void,
976-
newlen: ::size_t,
977-
) -> ::c_int;
978-
}
979-
980913
cfg_if! {
981914
if #[cfg(libc_align)] {
982915
mod align;

0 commit comments

Comments
 (0)