Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 27EE2E00C78; Wed, 10 Jul 2019 01:45:31 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B41C7E00B65 for ; Wed, 10 Jul 2019 01:45:30 -0700 (PDT) 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 x6A8jSMi010106 (version=TLSv1 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 10 Jul 2019 01:45:28 -0700 (PDT) Received: from pek-lpg-core2.corp.ad.wrs.com (128.224.153.41) by ALA-HCA.corp.ad.wrs.com (147.11.189.40) with Microsoft SMTP Server id 14.3.439.0; Wed, 10 Jul 2019 01:45:28 -0700 From: To: , Date: Wed, 10 Jul 2019 16:45:26 +0800 Message-ID: <1562748326-346221-1-git-send-email-zhe.he@windriver.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [meta-dpdk][PATCH] dpdk: Fix exmples and test _FORTIFY_SOURCE build failure X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2019 08:45:31 -0000 Content-Type: text/plain From: He Zhe When building examples and tests with GCC9, the following errors come up, error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] 382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ cc1: all warnings being treated as errors dpdk itself already appends -O3 the EXTRA_CFLAGS for some of those cases, but dpdk.inc overwrites EXTRA_CFLAGS when evoking make. This patches adds it back. Signed-off-by: He Zhe --- recipes-extended/dpdk/dpdk.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-extended/dpdk/dpdk.inc b/recipes-extended/dpdk/dpdk.inc index a0e081a..9dcec76 100644 --- a/recipes-extended/dpdk/dpdk.inc +++ b/recipes-extended/dpdk/dpdk.inc @@ -106,12 +106,12 @@ do_compile () { cd ${S}/examples/ oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ + EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \ CROSS="${TARGET_PREFIX}" O="${S}/examples/$@/" cd ${S}/test/ oe_runmake EXTRA_LDFLAGS="-L${STAGING_LIBDIR} --hash-style=gnu -fuse-ld=bfd" \ - EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -I${STAGING_INCDIR}" \ + EXTRA_CFLAGS="${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -O3 -I${STAGING_INCDIR}" \ CROSS="${TARGET_PREFIX}" O="${S}/test/$@/" } -- 2.7.4