Return-Path: X-Greylist: delayed 916 seconds by postgrey-1.34 at layers.openembedded.org; Thu, 02 Jan 2020 11:09:25 UTC Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by mail.openembedded.org (Postfix) with ESMTP id 3D9E37FC42 for ; Thu, 2 Jan 2020 11:09:25 +0000 (UTC) Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A5618AA3C54B1F5689FF for ; Thu, 2 Jan 2020 18:54:08 +0800 (CST) Received: from HULK-Android.huawei.com (10.113.189.218) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.439.0; Thu, 2 Jan 2020 18:54:01 +0800 From: Junling Zheng To: Date: Thu, 2 Jan 2020 18:53:53 +0800 Message-ID: <20200102105353.633-1-zhengjunling@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.113.189.218] X-CFilter-Loop: Reflected Cc: wangnan0@huawei.com Subject: [PATCH] security_flags: Remove stack protector flags from LDFLAGS X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jan 2020 11:09:26 -0000 Content-Type: text/plain The stack protector flag is a compile option, not a link option, so remove it from LDFLAGS. Signed-off-by: Junling Zheng --- meta/conf/distro/include/security_flags.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc index aaf04e9e59..5b79340be9 100644 --- a/meta/conf/distro/include/security_flags.inc +++ b/meta/conf/distro/include/security_flags.inc @@ -26,8 +26,8 @@ SECURITY_STACK_PROTECTOR ?= "-fstack-protector-strong" SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" SECURITY_NO_PIE_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" -SECURITY_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro,-z,now" -SECURITY_X_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro" +SECURITY_LDFLAGS ?= "-Wl,-z,relro,-z,now" +SECURITY_X_LDFLAGS ?= "-Wl,-z,relro" # powerpc does not get on with pie for reasons not looked into as yet GCCPIE_powerpc = "" -- 2.17.1