mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 07:07:33 -04:00
unix: replace Perl script references in "README.md" with Go programs
Update references to mksyscall*.pl and mksysnum*.pl Perl scripts in "README.md" with mksyscall*.go and mksysnum*.go Go programs. Updates golang/go#27779 Change-Id: Ide3f5d9894c91aa6103d6bbe5ec64a47c969daa7 Reviewed-on: https://go-review.googlesource.com/c/162278 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
cea5d2f6b4
commit
983097b1a8
+8
-8
@@ -32,7 +32,7 @@ To build the files for your current OS and architecture, make sure GOOS and
|
|||||||
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
|
GOARCH are set correctly and run `mkall.sh`. This will generate the files for
|
||||||
your specific system. Running `mkall.sh -n` shows the commands that will be run.
|
your specific system. Running `mkall.sh -n` shows the commands that will be run.
|
||||||
|
|
||||||
Requirements: bash, perl, go
|
Requirements: bash, go
|
||||||
|
|
||||||
### New Build System (currently for `GOOS == "linux"`)
|
### New Build System (currently for `GOOS == "linux"`)
|
||||||
|
|
||||||
@@ -52,14 +52,14 @@ system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
|
|||||||
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
|
then generate all of the files for all of the GOOS/GOARCH pairs in the new build
|
||||||
system. Running `mkall.sh -n` shows the commands that will be run.
|
system. Running `mkall.sh -n` shows the commands that will be run.
|
||||||
|
|
||||||
Requirements: bash, perl, go, docker
|
Requirements: bash, go, docker
|
||||||
|
|
||||||
## Component files
|
## Component files
|
||||||
|
|
||||||
This section describes the various files used in the code generation process.
|
This section describes the various files used in the code generation process.
|
||||||
It also contains instructions on how to modify these files to add a new
|
It also contains instructions on how to modify these files to add a new
|
||||||
architecture/OS or to add additional syscalls, types, or constants. Note that
|
architecture/OS or to add additional syscalls, types, or constants. Note that
|
||||||
if you are using the new build system, the scripts cannot be called normally.
|
if you are using the new build system, the scripts/programs cannot be called normally.
|
||||||
They must be called from within the docker container.
|
They must be called from within the docker container.
|
||||||
|
|
||||||
### asm files
|
### asm files
|
||||||
@@ -81,8 +81,8 @@ each GOOS/GOARCH pair.
|
|||||||
|
|
||||||
### mksysnum
|
### mksysnum
|
||||||
|
|
||||||
Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
|
Mksysnum is a Go program located at `${GOOS}/mksysnum.go` (or `mksysnum_${GOOS}.go`
|
||||||
for the old system). This script takes in a list of header files containing the
|
for the old system). This program takes in a list of header files containing the
|
||||||
syscall number declarations and parses them to produce the corresponding list of
|
syscall number declarations and parses them to produce the corresponding list of
|
||||||
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
|
Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
|
||||||
constants.
|
constants.
|
||||||
@@ -92,14 +92,14 @@ new installation of the target OS (or updating the source checkouts for the
|
|||||||
new build system). However, depending on the OS, you make need to update the
|
new build system). However, depending on the OS, you make need to update the
|
||||||
parsing in mksysnum.
|
parsing in mksysnum.
|
||||||
|
|
||||||
### mksyscall.pl
|
### mksyscall.go
|
||||||
|
|
||||||
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
|
The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
|
||||||
hand-written Go files which implement system calls (for unix, the specific OS,
|
hand-written Go files which implement system calls (for unix, the specific OS,
|
||||||
or the specific OS/Architecture pair respectively) that need special handling
|
or the specific OS/Architecture pair respectively) that need special handling
|
||||||
and list `//sys` comments giving prototypes for ones that can be generated.
|
and list `//sys` comments giving prototypes for ones that can be generated.
|
||||||
|
|
||||||
The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
|
The mksyscall.go program takes the `//sys` and `//sysnb` comments and converts
|
||||||
them into syscalls. This requires the name of the prototype in the comment to
|
them into syscalls. This requires the name of the prototype in the comment to
|
||||||
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
|
match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
|
||||||
prototype can be exported (capitalized) or not.
|
prototype can be exported (capitalized) or not.
|
||||||
@@ -160,7 +160,7 @@ signal numbers, and constants. Generated by `mkerrors.sh` (see above).
|
|||||||
### `zsyscall_${GOOS}_${GOARCH}.go`
|
### `zsyscall_${GOOS}_${GOARCH}.go`
|
||||||
|
|
||||||
A file containing all the generated syscalls for a specific GOOS and GOARCH.
|
A file containing all the generated syscalls for a specific GOOS and GOARCH.
|
||||||
Generated by `mksyscall.pl` (see above).
|
Generated by `mksyscall.go` (see above).
|
||||||
|
|
||||||
### `zsysnum_${GOOS}_${GOARCH}.go`
|
### `zsysnum_${GOOS}_${GOARCH}.go`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user