1 From 43267255a1de2e115be5391a1463a4ae99020289 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: [PATCH 26/34] gccgo should use GNU ar
6 Fix following error message:
8 $ /usr/gcc/9/bin/go build main.go
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...]
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.
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 63d5c624f79..4ed59248bf5 100644
29 --- a/libgo/go/cmd/go/internal/work/gccgo.go
30 +++ b/libgo/go/cmd/go/internal/work/gccgo.go
31 @@ -46,7 +46,7 @@ func (gccgoToolchain) linker() string {
32 func (gccgoToolchain) ar() string {
33 ar := cfg.Getenv("AR")
40 diff --git a/libgo/go/go/internal/gccgoimporter/importer_test.go b/libgo/go/go/internal/gccgoimporter/importer_test.go
41 index a74a4568680..51d57555d16 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()