From 2c97fd976f461d44a9a92377c0e34e3d15f894ee Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 15 Apr 2017 10:03:59 -0700 Subject: [PATCH] update nim --- lang/go/Dockerfile | 37 ----------------- lang/go/go-wrapper | 97 -------------------------------------------- lang/go/no-pic.patch | 16 -------- 3 files changed, 150 deletions(-) delete mode 100644 lang/go/Dockerfile delete mode 100644 lang/go/go-wrapper delete mode 100644 lang/go/no-pic.patch diff --git a/lang/go/Dockerfile b/lang/go/Dockerfile deleted file mode 100644 index 4cafa8e..0000000 --- a/lang/go/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -FROM xena/alpine - -RUN apk add --no-cache ca-certificates - -ENV GOLANG_VERSION 1.7.5 -ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz - -# https://golang.org/issue/14851 -COPY no-pic.patch / - -RUN set -ex \ - && apk add --no-cache --virtual go-build-deps \ - bash \ - gcc \ - musl-dev \ - openssl \ - go \ - \ - && export GOROOT_BOOTSTRAP="$(go env GOROOT)" \ - \ - && wget -q "$GOLANG_SRC_URL" -O golang.tar.gz \ - && tar -C /usr/local -xzf golang.tar.gz \ - && rm golang.tar.gz \ - && cd /usr/local/go/src \ - && patch -p2 -i /no-pic.patch \ - && ./make.bash \ - \ - && rm -rf /*.patch \ - && apk del go-build-deps - -ENV GOPATH /go -ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH - -RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" -WORKDIR $GOPATH - -COPY go-wrapper /usr/local/bin/ diff --git a/lang/go/go-wrapper b/lang/go/go-wrapper deleted file mode 100644 index b63e20b..0000000 --- a/lang/go/go-wrapper +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac diff --git a/lang/go/no-pic.patch b/lang/go/no-pic.patch deleted file mode 100644 index b10f290..0000000 --- a/lang/go/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 14f4fa9..5599307 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1272,6 +1272,11 @@ func hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if Debug['v'] != 0 { - fmt.Fprintf(Bso, "host link:") - for _, v := range argv {