Re: Go packaging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30/09/14 08:46 +0100, Richard W.M. Jones wrote:
How does gccgo affect the packaging of libraries?

The libraries may have support for one or more versions of the go API,
or exclusively one version. Since the gccgo support is usually an API
version or so behind, this compatibility would need to be considered.
Also, many libraries provide unit test files (*_test.go source) that are
tested using `go test` traditionally. Perhaps it is possible to test
them using only gccgo. I had never tried, but just did the following:
```
vbatts@noyee ~/huff (master) $ go test -c -x -compiler gccgo
WORK=/tmp/go-build256629732
mkdir -p $WORK/_/home/vbatts/huff/_test/_/home/vbatts/
mkdir -p $WORK/_/home/vbatts/huff/_test/
cd /home/vbatts/huff
gccgo -I $WORK -c -g -m64 -fgo-pkgpath=_/home/vbatts/huff -fgo-relative-import-path=_/home/vbatts/huff -o $WORK/_/home/vbatts/huff/_test/huff.o ./huffman.go ./words.go ./huffman_test.go ./words_test.go
ar cru $WORK/_/home/vbatts/huff/_test/_/home/vbatts/libhuff.a $WORK/_/home/vbatts/huff/_test/huff.o
cd $WORK/_/home/vbatts/huff/_test
gccgo -I . -I $WORK -c -g -m64 -o ./main.o ./_testmain.go
ar cru ./main.a ./main.o
cd .
gccgo -o $WORK/_/home/vbatts/huff/_test/huff.test $WORK/_/home/vbatts/huff/_test/main.o -Wl,-( -m64 $WORK/_/home/vbatts/huff/_test/_/home/vbatts/libhuff.a -Wl,-)
mkdir -p /home/vbatts/huff/
cp $WORK/_/home/vbatts/huff/_test/huff.test /home/vbatts/huff/huff.test
vbatts@noyee ~/huff (master) $ ./huff.test PASS
```

Perhaps an rpm macro could wrap this?

Attachment: pgp3cdNRtzath.pgp
Description: PGP signature

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux