go-dep: Fix build with hardening flags

Submitted by Khem Raj on Sept. 22, 2017, 6:05 a.m. | Patch ID: 144416

Details

Message ID 20170922060533.943-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj Sept. 22, 2017, 6:05 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/go/go-dep_0.3.0.bb | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/go/go-dep_0.3.0.bb b/meta/recipes-devtools/go/go-dep_0.3.0.bb
index abfeb48370..20ea792c52 100644
--- a/meta/recipes-devtools/go/go-dep_0.3.0.bb
+++ b/meta/recipes-devtools/go/go-dep_0.3.0.bb
@@ -11,6 +11,10 @@  SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b"
 
 inherit go
 
+TUNE_CCARGS_remove = "-march=mips32r2"
+SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_LDFLAGS = ""
+
 GO_INSTALL = "${GO_IMPORT}/cmd/dep"
 
 RDEPENDS_${PN}-dev += "bash"

Comments

Matt Madison Sept. 22, 2017, 1:13 p.m.
On Thu, Sep 21, 2017 at 11:05 PM, Khem Raj <raj.khem@gmail.com> wrote:
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/go/go-dep_0.3.0.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-devtools/go/go-dep_0.3.0.bb b/meta/recipes-devtools/go/go-dep_0.3.0.bb
> index abfeb48370..20ea792c52 100644
> --- a/meta/recipes-devtools/go/go-dep_0.3.0.bb
> +++ b/meta/recipes-devtools/go/go-dep_0.3.0.bb
> @@ -11,6 +11,10 @@ SRCREV = "7a91b794bbfbf1f3b8b79823799316451127801b"
>
>  inherit go
>
> +TUNE_CCARGS_remove = "-march=mips32r2"
> +SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}"
> +SECURITY_LDFLAGS = ""

The SECURITY* settings should go into go.bbclass, since every go
recipe will need them.

-Matt

> +
>  GO_INSTALL = "${GO_IMPORT}/cmd/dep"
>
>  RDEPENDS_${PN}-dev += "bash"
> --
> 2.14.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core