picolisp: Update from 17.8.7 to 17.9.1
[termux-packages] / packages / golang / src-cmd-go-build.go.patch
CommitLineData
0d6ef2ea
FF
1diff -u -r ../go/src/cmd/go/build.go ./src/cmd/go/build.go
2--- ../go/src/cmd/go/build.go 2016-08-15 18:47:58.000000000 -0400
3+++ ./src/cmd/go/build.go 2016-08-18 18:05:18.471655968 -0400
4@@ -2846,7 +2846,7 @@
5 ldflags = append(ldflags, "-Wl,-r", "-nostdlib", "-Wl,--whole-archive", "-lgolibbegin", "-Wl,--no-whole-archive")
6
7 if b.gccSupportsNoPie() {
8- ldflags = append(ldflags, "-no-pie")
9+ ldflags = append(ldflags, "-nopie")
10 }
11
12 // We are creating an object file, so we don't want a build ID.
13@@ -3029,7 +3029,7 @@
14 }
15 }
16
17- if strings.Contains(a[0], "clang") {
18+ if runtime.GOOS == "android" {
19 // disable ASCII art in clang errors, if possible
20 a = append(a, "-fno-caret-diagnostics")
21 // clang is too smart about command-line arguments
22@@ -3064,7 +3064,7 @@
23 // -no-pie must be passed when doing a partial link with -Wl,-r. But -no-pie is
24 // not supported by all compilers.
25 func (b *builder) gccSupportsNoPie() bool {
26- return b.gccSupportsFlag("-no-pie")
27+ return b.gccSupportsFlag("-nopie")
28 }
29
30 // gccSupportsFlag checks to see if the compiler supports a flag.
31@@ -3383,7 +3383,7 @@
32 ldflags := stringList(bareLDFLAGS, "-Wl,-r", "-nostdlib", staticLibs)
33
34 if b.gccSupportsNoPie() {
35- ldflags = append(ldflags, "-no-pie")
36+ ldflags = append(ldflags, "-nopie")
37 }
38
39 // We are creating an object file, so we don't want a build ID.