mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 14:47:28 -04:00
unix: generate linux/sparc64 go files using Docker
With cgo supporting sparc64 as of CL 102555 and CL 132155, the Docker based build system can be used to generate file for linux/sparc64 as well. Updates golang/go#15282 Change-Id: I109e55f39d3229b24b0029c42074e439c6c54dc8 Reviewed-on: https://go-review.googlesource.com/c/102655 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
a79f1b1907
commit
b4a75ba826
+11
-10
@@ -52,8 +52,9 @@ type target struct {
|
||||
Bits int
|
||||
}
|
||||
|
||||
// List of all Linux targets supported by the go compiler. sparc64 is not
|
||||
// currently supported, though a port is in progress.
|
||||
// List of all Linux targets supported by the go compiler. Currently, riscv64
|
||||
// and sparc64 are not fully supported, but there is enough support already to
|
||||
// generate Go type and error definitions.
|
||||
var targets = []target{
|
||||
{
|
||||
GoArch: "386",
|
||||
@@ -133,13 +134,13 @@ var targets = []target{
|
||||
SignedChar: true,
|
||||
Bits: 64,
|
||||
},
|
||||
// {
|
||||
// GoArch: "sparc64",
|
||||
// LinuxArch: "sparc",
|
||||
// GNUArch: "sparc64-linux-gnu",
|
||||
// BigEndian: true,
|
||||
// Bits: 64,
|
||||
// },
|
||||
{
|
||||
GoArch: "sparc64",
|
||||
LinuxArch: "sparc",
|
||||
GNUArch: "sparc64-linux-gnu",
|
||||
BigEndian: true,
|
||||
Bits: 64,
|
||||
},
|
||||
}
|
||||
|
||||
// ptracePairs is a list of pairs of targets that can, in some cases,
|
||||
@@ -532,7 +533,7 @@ func (t *target) mksyscallFlags() (flags []string) {
|
||||
}
|
||||
}
|
||||
|
||||
// This flag menas a 64-bit value should use (even, odd)-pair.
|
||||
// This flag means a 64-bit value should use (even, odd)-pair.
|
||||
if t.GoArch == "arm" || (t.LinuxArch == "mips" && t.Bits == 32) {
|
||||
flags = append(flags, "-arm")
|
||||
}
|
||||
|
||||
@@ -57,7 +57,28 @@ package unix
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/stat.h>
|
||||
#if defined(__sparc__)
|
||||
// On sparc{,64}, the kernel defines struct termios2 itself which clashes with the
|
||||
// definition in glibc. Duplicate the kernel version here.
|
||||
#if defined(__arch64__)
|
||||
typedef unsigned int tcflag_t;
|
||||
#else
|
||||
typedef unsigned long tcflag_t;
|
||||
#endif
|
||||
|
||||
struct termios2 {
|
||||
tcflag_t c_iflag;
|
||||
tcflag_t c_oflag;
|
||||
tcflag_t c_cflag;
|
||||
tcflag_t c_lflag;
|
||||
unsigned char c_line;
|
||||
unsigned char c_cc[19];
|
||||
unsigned int c_ispeed;
|
||||
unsigned int c_ospeed;
|
||||
};
|
||||
#else
|
||||
#include <asm/termbits.h>
|
||||
#endif
|
||||
#include <asm/ptrace.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user