diff options
author | Matt Madison <matt@madison.systems> | 2017-09-12 09:50:23 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-12 23:55:29 +0100 |
commit | 397881ff1b16e18c43ed85b92cba48e8bd6afe78 (patch) | |
tree | c939771d9979f011da56aac90de4c0aa9f67aa51 /meta/classes/go.bbclass | |
parent | 2c3e27b71b72b77f6bbd1da95b96e03cbba61563 (diff) | |
download | poky-397881ff1b16e18c43ed85b92cba48e8bd6afe78.tar.gz |
go.bbclass: remove some xxx_FINAL variables
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.
(From OE-Core rev: 31aa0d8a62be95d093d3c7581efa41f74b9131ad)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 19 |
1 files 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)}" | |||
21 | 21 | ||
22 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" | 22 | GOROOT_class-native = "${STAGING_LIBDIR_NATIVE}/go" |
23 | GOROOT = "${STAGING_LIBDIR}/go" | 23 | GOROOT = "${STAGING_LIBDIR}/go" |
24 | GOBIN_FINAL_class-native = "${GOROOT_FINAL}/bin" | 24 | export GOROOT_FINAL = "${libdir}/go" |
25 | GOBIN_FINAL = "${GOROOT_FINAL}/${GO_BUILD_BINDIR}" | ||
26 | 25 | ||
27 | DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime" | 26 | DEPENDS_GOLANG_class-target = "virtual/${TARGET_PREFIX}go virtual/${TARGET_PREFIX}go-runtime" |
28 | DEPENDS_GOLANG_class-native = "go-native" | 27 | DEPENDS_GOLANG_class-native = "go-native" |
@@ -38,18 +37,11 @@ GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" | |||
38 | export GOTOOLDIR | 37 | export GOTOOLDIR |
39 | export CGO_ENABLED = "1" | 38 | export CGO_ENABLED = "1" |
40 | export GOROOT | 39 | export GOROOT |
41 | export GOROOT_FINAL = "${libdir}/go" | ||
42 | export GOBIN_FINAL | ||
43 | export GOPKG_FINAL = "${GOROOT_FINAL}/pkg/${TARGET_GOTUPLE}" | ||
44 | export GOSRC_FINAL = "${GOROOT_FINAL}/src" | ||
45 | export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}" | 40 | export CGO_CFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CFLAGS}" |
46 | export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" | 41 | export CGO_CPPFLAGS = "${TARGET_CPPFLAGS}" |
47 | export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" | 42 | export CGO_CXXFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_CXXFLAGS}" |
48 | export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" | 43 | export CGO_LDFLAGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS} ${TARGET_LDFLAGS}" |
49 | 44 | ||
50 | FILES_${PN}-staticdev += "${GOSRC_FINAL}/${GO_IMPORT}" | ||
51 | FILES_${PN}-staticdev += "${GOPKG_FINAL}/${GO_IMPORT}*" | ||
52 | |||
53 | GO_INSTALL ?= "${GO_IMPORT}/..." | 45 | GO_INSTALL ?= "${GO_IMPORT}/..." |
54 | GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" | 46 | GO_INSTALL_FILTEROUT ?= "${GO_IMPORT}/vendor/" |
55 | 47 | ||
@@ -92,10 +84,10 @@ go_do_compile() { | |||
92 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" | 84 | do_compile[cleandirs] = "${B}/bin ${B}/pkg" |
93 | 85 | ||
94 | go_do_install() { | 86 | go_do_install() { |
95 | install -d ${D}${GOROOT_FINAL}/src/${GO_IMPORT} | 87 | install -d ${D}${libdir}/go/src/${GO_IMPORT} |
96 | tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs . | \ | 88 | tar -C ${S}/src/${GO_IMPORT} -cf - --exclude-vcs . | \ |
97 | tar -C ${D}${GOROOT_FINAL}/src/${GO_IMPORT} --no-same-owner -xf - | 89 | tar -C ${D}${libdir}/go/src/${GO_IMPORT} --no-same-owner -xf - |
98 | tar -C ${B} -cf - pkg | tar -C ${D}${GOROOT_FINAL} --no-same-owner -xf - | 90 | tar -C ${B} -cf - pkg | tar -C ${D}${libdir}/go --no-same-owner -xf - |
99 | 91 | ||
100 | if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then | 92 | if [ -n "`ls ${B}/${GO_BUILD_BINDIR}/`" ]; then |
101 | install -d ${D}${bindir} | 93 | install -d ${D}${bindir} |
@@ -104,3 +96,6 @@ go_do_install() { | |||
104 | } | 96 | } |
105 | 97 | ||
106 | EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install | 98 | EXPORT_FUNCTIONS do_unpack do_configure do_compile do_install |
99 | |||
100 | FILES_${PN}-dev = "${libdir}/go/src" | ||
101 | FILES_${PN}-staticdev = "${libdir}/go/pkg" | ||