All of lore.kernel.org
 help / color / mirror / Atom feed
From: Otavio Salvador <otavio@ossystems.com.br>
To: OpenEmbedded Core Mailing List
	<openembedded-core@lists.openembedded.org>
Cc: Will Newton <willn@resin.io>, Otavio Salvador <otavio@ossystems.com.br>
Subject: [PATCH v7 05/12] go.bbclass: remove some xxx_FINAL variables
Date: Mon, 11 Sep 2017 15:28:46 -0300	[thread overview]
Message-ID: <20170911182853.11076-6-otavio@ossystems.com.br> (raw)
In-Reply-To: <20170911182853.11076-1-otavio@ossystems.com.br>

From: Matt Madison <matt@madison.systems>

GOROOT_FINAL is used by the Go linker for rewriting
source paths when the build GOROOT is not the same
as the runtime GOROOT, but the other _FINAL variables
aren't really needed.

Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v7: None
Changes in v6:
- new patch

 meta/classes/go.bbclass | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)

diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 0ff82ca2bb..c0b117d155 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -21,8 +21,7 @@ GO_PARALLEL_BUILD ?= "${@get_go_parallel_make(d)}"
 
 GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go"
 GOROOT = "${STAGING_LIBDIR}/go"
-GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin"
-GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}"
+export GOROOT_FINAL = "${libdir}/go"
 
 DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime"
 DEPENDS_GOLANG_class-native = "go-native"
@@ -38,18 +37,11 @@ GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}"
 export GOTOOLDIR
 export CGO_ENABLED = "1"
 export GOROOT
-export GOROOT_FINAL = "${libdir}/go"
-export GOBIN_FINAL
-export GOPKG_FINAL = "${GOROOT_FINAL}/pkg/${TARGET_GOTUPLE}"
-export GOSRC_FINAL = "${GOROOT_FINAL}/src"
 export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}"
 export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}"
 export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}"
 export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}"
 
-FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}"
-FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*"
-
 GO_INSTALL ?= "${GO_IMPORT}/..."
 GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/"
 
@@ -92,10 +84,10 @@ go_do_compile() {
 do_compile[cleandirs] = "${B}/bin ${B}/pkg"
 
 go_do_install() {
-	install -d ${D}${GOROOT_FINAL}/src/${GO_IMPORT}
+	install -d ${D}${libdir}/go/src/${GO_IMPORT}
 	tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs . | \
-		tar -C ${D}${GOROOT_FINAL}/src/${GO_IMPORT} --no-same-owner -xf -
-	tar -C ${B} -cf - pkg | tar -C ${D}${GOROOT_FINAL} --no-same-owner -xf -
+		tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf -
+	tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf -
 
 	if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then
 		install -d ${D}${bindir}
@@ -104,3 +96,6 @@ go_do_install() {
 }
 
 EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install
+
+FILES_${PN}-dev = "${libdir}/go/src"
+FILES_${PN}-staticdev = "${libdir}/go/pkg"
-- 
2.14.1



  parent reply	other threads:[~2017-09-11 18:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 18:28 [PATCH v7 00/12] Revamp the Go support Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 01/12] go-native: remove dependency on go-bootstrap-native Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 02/12] go-bootstrap-native: remove recipe Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 03/12] go: split out go-runtime into separate recipe Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 04/12] go.bbclass: remove GO_GCFLAGS nad GO_LDFLAGS Otavio Salvador
2017-09-11 18:28 ` Otavio Salvador [this message]
2017-09-11 18:28 ` [PATCH v7 06/12] go.bbclass: clean up CGO_xxx settings Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 07/12] go: rename go.inc -> go-target.inc Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 08/12] go-cross: take GOARM environment setting Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 09/12] go: enable nativesdk builds for the toolchain Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 10/12] go-crosssdk: add recipe Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 11/12] go.bbclass: enable nativesdk builds for Go packages Otavio Salvador
2017-09-11 18:28 ` [PATCH v7 12/12] go-cross-canadian: add recipe Otavio Salvador
2017-09-11 19:00 ` ✗ patchtest: failure for Revamp the Go support (rev7) Patchwork
2017-09-11 19:53   ` Leonardo Sandoval
2017-09-11 20:34     ` Otavio Salvador
2017-09-12  9:45 ` [PATCH v7 00/12] Revamp the Go support Richard Purdie
2017-09-12  9:58   ` Martin Jansa
2017-09-12 11:57     ` Matt Madison
2017-09-12 12:22       ` Martin Jansa
2017-09-12 12:22       ` Otavio Salvador
2017-09-12 11:57   ` Otavio Salvador

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170911182853.11076-6-otavio@ossystems.com.br \
    --to=otavio@ossystems.com.br \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=willn@resin.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.