From: Saul Wold <sgw@linux.intel.com>
To: "matt@madison.systems" <matt@madison.systems>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Cc: "otavio@ossystems.com.br" <otavio@ossystems.com.br>
Subject: Re: [PATCH] go-runtime: prevent host leakage into target objects
Date: Tue, 03 Oct 2017 15:07:07 -0700 [thread overview]
Message-ID: <1507068427.7331.292.camel@linux.intel.com> (raw)
In-Reply-To: <1506694551-4487-1-git-send-email-matt@madison.systems>
On Fri, 2017-09-29 at 14:15 +0000, Matt Madison wrote:
> When building for a target whose architecture matches
> the build host's, the second pass through make.bash
> to build the shareable runtime would also overwrite
> the target's static cgo library with host-compatibile
> binaries.
>
> Fix this by running the host-side build once and
> target-only passes of make.bash twice, for static
> and shareable. This ensures that what gets installed
> is target-compatible.
>
> [YOCTO #12136]
>
This does not appear to actually fix the bug mentioned here, I just
found the failure again with intel-corei7-64 (from meta-intel) and then
confirmed that it fails with qemux86-64 and genericx86-64 when using
TCLIBC = "musl"
Can you please verify and test with MUSL.
Thanks
Sau!
> Signed-off-by: Matt Madison <matt@madison.systems>
> ---
> meta/recipes-devtools/go/go-runtime.inc | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/go/go-runtime.inc b/meta/recipes-
> devtools/go/go-runtime.inc
> index 934d1aa..bd26e2e 100644
> --- a/meta/recipes-devtools/go/go-runtime.inc
> +++ b/meta/recipes-devtools/go/go-runtime.inc
> @@ -23,9 +23,13 @@ do_compile() {
> rm -rf ${GOBIN} ${B}/pkg
> mkdir ${GOBIN}
> cd src
> - GO_FLAGS="" ./make.bash
> + ./make.bash --host-only
> + cp ${B}/pkg/tool/${BUILD_GOTUPLE}/go_bootstrap ${B}
> + rm -rf ${B}/pkg/${TARGET_GOTUPLE}
> + ./make.bash --target-only
> if [ -n "${GO_DYNLINK}" ]; then
> - GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-
> extldflags
> \"${LDFLAGS}\"" ./make.bash
> + cp ${B}/go_bootstrap ${B}/pkg/tool/${BUILD_GOTUPLE}
> + GO_FLAGS="-buildmode=shared" GO_LDFLAGS="-
> extldflags
> \"${LDFLAGS}\"" ./make.bash --target-only
> fi
> cd ${B}
> }
> @@ -41,8 +45,9 @@ do_install() {
> rm -rf ${D}${libdir}/go/pkg/obj
> rm -rf ${D}${libdir}/go/pkg/bootstrap
> find src -mindepth 1 -maxdepth 1 -type d | while read
> srcdir; do
> - [ "$srcdir" = "./cmd" ] || cp --
> preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
> + cp --preserve=mode,timestamps -R $srcdir
> ${D}${libdir}/go/src/
> done
> + rm -f ${D}${libdir}/go/src/cmd/dist/dist
> }
>
> # Remove test binaries that cannot be relocated
> --
> 2.7.4
prev parent reply other threads:[~2017-10-03 22:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 14:15 [PATCH] go-runtime: prevent host leakage into target objects Matt Madison
2017-09-29 14:27 ` Otavio Salvador
2017-10-03 22:02 ` Wold, Saul
2017-10-04 11:18 ` Matt Madison
2017-10-03 22:07 ` Saul Wold [this message]
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=1507068427.7331.292.camel@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=matt@madison.systems \
--cc=openembedded-core@lists.openembedded.org \
--cc=otavio@ossystems.com.br \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox