From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by mail.openembedded.org (Postfix) with ESMTP id 8A25274A12 for ; Mon, 3 Sep 2018 13:31:42 +0000 (UTC) Received: from ALA-HCA.corp.ad.wrs.com ([147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.1) with ESMTPS id w83DVen6012871 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 3 Sep 2018 06:31:41 -0700 (PDT) Received: from pek-lpg-core1-vm2.wrs.com (128.224.156.107) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.408.0; Mon, 3 Sep 2018 06:31:40 -0700 From: Hongxu Jia To: Date: Mon, 3 Sep 2018 21:31:32 +0800 Message-ID: <1535981492-1670-1-git-send-email-hongxu.jia@windriver.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [PATCH] security_flags.inc: Remove `-fstack-protector-strong' 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: Mon, 03 Sep 2018 13:31:42 -0000 Content-Type: text/plain The `-fstack-protector-***' should be passed to gcc rather than linker, since `4ca946c security_flags: use -fstack-protector-strong', it was added to LDFLAGS, although there is no extra build failure introduced, but it is still unnecessary.(-Wl,** is for linker) Reported-by: Lans Zhang Signed-off-by: Hongxu Jia --- 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 620978a..362b1db 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.7.4