Package: golang
Version: 2:1.5.1-4
Severity: normal
Tags: upstream patch

Whenever gccgo is used via the /usr/bin/go command, it calls "ar cru ...",
which causes this warning:
    $ go build -compiler=gccgo
    # github.com/ecc1/primes
    ar: `u' modifier ignored since `D' is the default (see `U')

Details:
    $ go build -x -compiler=gccgo
    WORK=/tmp/go-build529072590
    mkdir -p $WORK/github.com/ecc1/primes/_obj/
    mkdir -p $WORK/github.com/ecc1/primes/_obj/exe/
    cd /home/ecc/go/src/github.com/ecc1/primes
    /usr/bin/gccgo -I $WORK -c -g -m64 
-fgo-relative-import-path=_/home/ecc/go/src/github.com/ecc1/primes -o 
$WORK/github.com/ecc1/primes/_obj/_go_.o ./primes.go
    ar cru $WORK/github.com/ecc1/libprimes.a 
$WORK/github.com/ecc1/primes/_obj/_go_.o
    # github.com/ecc1/primes
    ar: `u' modifier ignored since `D' is the default (see `U')
    cd .
    /usr/bin/gccgo -o $WORK/github.com/ecc1/primes/_obj/exe/a.out 
$WORK/github.com/ecc1/primes/_obj/_go_.o -Wl,-( -m64 -Wl,-)
    mv $WORK/github.com/ecc1/primes/_obj/exe/a.out primes

The attached patch simply uses "ar cr" instead.  The extra I/O for
unchanged archive members is probably negligible.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gccgo depends on:
ii  cpp      4:5.2.1-8
ii  gcc      4:5.2.1-8
ii  gccgo-5  5.2.1-23

gccgo recommends no packages.

Versions of packages gccgo suggests:
pn  gccgo-multilib  <none>

-- no debconf information

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing'), (400, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages golang depends on:
ii  golang-doc  2:1.5.1-4
ii  golang-go   2:1.5.1-4
ii  golang-src  2:1.5.1-4

golang recommends no packages.

golang suggests no packages.

-- no debconf information
--- src/cmd/go/build.go~	2015-09-08 21:24:01.000000000 -0400
+++ src/cmd/go/build.go	2015-12-05 14:08:48.360369642 -0500
@@ -2448,7 +2448,7 @@
 	for _, f := range ofiles {
 		absOfiles = append(absOfiles, mkAbs(objDir, f))
 	}
-	return b.run(p.Dir, p.ImportPath, nil, "ar", "cru", mkAbs(objDir, afile), absOfiles)
+	return b.run(p.Dir, p.ImportPath, nil, "ar", "cr", mkAbs(objDir, afile), absOfiles)
 }
 
 func (tools gccgoToolchain) ld(b *builder, root *action, out string, allactions []*action, mainpkg string, ofiles []string) error {

Reply via email to