From patchwork Wed Jan 31 04:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 126308 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp338338ljc; Tue, 30 Jan 2018 20:00:52 -0800 (PST) X-Google-Smtp-Source: AH8x226hA8bxjynW8PBUyCcVLTdwmdAeH62HMVLE1Ak3s83AKYGdx/KWvLHvLCJP3B2rGaikw7QK X-Received: by 10.55.112.132 with SMTP id l126mr44572579qkc.296.1517371252451; Tue, 30 Jan 2018 20:00:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517371252; cv=none; d=google.com; s=arc-20160816; b=IcKwduiMW6O1zj6Nd+idYowz+qp0hMJlKIZl9gAEPBuA9ocIC79mfScUXGXQI6j0BT axH1MS4A2fVu1dBRI+LQPkxHSTzdKENRxacl5aJH/aIjdreYMlZ9oUKsSMQwokXNS0/p 7CwdhgTsouQjHd8c1d4qXFOSn9Q5qVcOEv4bwgDnm6EIzO0p/biaVb1neJdZdLQbEviM oTiHVllfw95tuqbWAx/MkTvBb6YmZ3QC4y0mZXCmn2Bs0zG72bF+i3EKQzryrMOrdAbe QFRdyglUO8bzI4FThuU0781miN/nCaLqMn41mNvqIsV/Bc5pWnoMT74wbkDHpKiOtaLs 3zFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=PpL9/xUilHy3y5MLwS1BKN9JBWo/FUO6ow2bYKwW59g=; b=IDNDYwvIl1y5f9PcHqEINTe6bMZl7rC2Z2rt+mzweTUC7Zz6OBuEg/B1WvqYnGhDEG GwJrOJaPNJR87opjWvzPHGLpJvmZN1rmtoWrfNuhZcInFGPxz+4uWC3/wYgYiuBXW4Jc 3g+Zfme3O9brcyDGfRNDAiP+80K+fYqcGtN5hG9JIl2Tj1sRnYPKtEebWZoHiwKNorj3 slys8kfqZcanijXS4pU9FqczXfleBMSeUDlvzVC9eXDrH/4ClORwSCNXC2ueL2ueiREs EVKafKkkUC391VNVO/aliNgKlCBWR5QLU7CX5gf4lT09KDnp3Sv9Ql3gGvGwy8mQ1+0u A8Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id a9si1377934qka.146.2018.01.30.20.00.52; Tue, 30 Jan 2018 20:00:52 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2023D61754; Wed, 31 Jan 2018 04:00:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id F3C47608E4; Wed, 31 Jan 2018 04:00:17 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id EE0F760813; Wed, 31 Jan 2018 04:00:12 +0000 (UTC) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [37.140.190.180]) by lists.linaro.org (Postfix) with ESMTPS id 0598960750 for ; Wed, 31 Jan 2018 04:00:10 +0000 (UTC) Received: from mxback6g.mail.yandex.net (mxback6g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:167]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 58C8E2A24307 for ; Wed, 31 Jan 2018 07:00:08 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback6g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id I9vganLC4t-082SCuCM; Wed, 31 Jan 2018 07:00:08 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 2Hu8zGb6zj-07VK34S7; Wed, 31 Jan 2018 07:00:07 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 31 Jan 2018 07:00:06 +0300 Message-Id: <1517371206-699-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1517371206-699-1-git-send-email-odpbot@yandex.ru> References: <1517371206-699-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 439 Subject: [lng-odp] [PATCH v1 1/1] travis: build DPDK with clang if it was selected X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Dmitry Eremin-Solenikov gcc-built DPDK is not fully compatible with clang (see https://travis-ci.org/lumag/odp/jobs/335324053 for example). Use clang to compile DPDK if selected compiler is clang. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 439 (lumag:dpdk-clang) ** https://github.com/Linaro/odp/pull/439 ** Patch: https://github.com/Linaro/odp/pull/439.patch ** Base sha: b95ccd3db6eeb7358a877541747e06354429acdd ** Merge commit sha: d2cc4db97bcf26b6a8039f26e4046ea1de48c9d9 **/ .travis.yml | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b7d6cd415..15f13f3b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -100,7 +100,7 @@ before_install: then DPDK_CFLAGS="-m32" ; else - DPDK_CROSS="$CROSS_GNU_TYPE-" ; + DPDK_CFLAGS="--target=$CROSS_GNU_TYPE" ; fi fi ; export CXX="${CC/clang/clang++}"; @@ -158,33 +158,40 @@ install: if [ "${CACHED_DPDK_VERS}" != "${DPDK_VERS}" ]; then rm -rf dpdk fi + - if [ "${CC#clang}" != "${CC}" ] ; + then + DPDKCC=clang ; + else + DPDKCC=gcc ; + fi - | case "$CROSS_ARCH" in "arm64") - DPDK_TARGET="arm64-armv8a-linuxapp-gcc" + DPDK_TARGET="arm64-armv8a-linuxapp-" ;; "armhf") - DPDK_TARGET="arm-armv7a-linuxapp-gcc" + DPDK_TARGET="arm-armv7a-linuxapp-" ;; "i386") - DPDK_TARGET="i686-native-linuxapp-gcc" + DPDK_TARGET="i686-native-linuxapp-" ;; "") - DPDK_TARGET="x86_64-native-linuxapp-gcc" + DPDK_TARGET="x86_64-native-linuxapp-" DPDK_MACHINE=snb ;; esac - | if [ -n "$DPDK_TARGET" ] ; then if [ -n "$DPDK_SHARED" ] ; then - TARGET="$DPDK_TARGET"-shared + TARGET="${DPDK_TARGET}$DPDKCC"-shared LIBDPDKEXT=so export LD_LIBRARY_PATH="`pwd`/${TARGET}:$LD_LIBRARY_PATH" echo $LD_LIBRARY_PATH else - TARGET="$DPDK_TARGET" + TARGET="${DPDK_TARGET}$DPDKCC" LIBDPDKEXT=a fi + DPDK_TARGET="${DPDK_TARGET}gcc" if [ ! -f "dpdk/${TARGET}/lib/libdpdk.$LIBDPDKEXT" ]; then git -c advice.detachedHead=false clone -q --depth=1 --single-branch --branch=v${DPDK_VERS} http://dpdk.org/git/dpdk dpdk pushd dpdk @@ -206,6 +213,9 @@ install: sed -ri -e 's,(CONFIG_RTE_EAL_IGB_UIO=).*,\1n,' .config sed -ri -e 's,(CONFIG_RTE_KNI_KMOD=).*,\1n,' .config fi + sed -ri -e 's,(CONFIG_RTE_TOOLCHAIN=).*,\1"'${DPDKCC}'",' .config + sed -ri -e '/CONFIG_RTE_TOOLCHAIN_.*/d' .config + echo CONFIG_RTE_TOOLCHAIN_${DPDKCC^^}=y >> .config popd make build T=${DPDK_TARGET} O=${TARGET} EXTRA_CFLAGS="-fPIC $DPDK_CFLAGS" CROSS="$DPDK_CROSS" -j $(nproc) rm -r ./doc ./${TARGET}/app ./${TARGET}/build