[OE-core] [PATCH 2/2] go-examples: Add an example, helloworld written in go

Khem Raj raj.khem at gmail.com
Mon Nov 14 02:07:47 UTC 2016



On 11/10/16 6:59 PM, Christopher Larson wrote:
> 
> On Wed, Nov 9, 2016 at 5:39 PM, Khem Raj <raj.khem at gmail.com
> <mailto:raj.khem at gmail.com>> wrote:
> 
>     diff --git a/meta/recipes-extended/go-examples/go-examples.inc
>     b/meta/recipes-extended/go-examples/go-examples.inc
>     new file mode 100644
>     index 0000000..c632681
>     --- /dev/null
>     +++ b/meta/recipes-extended/go-examples/go-examples.inc
>     @@ -0,0 +1,10 @@
>     +DESCRIPTION = "This is a simple example recipe that cross-compiles a Go
>     program."
>     +SECTION = "examples"
>     +HOMEPAGE = "https://golang.org/"
>     +
>     +LICENSE = "MIT"
>     +LIC_FILES_CHKSUM =
>     "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>     +
>     +S = "${WORKDIR}"
>     +
>     +inherit go
>     diff --git a/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     new file mode 100644
>     index 0000000..af9d3b7
>     --- /dev/null
>     +++ b/meta/recipes-extended/go-examples/go-helloworld_0.1.bb
>     <http://go-helloworld_0.1.bb>
>     @@ -0,0 +1,15 @@
>     +require go-examples.inc
>     +
>     +
>     +SRC_URI += " \
>     +  file://helloworld.go \
>     +"
>     +
>     +do_compile() {
>     +  go build helloworld.go
>     +}
> 
> 
> Under what circumstances would one use the go_do_compile from go.bbclass vs this?

I think this is a good point. It would be more appropriate to use
the primitives from go.bbclass in this example. I will try to rework it

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20161113/f5ab91f0/attachment-0002.sig>


More information about the Openembedded-core mailing list