unix: implement alarm(2) on Linux on all GOARCH except arm* and riscv.

SYS_ALARM is not defined for arm* or riscv, but is available for all other
Linux GOARCH values. Ian suggested I create a new file with build tags
matching these constraints.

In order to handle special case files such as this one (which don't match the
existing syscall_linux_goarch.go scheme), I've added logic to the Linux build
system which can evaluate the build constraints in a given file to determine
whether that file should be appended to the arguments for a given target.

Change-Id: I0136534522a26a0ce495308f63953546ea6bb8e5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/383734
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Trust: Daniel Martí <mvdan@mvdan.cc>
This commit is contained in:
Matt Layher
2022-02-07 23:40:03 +00:00
committed by Ian Lance Taylor
parent 1c1b9b1eba
commit 5739886226
13 changed files with 218 additions and 12 deletions
-1
View File
@@ -2318,7 +2318,6 @@ type RemoteIovec struct {
* Unimplemented
*/
// AfsSyscall
// Alarm
// ArchPrctl
// Brk
// ClockNanosleep