[meta-virtualization] [PATCH 1/2] kubernetes: building unstripped binaries

Bruce Ashfield bruce.ashfield at gmail.com
Tue Sep 3 13:01:47 PDT 2019


merged

Bruce

On Mon, Sep 2, 2019 at 5:10 AM Hongxu Jia <hongxu.jia at windriver.com> wrote:
>
> On 9/2/19 4:36 PM, Hongxu Jia wrote:
> > Specify GOLDFLAGS as an empty string for building unstripped binaries, which allows
> > you to use code debugging tools like delve. When GOLDFLAGS is unspecified, it defaults
> > to "-s -w" which strips debug information. Other flags that can be used for GOLDFLAGS
> > are documented at https://golang.org/cmd/link/ [1]
>
> Clarify one thing, make the binary *unstripped* at do_compile time,
>
> thus Yocto will split it to stripped + dbg
>
> //Hongxu
>
>
> > [1] https://github.com/kubernetes/kubernetes/blob/master/build/root/Makefile#L82
> >
> > Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
> > ---
> >   recipes-containers/kubernetes/kubernetes_git.bb | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb
> > index b7862ec..821f51f 100644
> > --- a/recipes-containers/kubernetes/kubernetes_git.bb
> > +++ b/recipes-containers/kubernetes/kubernetes_git.bb
> > @@ -54,7 +54,7 @@ do_compile() {
> >       export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> >       export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
> >       # to limit what is built, use 'WHAT', i.e. make WHAT=cmd/kubelet
> > -     make cross KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH}
> > +     make cross KUBE_BUILD_PLATFORMS=${GOOS}/${GOARCH} GOLDFLAGS=""
> >   }
> >
> >   do_install() {
>
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


More information about the meta-virtualization mailing list