remove go-bootstrap, the C-based bootstrap compiler for go, which only
support amd64 and has not been updated for kernel changes or invoking system calls via libc ok jsing@
This commit is contained in:
parent
ede256aaf9
commit
dab9be82b5
@ -43,7 +43,6 @@
|
||||
SUBDIR += ghc
|
||||
SUBDIR += gnucobol
|
||||
SUBDIR += go
|
||||
SUBDIR += go-bootstrap
|
||||
SUBDIR += gpc
|
||||
SUBDIR += gprolog
|
||||
SUBDIR += gravity
|
||||
|
@ -1,102 +0,0 @@
|
||||
# other GO_ARCHS machines use binary bootstraps
|
||||
ONLY_FOR_ARCHS = amd64 i386
|
||||
|
||||
COMMENT = Go programming language
|
||||
|
||||
VERSION = 1.4
|
||||
RELEASE = 20171003
|
||||
DISTNAME = go${VERSION}-bootstrap-${RELEASE}
|
||||
PKGNAME = go-bootstrap-${VERSION}.${RELEASE}
|
||||
CATEGORIES = lang
|
||||
REVISION = 0
|
||||
|
||||
HOMEPAGE = https://golang.org/
|
||||
|
||||
MAINTAINER = Joel Sing <jsing@openbsd.org>
|
||||
|
||||
# software: BSD, documentation: CC-BY-3.0
|
||||
PERMIT_PACKAGE = bootstrap only
|
||||
PERMIT_DISTFILES = bootstrap only
|
||||
|
||||
WANTLIB = c m pthread
|
||||
|
||||
MASTER_SITES = https://dl.google.com/go/
|
||||
|
||||
BUILD_DEPENDS = shells/bash
|
||||
|
||||
SEPARATE_BUILD = Yes
|
||||
CONFIGURE_STYLE = None
|
||||
SUBST_VARS = GOEXE GOCFG
|
||||
|
||||
WRKDIST = ${WRKDIR}/go
|
||||
WRKSRC = ${WRKDIST}/src
|
||||
|
||||
INSTALL_STRIP =
|
||||
|
||||
GOOS = openbsd
|
||||
GOARCH = unknown
|
||||
GOROOT = ${PREFIX}/go/bootstrap
|
||||
|
||||
.if ${MACHINE_ARCH} == "amd64"
|
||||
GOARCH = amd64
|
||||
EXEPREFIX = 6
|
||||
PKG_ARGS += -Damd64=1
|
||||
PKG_ARGS += -Di386=0
|
||||
.elif ${MACHINE_ARCH} == "i386"
|
||||
GOARCH = 386
|
||||
EXEPREFIX = 8
|
||||
PKG_ARGS += -Damd64=0
|
||||
PKG_ARGS += -Di386=1
|
||||
.else
|
||||
PKG_ARGS += -Damd64=0
|
||||
PKG_ARGS += -Di386=0
|
||||
.endif
|
||||
|
||||
GOCFG = /${GOOS}_${GOARCH}
|
||||
GOEXE = ${GOCFG}/${EXEPREFIX}
|
||||
GOTOOLS = pkg/tool/${GOCFG}
|
||||
|
||||
do-configure:
|
||||
. if ${GOARCH} == "unknown"
|
||||
@echo "Unable to determine GOARCH for ${MACHINE_ARCH}."
|
||||
@exit 1
|
||||
. endif
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC} && \
|
||||
CC="${CC}" \
|
||||
CXX="${CXX}" \
|
||||
GOROOT=${WRKDIST} \
|
||||
GOBIN=${WRKDIST}/bin \
|
||||
GOROOT_FINAL=${GOROOT} \
|
||||
./make.bash --no-banner
|
||||
|
||||
do-test:
|
||||
@cd ${WRKSRC} && \
|
||||
ulimit -n 256 -d 2097152 && \
|
||||
PATH=${WRKDIST}/bin:${PATH} \
|
||||
GOROOT=${WRKDIST} \
|
||||
./run.bash
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM_DIR} ${GOROOT}
|
||||
|
||||
${INSTALL_PROGRAM_DIR} ${GOROOT}/bin
|
||||
${INSTALL_PROGRAM} -p ${WRKDIST}/bin/go{,fmt} ${GOROOT}/bin
|
||||
|
||||
find ${WRKDIST} -maxdepth 1 -type f ! -name .git\* ! -name .hg\* \
|
||||
-exec ${INSTALL_DATA} -p {} ${GOROOT} \;
|
||||
|
||||
. for dir in doc include lib misc src pkg
|
||||
cd ${WRKDIST} && \
|
||||
find ${dir} -type d \
|
||||
-exec ${INSTALL_DATA_DIR} ${GOROOT}/{} \; \
|
||||
-o -type f ! -name \*.orig \
|
||||
-exec ${INSTALL_DATA} -p {} ${GOROOT}/{} \;
|
||||
. endfor
|
||||
|
||||
# These get installed via `find' however we need them to be executable
|
||||
${INSTALL_PROGRAM_DIR} ${GOROOT}/${GOTOOLS}
|
||||
${INSTALL_PROGRAM} -p ${WRKDIST}/${GOTOOLS}/* ${GOROOT}/${GOTOOLS}
|
||||
|
||||
.include <bsd.port.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (go1.4-bootstrap-20171003.tar.gz) = 9P9bXrOjyuHJk3I/PqtRnFuuGIZrXl+W/hEC8MtcPlI=
|
||||
SIZE (go1.4-bootstrap-20171003.tar.gz) = 11009739
|
@ -1,11 +0,0 @@
|
||||
Index: src/runtime/defs_openbsd_386.h
|
||||
--- src/runtime/defs_openbsd_386.h.orig
|
||||
+++ src/runtime/defs_openbsd_386.h
|
||||
@@ -14,6 +14,7 @@ enum {
|
||||
MAP_ANON = 0x1000,
|
||||
MAP_PRIVATE = 0x2,
|
||||
MAP_FIXED = 0x10,
|
||||
+ MAP_STACK = 0x4000,
|
||||
|
||||
MADV_FREE = 0x6,
|
||||
|
@ -1,11 +0,0 @@
|
||||
Index: src/runtime/defs_openbsd_amd64.h
|
||||
--- src/runtime/defs_openbsd_amd64.h.orig
|
||||
+++ src/runtime/defs_openbsd_amd64.h
|
||||
@@ -14,6 +14,7 @@ enum {
|
||||
MAP_ANON = 0x1000,
|
||||
MAP_PRIVATE = 0x2,
|
||||
MAP_FIXED = 0x10,
|
||||
+ MAP_STACK = 0x4000,
|
||||
|
||||
MADV_FREE = 0x6,
|
||||
|
@ -1,11 +0,0 @@
|
||||
Index: src/runtime/malloc.h
|
||||
--- src/runtime/malloc.h.orig
|
||||
+++ src/runtime/malloc.h
|
||||
@@ -197,6 +197,7 @@ struct MLink
|
||||
// if accessed. Used only for debugging the runtime.
|
||||
|
||||
void* runtime·sysAlloc(uintptr nbytes, uint64 *stat);
|
||||
+void runtime·sysMarkStack(void *v, uintptr nbytes);
|
||||
void runtime·SysFree(void *v, uintptr nbytes, uint64 *stat);
|
||||
void runtime·SysUnused(void *v, uintptr nbytes);
|
||||
void runtime·SysUsed(void *v, uintptr nbytes);
|
@ -1,21 +0,0 @@
|
||||
Index: src/runtime/mem_openbsd.c
|
||||
--- src/runtime/mem_openbsd.c.orig
|
||||
+++ src/runtime/mem_openbsd.c
|
||||
@@ -27,6 +27,17 @@ runtime·sysAlloc(uintptr n, uint64 *stat)
|
||||
return v;
|
||||
}
|
||||
|
||||
+#pragma textflag NOSPLIT
|
||||
+void
|
||||
+runtime·sysMarkStack(void *v, uintptr n)
|
||||
+{
|
||||
+ void *p;
|
||||
+
|
||||
+ p = runtime·mmap(v, n, PROT_READ|PROT_WRITE, MAP_FIXED|MAP_ANON|MAP_PRIVATE|MAP_STACK, -1, 0);
|
||||
+ if (p == ((void *)-1) || p != v)
|
||||
+ runtime·throw("runtime: failed to mark stack");
|
||||
+}
|
||||
+
|
||||
void
|
||||
runtime·SysUnused(void *v, uintptr n)
|
||||
{
|
@ -1,12 +0,0 @@
|
||||
Index: src/runtime/os_openbsd.c
|
||||
--- src/runtime/os_openbsd.c.orig
|
||||
+++ src/runtime/os_openbsd.c
|
||||
@@ -167,7 +167,7 @@ runtime·newosproc(M *mp, void *stk)
|
||||
|
||||
param.tf_tcb = (byte*)&mp->tls[0];
|
||||
param.tf_tid = (int32*)&mp->procid;
|
||||
- param.tf_stack = stk;
|
||||
+ param.tf_stack = (void*)((uintptr)stk - 8);
|
||||
|
||||
oset = runtime·sigprocmask(SIG_SETMASK, sigset_all);
|
||||
ret = runtime·tfork(¶m, sizeof(param), mp, mp->g0, runtime·mstart);
|
@ -1,19 +0,0 @@
|
||||
Index: src/runtime/stack.c
|
||||
--- src/runtime/stack.c.orig
|
||||
+++ src/runtime/stack.c
|
||||
@@ -67,6 +67,7 @@ poolalloc(uint8 order)
|
||||
s = runtime·MHeap_AllocStack(&runtime·mheap, StackCacheSize >> PageShift);
|
||||
if(s == nil)
|
||||
runtime·throw("out of memory");
|
||||
+ runtime·sysMarkStack((void *)(s->start << PageShift), s->npages << PageShift);
|
||||
if(s->ref != 0)
|
||||
runtime·throw("bad ref");
|
||||
if(s->freelist != nil)
|
||||
@@ -246,6 +247,7 @@ runtime·stackalloc(uint32 n)
|
||||
s = runtime·MHeap_AllocStack(&runtime·mheap, ROUND(n, PageSize) >> PageShift);
|
||||
if(s == nil)
|
||||
runtime·throw("out of memory");
|
||||
+ runtime·sysMarkStack((void *)(s->start << PageShift), s->npages << PageShift);
|
||||
v = (byte*)(s->start<<PageShift);
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
Go is an open source programming language that makes it easy to build simple,
|
||||
reliable, and efficient software.
|
||||
|
||||
This package contains a version of Go that builds natively on OpenBSD and can
|
||||
be used to bootstrap later versions of Go (1.5+) that require an existing Go
|
||||
compiler to build. It exists for bootstrapping lang/go and is not intended for
|
||||
general use or distribution.
|
@ -1,4 +0,0 @@
|
||||
go/bootstrap/src/runtime/zasm_openbsd_amd64.h
|
||||
go/bootstrap/src/runtime/zgoarch_amd64.go
|
||||
go/bootstrap/src/runtime/zruntime_defs_openbsd_amd64.go
|
||||
go/bootstrap/src/runtime/zsys_openbsd_amd64.s
|
@ -1,4 +0,0 @@
|
||||
go/bootstrap/src/runtime/zasm_openbsd_386.h
|
||||
go/bootstrap/src/runtime/zgoarch_386.go
|
||||
go/bootstrap/src/runtime/zruntime_defs_openbsd_386.go
|
||||
go/bootstrap/src/runtime/zsys_openbsd_386.s
|
File diff suppressed because it is too large
Load Diff
@ -82,8 +82,7 @@ ERRORS += "Fatal: This flavor requires an installed go package"
|
||||
.endif
|
||||
|
||||
.if empty(GOROOT_BOOTSTRAP)
|
||||
BUILD_DEPENDS += lang/go-bootstrap
|
||||
GOROOT_BOOTSTRAP = ${GOROOT}/bootstrap
|
||||
ERRORS += "Fatal: No bootstrap available"
|
||||
.endif
|
||||
|
||||
GOCFG = /${GOOS}_${GOARCH}
|
||||
|
Loading…
x
Reference in New Issue
Block a user