mirror of
https://github.com/golang/go
synced 2024-11-18 06:14:46 -07:00
syscall: mksysnum_linux.pl: run syscall numbers through GCC
This will skip system call numbers that are ifdef'ed out in unistd.h, as occurs on PPC. Change-Id: I88e640e4621c7a8cc266433f34a7b4be71543ec9 Reviewed-on: https://go-review.googlesource.com/9966 Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
parent
350fd548b3
commit
1828d03ad5
@ -179,7 +179,7 @@ linux_amd64)
|
||||
linux_arm)
|
||||
mkerrors="$mkerrors"
|
||||
mksyscall="./mksyscall.pl -l32 -arm"
|
||||
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl"
|
||||
mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -"
|
||||
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
|
||||
;;
|
||||
linux_arm64)
|
||||
|
@ -28,7 +28,8 @@ sub fmt {
|
||||
}
|
||||
|
||||
my $prev;
|
||||
while(<>){
|
||||
open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc";
|
||||
while(<GCC>){
|
||||
if(/^#define __NR_syscalls\s+/) {
|
||||
# ignore redefinitions of __NR_syscalls
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user