<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/recipes-devtools/go-cross, branch master</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2017-03-20T16:45:10+00:00</updated>
<entry>
<title>tools: remove go from meta-virtualization</title>
<updated>2017-03-20T16:45:10+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2017-03-16T01:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=b44fce825df56c0f26adb6ae1f647ae07f6096ee'/>
<id>urn:sha1:b44fce825df56c0f26adb6ae1f647ae07f6096ee</id>
<content type='text'>
go is now part of oe-core, so we can drop the meta-virt local recipes.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-cross: add ${TARGET_ARCH} to PN</title>
<updated>2017-02-09T14:14:27+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2017-02-08T17:53:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=2ef58c264b21d36255c2754abef43e0bee764ae8'/>
<id>urn:sha1:2ef58c264b21d36255c2754abef43e0bee764ae8</id>
<content type='text'>
Since we are building a cross tool which produces something which is
ARCH specific we should stick to the &lt;toolname&gt;-cross-&lt;arch&gt; naming
convention. A variant of this patch has been floating around for a
while but with the changes around per recipe sysroots, distributed
builds, shared builds... we are best served to adopt this convention
now.

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-native: rename to go-initial-native</title>
<updated>2017-02-09T14:14:26+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2017-02-08T17:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=d475adc71ba14740e1fe9c19493df7275d0737c4'/>
<id>urn:sha1:d475adc71ba14740e1fe9c19493df7275d0737c4</id>
<content type='text'>
With the new per recipe sysroots we were having build issues since the
bootstrap version of go (go-native 1.4) was being found and not the
go-cross (1.6) we are expecting. This results in errors such as the
following when building packages such as containerd:

  _cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0

This is caused by the dependency tree built up to prepare the per
recipe sysroot. Since recipes like containerd DEPEND on go-cross and
go-cross DEPENDS on go-native both are installed but unlike the old
global sysroot the dependency parsing order results in go-native being
last, overwriting go-cross. You can see this by running a devshell for
containerd and running 'go version'.

By adding '-initial' in the name we exploit functionality in
sstate.bbclass that is already in place to handle gcc-initial and
similar. This results in only explicit DEPENDS on go-native being
enforced, so in the case of containerd we only get a dependency on
go-cross and we therefor get go 1.6 as expected.

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-cross: depend on virtual/${TARGET_PREFIX}gcc</title>
<updated>2017-02-01T18:02:47+00:00</updated>
<author>
<name>Mark Asselstine</name>
<email>mark.asselstine@windriver.com</email>
</author>
<published>2017-01-31T21:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=31522fd94295d6d1c7b6c27b4cd913c8f34e7582'/>
<id>urn:sha1:31522fd94295d6d1c7b6c27b4cd913c8f34e7582</id>
<content type='text'>
This fixes the compile time error

 #runtime/cgo
 exec: "x86_64-overc-linux-gcc": executable file not found in $PATH

Since we set CC_FOR_TARGET to ${TARGET_PREFIX}gcc we need to ensure
this is present by adding it to the recipe DEPENDS.

Signed-off-by: Mark Asselstine &lt;mark.asselstine@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>Remove True option to getVar calls</title>
<updated>2017-01-03T15:28:33+00:00</updated>
<author>
<name>Paul Barker</name>
<email>paul@paulbarker.me.uk</email>
</author>
<published>2017-01-01T22:21:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=e64f378b93e6fed8f5e8a019e1c4a82bdad4fe0c'/>
<id>urn:sha1:e64f378b93e6fed8f5e8a019e1c4a82bdad4fe0c</id>
<content type='text'>
getVar() now defaults to expanding by default.

Signed-off-by: Paul Barker &lt;paul@paulbarker.me.uk&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-cross: Fix failure if building go-cross first</title>
<updated>2016-10-19T16:37:52+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2016-10-18T19:51:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=d55a5799384ee0533e855bbec43704c1bd5e448f'/>
<id>urn:sha1:d55a5799384ee0533e855bbec43704c1bd5e448f</id>
<content type='text'>
If go-cross is built as the first package it will fail creating the
target libraries used for cross-compilation because it requires libgcc.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-native: Add work around for binutils &gt;= 2.27</title>
<updated>2016-10-19T16:37:52+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2016-10-18T20:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=c3d8676a0cacc52536bb58828dcfdbc386e6e7c7'/>
<id>urn:sha1:c3d8676a0cacc52536bb58828dcfdbc386e6e7c7</id>
<content type='text'>
We only use go-native to bootstrap go-cross and according to a post in
the go-lang git it is possible to work around by disabling CGO:

https://github.com/golang/go/issues/16906

This patch fixes the compile failure with binutils 2.27 which has the
message:

