diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 15:56:48 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-09-15 16:02:37 +0200 |
| commit | da1873aaddc53805f845e21dd4e10cb6f9148b1d (patch) | |
| tree | 4e3858ff4cb6e7bf8a7d64cb46d7d3622394a032 /sys/sys.go | |
| parent | 66393d1884cb6a6d36dcbe5ad772ae9cf8f2adad (diff) | |
sys/targets: move targets from sys package
This breaks circular dependency between:
sysgen -> sys/linux -> sys -> sysgen
With this circular dependency it is very difficult to
update format of generated descriptions because sysgen does not build.
Diffstat (limited to 'sys/sys.go')
| -rw-r--r-- | sys/sys.go | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/sys/sys.go b/sys/sys.go index 45d5b28c2..33718510c 100644 --- a/sys/sys.go +++ b/sys/sys.go @@ -7,75 +7,5 @@ import ( _ "github.com/google/syzkaller/sys/linux" ) -type Target struct { - OS string - Arch string - PtrSize uint64 - CArch []string - CFlags []string - CrossCFlags []string - CCompilerPrefix string - KernelArch string - KernelHeaderArch string - KernelCrossCompile string -} - -var Targets = map[string]map[string]*Target{ - "linux": map[string]*Target{ - "amd64": { - PtrSize: 8, - CArch: []string{"__x86_64__"}, - CFlags: []string{"-m64"}, - CrossCFlags: []string{"-m64"}, - CCompilerPrefix: "x86_64-linux-gnu-", - KernelArch: "x86_64", - KernelHeaderArch: "x86", - }, - "386": { - PtrSize: 4, - CArch: []string{"__i386__"}, - CFlags: []string{"-m32"}, - CrossCFlags: []string{"-m32"}, - CCompilerPrefix: "x86_64-linux-gnu-", - KernelArch: "i386", - KernelHeaderArch: "x86", - }, - "arm64": { - PtrSize: 8, - CArch: []string{"__aarch64__"}, - CCompilerPrefix: "aarch64-linux-gnu-", - KernelArch: "arm64", - KernelHeaderArch: "arm64", - }, - "arm": { - PtrSize: 4, - CArch: []string{"__arm__"}, - CFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-m32"}, - CrossCFlags: []string{"-D__LINUX_ARM_ARCH__=6", "-march=armv6t2"}, - CCompilerPrefix: "arm-linux-gnueabihf-", - KernelArch: "arm", - KernelHeaderArch: "arm", - }, - "ppc64le": { - PtrSize: 8, - CArch: []string{"__ppc64__", "__PPC64__", "__powerpc64__"}, - CFlags: []string{"-D__powerpc64__"}, - CrossCFlags: []string{"-D__powerpc64__"}, - CCompilerPrefix: "powerpc64le-linux-gnu-", - KernelArch: "powerpc", - KernelHeaderArch: "powerpc", - }, - }, -} - -func init() { - for OS, archs := range Targets { - for arch, target := range archs { - target.OS = OS - target.Arch = arch - } - } -} - // Emitted by Makefile. var GitRevision string |
