diff options
Diffstat (limited to 'recipes-devtools/go/go-build_git.bb')
| -rw-r--r-- | recipes-devtools/go/go-build_git.bb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/recipes-devtools/go/go-build_git.bb b/recipes-devtools/go/go-build_git.bb index e057b6d7..3ac86084 100644 --- a/recipes-devtools/go/go-build_git.bb +++ b/recipes-devtools/go/go-build_git.bb | |||
| @@ -8,6 +8,7 @@ SRCREV_runc = "e4363b038787addfa12e8b0acf5417d4fba01693" | |||
| 8 | SRC_URI = "\ | 8 | SRC_URI = "\ |
| 9 | git://github.com/lf-edge/runx;nobranch=1;name=runx \ | 9 | git://github.com/lf-edge/runx;nobranch=1;name=runx \ |
| 10 | git://github.com/opencontainers/runc.git;nobranch=1;destsuffix=runc;name=runc \ | 10 | git://github.com/opencontainers/runc.git;nobranch=1;destsuffix=runc;name=runc \ |
| 11 | file://0001-build-use-instead-of-go.patch \ | ||
| 11 | " | 12 | " |
| 12 | SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b" | 13 | SRC_URI[md5sum] = "0d701ac1e2a67d47ce7127432df2c32b" |
| 13 | SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769" | 14 | SRC_URI[sha256sum] = "5a26478906d5005f4f809402e981518d2b8844949199f60c4b6e1f986ca2a769" |
| @@ -34,9 +35,22 @@ do_compile() { | |||
| 34 | export GOARCH="${TARGET_GOARCH}" | 35 | export GOARCH="${TARGET_GOARCH}" |
| 35 | cd ${S}/src/import/gobuild | 36 | cd ${S}/src/import/gobuild |
| 36 | mkdir -p go/src/github.com/opencontainers | 37 | mkdir -p go/src/github.com/opencontainers |
| 37 | ln -s ${WORKDIR}/runc ${S}/src/import/gobuild/go/src/github.com/opencontainers/runc | 38 | ln -sf ${WORKDIR}/runc ${S}/src/import/gobuild/go/src/github.com/opencontainers/runc |
| 38 | export GOPATH="${S}/src/import/gobuild/go/src/github.com/opencontainers/runc" | 39 | export GOPATH="${S}/src/import/gobuild/go/src/github.com/opencontainers/runc" |
| 39 | oe_runmake | 40 | |
| 41 | # Build the target binaries | ||
| 42 | export GOARCH="${TARGET_GOARCH}" | ||
| 43 | # Pass the needed cflags/ldflags so that cgo can find the needed headers files and libraries | ||
| 44 | export CGO_ENABLED="1" | ||
| 45 | export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 46 | export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" | ||
| 47 | export CFLAGS="" | ||
| 48 | export LDFLAGS="" | ||
| 49 | export CC="${CC}" | ||
| 50 | export LD="${LD}" | ||
| 51 | export GOBIN="" | ||
| 52 | |||
| 53 | oe_runmake GO=${GO} | ||
| 40 | } | 54 | } |
| 41 | 55 | ||
| 42 | do_install() { | 56 | do_install() { |
