diff options
author | Matt Madison <matt@madison.systems> | 2017-09-22 17:58:21 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-26 11:05:00 +0100 |
commit | af1ee398b3dcedaa9b555391a0768d7b9ca419e3 (patch) | |
tree | 6539bdc8e185b4ac47e563ed6e205c855ee02533 /meta/classes/go.bbclass | |
parent | 988e253f47dd84d6b90efad1c941998bc3e5a117 (diff) | |
download | poky-af1ee398b3dcedaa9b555391a0768d7b9ca419e3.tar.gz |
go: disable PIE flags for cgo
If the security_flags.inc file is included, gcc
will do PIE builds by default. These flags need
to be disabled for go packages that use cgo.
(From OE-Core rev: 5d84042852380fc88b9be8df0e4eeac612c2a6da)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/go.bbclass')
-rw-r--r-- | meta/classes/go.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass index e167c949ec..09b01a84c3 100644 --- a/meta/classes/go.bbclass +++ b/meta/classes/go.bbclass | |||
@@ -50,6 +50,9 @@ GOTOOLDIR = "${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/go/pkg/tool/${BUILD_GOTUPLE} | |||
50 | GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" | 50 | GOTOOLDIR_class-native = "${STAGING_LIBDIR_NATIVE}/go/pkg/tool/${BUILD_GOTUPLE}" |
51 | export GOTOOLDIR | 51 | export GOTOOLDIR |
52 | 52 | ||
53 | SECURITY_CFLAGS = "${SECURITY_NOPIE_CFLAGS}" | ||
54 | SECURITY_LDFLAGS = "" | ||
55 | |||
53 | export CGO_ENABLED ?= "1" | 56 | export CGO_ENABLED ?= "1" |
54 | export CGO_CFLAGS ?= "${CFLAGS}" | 57 | export CGO_CFLAGS ?= "${CFLAGS}" |
55 | export CGO_CPPFLAGS ?= "${CPPFLAGS}" | 58 | export CGO_CPPFLAGS ?= "${CPPFLAGS}" |