1
0
mirror of https://github.com/golang/go synced 2024-11-11 23:10:23 -07:00

build: add include files for Plan 9

Previously, I had made available a tarball of
the modified system headers that were necessary
to build on Plan 9 but that was only a stopgap.
I think this method is much better since no
files outside of $GOROOT will have to be added
or modified during the build process.

Also, this is just the first step. I'll change
the build to reference these files in another CL
(that also contains a few more Makefile changes).

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5552056
This commit is contained in:
Anthony Martin 2012-01-31 18:14:44 -08:00
parent 1583931bcf
commit cc777490fb
6 changed files with 55 additions and 0 deletions

14
include/plan9/386/u.h Normal file
View File

@ -0,0 +1,14 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "/386/include/u.h"
typedef char int8;
typedef uchar uint8;
typedef short int16;
typedef ushort uint16;
typedef int int32;
typedef uint uint32;
typedef vlong int64;
typedef uvlong uint64;

19
include/plan9/libc.h Normal file
View File

@ -0,0 +1,19 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "/sys/include/libc.h"
#include "/sys/include/ctype.h"
enum
{
Runemax = 0x10FFFF, /* maximum rune value */
};
#pragma src "/sys/src/go/src/lib9"
#pragma lib "/sys/src/go/lib/$M/lib9.a"
char* getgoos(void);
char* getgoarch(void);
char* getgoroot(void);
char* getgoversion(void);

7
include/plan9/mach.h Normal file
View File

@ -0,0 +1,7 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#pragma src "/sys/src/go/src/libmach"
#pragma lib "/sys/src/go/lib/$M/libmach.a"
#include "../mach.h"

View File

@ -0,0 +1,5 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "/amd64/include/ureg.h"

5
include/plan9/ureg_arm.h Normal file
View File

@ -0,0 +1,5 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "/arm/include/ureg.h"

5
include/plan9/ureg_x86.h Normal file
View File

@ -0,0 +1,5 @@
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
#include "/386/include/ureg.h"