This commit is contained in:
milisbir 2018-07-06 11:56:33 +02:00
parent 87481ea2b8
commit 643bde18a5
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
index 7f894f5..a517887 100644
--- a/src/cmd/go/internal/work/init.go
+++ b/src/cmd/go/internal/work/init.go
@@ -111,7 +111,8 @@ func buildModeInit() {
ldBuildmode = "c-shared"
case "default":
switch platform {
- case "android/arm", "android/arm64", "android/amd64", "android/386":
+ case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le",
+ "android/arm", "android/arm64", "android/amd64", "android/386":
codegenArg = "-shared"
ldBuildmode = "pie"
case "darwin/arm", "darwin/arm64":

View File

@ -0,0 +1,44 @@
# Tanım: GO Programlama dili
# URL: http://golang.org/
# Paketçi: milisarge
# Gerekler: git go
# Grup: geliştirme
isim=go
surum=1.10.3
devir=1
kaynak=(https://storage.googleapis.com/golang/go$surum.src.tar.gz
default-buildmode-pie.patch)
derle() {
export GOOS=linux
case "$CARCH" in
x86_64) export GOARCH=amd64 ;;
esac
export GOROOT_FINAL=/usr/lib/go
export GOROOT_BOOTSTRAP=/usr/lib/go
export GOCACHE=off
cp -r go go-pie
cd go-pie
patch -p1 -i "$SRC"/default-buildmode-pie.patch
export GOPATH="$SRC/"
for _isim in `echo "go go-pie"`; do
export GOROOT="$SRC/$_isim"
export GOBIN="$GOROOT/bin"
cd "$SRC/$_isim/src"
./make.bash --no-clean -v
PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
PATH="$GOBIN:$PATH" go install -v -race std
done
cd $SRC/go
install -d "$PKG/usr/bin" "$PKG/usr/lib/go"
cp -a bin pkg src lib misc api "$PKG/usr/lib/go"
#cp -r doc/* "$PKG/usr/share/doc/go"
ln -sf /usr/lib/go/bin/go "$PKG/usr/bin/go"
ln -sf /usr/lib/go/bin/gofmt "$PKG/usr/bin/gofmt"
install -Dm644 LICENSE "$PKG/usr/share/licenses/go/LICENSE"
install -Dm644 VERSION "$PKG/usr/lib/go/VERSION"
rm -rf "$PKG/usr/lib/go/pkg/bootstrap"
rm -rf "$PKG/usr/lib/go/pkg/tool/*/api"
}