Backport go-cross: fix the building failed for quark bsp

submitted to upstream https://github.com/errordeveloper/oe-meta-go

    go-cross: fix the building failed for quark bsp

    Quark used i586 architecture, and golang dealt intel 32bit
    architecture as 386, so export GOARCH = "386" when the TARGET_ARCH
    is i586 to support quark bsp.

    Signed-off-by: fupan li <fupan.li@windriver.com>

Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Amy Fong 2015-10-06 14:41:11 -04:00 committed by Bruce Ashfield
parent 7360250a0f
commit 4988689b73

View File

@ -30,8 +30,11 @@ do_compile() {
export GOOS="linux"
export GOARCH="${TARGET_ARCH}"
# golang only support 386, amd64 and arm architecture.
if [ "${TARGET_ARCH}" = "x86_64" ]; then
export GOARCH="amd64"
elif [ "${TARGET_ARCH}" = "i586" ]; then
export GOARCH="386"
fi
if [ "${TARGET_ARCH}" = "arm" ]
then