cannot load DWARF output from $WORK/net/_obj//_cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>go-cross: Fix host contamination for x86_64 host to x86_64 target</title>
<updated>2016-10-12T23:10:34+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2016-10-06T20:34:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=58bc830e732a694ddbdfef8f548387f715bb013c'/>
<id>urn:sha1:58bc830e732a694ddbdfef8f548387f715bb013c</id>
<content type='text'>
The go-cross package is explicitly for compiling target libraries on
the host system.  When the target architecture matches the host
architecture it will actually use the host's linker and compiler
however which can result in the generation of the cgo.a library having
linker symbols which might not work properly when compiling other
packages.

A typical error looks like this when building consul-migrate:

/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/lib/x86_64-linux/go/pkg/tool/linux_amd64/link: running x86_64-yocto-linux-gcc failed: exit status 1
/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-yocto-linux/gcc/x86_64-yocto-linux/5.2.0/ld: /opt/build-intel-x86/tmp/work/core2-64-yocto-linux/consul-migrate/git-r0/build-tmp/go-link-956548052/000002.o: unrecognized relocation (0x2a) in section `.text'
/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-yocto-linux/gcc/x86_64-yocto-linux/5.2.0/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

The fix is to use the make.bash --target-only option to properly build
the libraries with the target toolchain.  The "go" binaries are thrown
away but the cross compilation libraries are preserved.  The sysroot
strip also has to be disabled because it will run the host strip on
the target binaries.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
<entry>
<title>Revert "go-cross: Fix host contamination for x86_64 host to x86_64 target"</title>
<updated>2016-09-24T02:02:19+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@windriver.com</email>
</author>
<published>2016-09-24T02:02:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=05d080dc34417201c232c99b1a8de657b11c7db7'/>
<id>urn:sha1:05d080dc34417201c232c99b1a8de657b11c7db7</id>
<content type='text'>
This is breaking the build of go-cross on some machines:

Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 20 static
| ERROR: oe_runmake failed
| /home/bruce/poky/build/tmp/work/core2-64-poky-linux/containerd/0.2.2+git0ac3cd1be170d180b2baed755e8f0da547ceb267-r0/git
| cd ctr &amp;&amp; go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/ctr
| cd containerd &amp;&amp; go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/containerd
| cd containerd-shim &amp;&amp; go build -ldflags "-w -extldflags -static -X github.com/docker/containerd.GitCommit=0ac3cd1be170d180b2baed755e8f0da547ceb267 " -tags "" -o ../bin/containerd-shim
| # github.com/docker/docker/pkg/term
| cannot load DWARF output from $WORK/github.com/docker/docker/pkg/term/_obj//_cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0
| make: *** [shim-static] Error 2
| make: *** Waiting for unfinished jobs....
| # github.com/docker/docker/pkg/term
| cannot load DWARF output from $WORK/github.com/docker/docker/pkg/term/_obj//_cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0
| # github.com/opencontainers/runc/libcontainer/system
| cannot load DWARF output from $WORK/github.com/opencontainers/runc/libcontainer/system/_obj//_cgo_

This reverts commit 7ff08e542d15b8e0104185768debf360044af7d1.
</content>
</entry>
<entry>
<title>go-cross: Fix host contamination for x86_64 host to x86_64 target</title>
<updated>2016-09-22T14:03:23+00:00</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2016-09-20T17:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=7ff08e542d15b8e0104185768debf360044af7d1'/>
<id>urn:sha1:7ff08e542d15b8e0104185768debf360044af7d1</id>
<content type='text'>
The go-cross package is explicitly for compiling target libraries on
the host system.  When the target architecture matches the host
architecture it will actually use the host's linker and compiler
however which can result in the generation of the cgo.a library having
linker symbols which might not work properly when compiling other
packages.

A typical error looks like this when building consul-migrate:

/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/lib/x86_64-linux/go/pkg/tool/linux_amd64/link: running x86_64-yocto-linux-gcc failed: exit status 1
/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-yocto-linux/gcc/x86_64-yocto-linux/5.2.0/ld: /opt/build-intel-x86/tmp/work/core2-64-yocto-linux/consul-migrate/git-r0/build-tmp/go-link-956548052/000002.o: unrecognized relocation (0x2a) in section `.text'
/opt/build-intel-x86/tmp/sysroots/x86_64-linux/usr/libexec/x86_64-yocto-linux/gcc/x86_64-yocto-linux/5.2.0/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status

The fix is to use the make.bash --target-only option to properly build
the libraries with the target toolchain.

When the host architecture does not match the target architecture we
must also force build the target libraries or they get dynamically
populated into the sysroot in an uncontrolled manner by the first
package that uses go-cross to compile code.

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@windriver.com&gt;
</content>
</entry>
</feed>
