From cc7b179917c715b29822200fe91ecd755a5750e6 Mon Sep 17 00:00:00 2001 From: Matt Madison Date: Sun, 4 Mar 2018 13:09:34 -0800 Subject: go: disable PIE CFLAGS for nativesdk and cross-canadian builds The statically-linked Go code in the toolchain is not compatible with PIE, so disable its use in the C compiler during the toolchain build. Signed-off-by: Matt Madison Signed-off-by: Ross Burton --- meta/recipes-devtools/go/go-cross-canadian.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'meta/recipes-devtools/go/go-cross-canadian.inc') diff --git a/meta/recipes-devtools/go/go-cross-canadian.inc b/meta/recipes-devtools/go/go-cross-canadian.inc index e630b83df8..ea68b8875d 100644 --- a/meta/recipes-devtools/go/go-cross-canadian.inc +++ b/meta/recipes-devtools/go/go-cross-canadian.inc @@ -12,13 +12,13 @@ export GOTOOLDIR_BOOTSTRAP = "${STAGING_LIBDIR_NATIVE}/${HOST_SYS}/go/pkg/tool/$ export GOROOT_FINAL = "${libdir}/go" export CGO_CFLAGS = "${CFLAGS}" export CGO_LDFLAGS = "${LDFLAGS}" -export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${HOST_CC_ARCH} ${LDFLAGS}"' +export GO_LDFLAGS = '-linkmode external -extld ${HOST_PREFIX}gcc -extldflags "--sysroot=${STAGING_DIR_HOST} ${SECURITY_NOPIE_CFLAGS} ${HOST_CC_ARCH} ${LDFLAGS}"' do_configure[noexec] = "1" do_compile() { - export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}" - export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE}" + export CC_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gcc --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" + export CXX_FOR_${HOST_GOOS}_${HOST_GOARCH}="${HOST_PREFIX}gxx --sysroot=${STAGING_DIR_HOST}${SDKPATHNATIVE} ${SECURITY_NOPIE_CFLAGS}" cd src ./make.bash --host-only --no-banner cd ${B} -- cgit 1.2.3-korg