rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / developer / gcc-11 / patches / 0024-gccgo-should-use-GNU-ar.patch
blob0a2c6ac1d55a424f1e0aa228a5f420e6a81b69c7
1 From e946cd79e9a7d5c327999700ef15353e5a127515 Mon Sep 17 00:00:00 2001
2 From: Petr Sumbera <petr.sumbera@oracle.com>
3 Date: Wed, 13 Nov 2019 18:05:21 +0000
4 Subject: gccgo should use GNU ar
6 Fix following error message:
8 $ /usr/gcc/9/bin/go build main.go
9 ar: bad option: -D
10 usage:
11 ar -d [-SvV] archive [file...]
12 ar -m [-SvV] [-{a|b|i} posname] archive [file...]
13 ar -p [-sSvV] archive [file ...]
14 ar -q [-cSvV] archive [file...]
15 ar -r [-cSuvV] [-{a|b|i} posname] archive [file...]
16 ar -t [-sSvV] archive [file...]
17 ar -x [-CsSTvV] archive [file...]
18 ar [-sSvV] archive
20 The error is harmless, no functionality issue, GCCGO runs Solaris "ar" which
21 doesn't know -D option, after failure, GCCGO runs it again without -D.
22 ---
23 libgo/go/cmd/go/internal/work/gccgo.go | 2 +-
24 libgo/go/go/internal/gccgoimporter/importer_test.go | 2 +-
25 2 files changed, 2 insertions(+), 2 deletions(-)
27 diff --git a/libgo/go/cmd/go/internal/work/gccgo.go b/libgo/go/cmd/go/internal/work/gccgo.go
28 index 36b3f4b05a0..1116206b341 100644
29 --- a/libgo/go/cmd/go/internal/work/gccgo.go
30 +++ b/libgo/go/cmd/go/internal/work/gccgo.go
31 @@ -48,7 +48,7 @@ func (gccgoToolchain) linker() string {
32 func (gccgoToolchain) ar() string {
33 ar := cfg.Getenv("AR")
34 if ar == "" {
35 - ar = "ar"
36 + ar = "/usr/bin/gar"
38 return ar
40 diff --git a/libgo/go/go/internal/gccgoimporter/importer_test.go b/libgo/go/go/internal/gccgoimporter/importer_test.go
41 index 35240c8fe68..65bdb63810c 100644
42 --- a/libgo/go/go/internal/gccgoimporter/importer_test.go
43 +++ b/libgo/go/go/internal/gccgoimporter/importer_test.go
44 @@ -190,7 +190,7 @@ func TestObjImporter(t *testing.T) {
46 runImporterTest(t, imp, initmap, &test)
48 - cmd = exec.Command("ar", "cr", afile, ofile)
49 + cmd = exec.Command("/usr/bin/gar", "cr", afile, ofile)
50 out, err = cmd.CombinedOutput()
51 if err != nil {
52 t.Logf("%s", out)