diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch')
-rw-r--r-- | poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch b/poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch new file mode 100644 index 000000000..ffd9f2359 --- /dev/null +++ b/poky/meta/recipes-devtools/go/go-1.9/0003-make.bash-better-separate-host-and-target-builds.patch @@ -0,0 +1,92 @@ +From 31e88f06af7ab787d8fe0c1ca625193e1799e167 Mon Sep 17 00:00:00 2001 +From: Matt Madison <matt@madison.systems> +Date: Wed, 13 Sep 2017 08:12:04 -0700 +Subject: [PATCH 3/7] make.bash: better separate host and target builds + +Fore OE cross-builds, the simple checks in make.bash are +insufficient for distinguishing host and target build +environments, so add some options for telling the +script which parts are being built. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Matt Madison <matt@madison.systems> +--- + src/make.bash | 51 ++++++++++++++++++++++++++++----------------------- + 1 file changed, 28 insertions(+), 23 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index dcf3256..9553623 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -156,13 +156,22 @@ if [ "$1" = "--no-clean" ]; then + buildall="" + shift + fi +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++do_host_build="yes" ++do_target_build="yes" ++if [ "$1" = "--target-only" ]; then ++ do_host_build="no" ++ shift ++elif [ "$1" = "--host-only" ]; then ++ do_target_build="no" ++ shift ++fi + +-# Delay move of dist tool to now, because bootstrap may clear tool directory. +-mv cmd/dist/dist "$GOTOOLDIR"/dist +-echo ++if [ "$do_host_build" = "yes" ]; then ++ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ # Delay move of dist tool to now, because bootstrap may clear tool directory. ++ mv cmd/dist/dist "$GOTOOLDIR"/dist ++ echo + +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +@@ -171,24 +180,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then + echo + fi + +-echo "##### Building packages and commands for $GOOS/$GOARCH." +- +-old_bin_files=$(cd $GOROOT/bin && echo *) +- +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd +- +-# Check that there are no new files in $GOROOT/bin other than go and gofmt +-# and $GOOS_$GOARCH (a directory used when cross-compiling). +-(cd $GOROOT/bin && for f in *; do +- if ! expr " $old_bin_files go gofmt ${GOOS}_${GOARCH} " : ".* $f " >/dev/null 2>/dev/null; then +- echo 1>&2 "ERROR: unexpected new file in $GOROOT/bin: $f" +- exit 1 +- fi +-done) +- +-echo +- +-rm -f "$GOTOOLDIR"/go_bootstrap ++if [ "$do_target_build" = "yes" ]; then ++ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" ++ echo "##### Building packages and commands for $GOOS/$GOARCH." ++ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then ++ rm -rf ./host-tools ++ mkdir ./host-tools ++ mv "$GOTOOLDIR"/* ./host-tools ++ GOTOOLDIR="$PWD/host-tools" ++ fi ++ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} ++ echo ++ ++ rm -f "$GOTOOLDIR"/go_bootstrap ++fi + + if [ "$1" != "--no-banner" ]; then + "$GOTOOLDIR"/dist banner +-- +2.7.4 + |