user avatar
Backport go-cross: fix the bug of cross building error
Amy Fong authored
submitted to upstream https://github.com/errordeveloper/oe-meta-go



    go-cross: fix the bug of cross building error

    When a package's recipe inherit "cross" bbclass, its CC and CXX are defined
    as the host native gcc and g++ instead of the host cross toolchain, fot this
    case, CC_FOR_TARGET and CXX_FOR_TARGET should be defined the same with CC and
    CXX, instead they are should be define as host cross toolchain's CC and CXX,
    otherwise, it will build failed for target arm architecture as below:

    | # Building packages and commands for linux/arm.
    | + CC='gcc '
    | + bitbake_build/tmp/work/x86_64-wrs-linux-gnueabi/go-cross/1.4-r0/go/pkg/tool/linux_amd64/go_bootstrap install -ccflags '' -gcflags '' -ldflags '' -v std
    | runtime
    | errors
    | sync/atomic
    | unicode
    | unicode/utf8
    | math
    | sort
    | encoding
    | unicode/utf16
    | container/list
    | crypto/subtle
    | runtime/cgo
    | container/ring
    | image/color
    | runtime/race
    | # runtime/cgo
    | gcc: error: unrecognized command line option '-marm'

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

Signed-off-by: default avatarAmy Fong <amy.fong@windriver.com>
Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
7360250a
Name Last commit Last update