diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2016-10-06 15:34:37 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2016-10-12 19:10:34 -0400 |
commit | 58bc830e732a694ddbdfef8f548387f715bb013c (patch) | |
tree | 9bc1157ad3b961eb298b0a580224db0d3820f577 /recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch | |
parent | 5caa9badba5823f3824fdf6db2b0ce20430a58f2 (diff) | |
download | meta-virtualization-58bc830e732a694ddbdfef8f548387f715bb013c.tar.gz |
go-cross: Fix host contamination for x86_64 host to x86_64 target
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 <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking/openvswitch/openvswitch-git/disable_m4_check.patch')
0 files changed, 0 insertions, 0 deletions