From patchwork Fri Sep 1 00:47:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 9933223 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 347C660309 for ; Fri, 1 Sep 2017 00:47:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25E9D27480 for ; Fri, 1 Sep 2017 00:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AA4427853; Fri, 1 Sep 2017 00:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B087827480 for ; Fri, 1 Sep 2017 00:47:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751276AbdIAAr5 (ORCPT ); Thu, 31 Aug 2017 20:47:57 -0400 Received: from mail-yw0-f170.google.com ([209.85.161.170]:32987 "EHLO mail-yw0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751420AbdIAAr4 (ORCPT ); Thu, 31 Aug 2017 20:47:56 -0400 Received: by mail-yw0-f170.google.com with SMTP id s62so2453559ywg.0 for ; Thu, 31 Aug 2017 17:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=rmLSUjZLUcgz2+Q8D17FQZlEtdU2KqIQAHLCOyept60=; b=mX9Am4mOJgawlbHrfpJ3R/xHknUZXqweWTbD5P43jJdxeLGu5mmJ8PJvxNB8/efAM4 2JaAiiaGnpI2U34M7aj3qH7+XC10lat8v0Ql0omqbIq8aE1dnPx6tfGsigiMyBSECHzp xak94kRZ/wYbp1d8nx2oExLF2HUiHWnunCcyJgoMR910E/fiANg2AaoLqjNLYiUFSNKj UvenxOU+I+3PcRPHphhQ9HfoZUJDwOtLWx6iXuq5utGQJSmKs/UYTy+8L/FhM6G+7h9x TuucVABRN0/CXZg2zNaEjVNKUVDkqDqXry/MYVDAAPYB40EpcwVZNMpqcaKTEYYtbmPn iXpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=rmLSUjZLUcgz2+Q8D17FQZlEtdU2KqIQAHLCOyept60=; b=ZqD5S/mgx23ODhm2VguKALgwVDdhjJjSXQhyE3u2vyrtBobYesBDmjbdi4AwZCkGmw zwKg0AAQZd01o3Zn5KXrdMnBW5qUlC1b7ByDkxbKhTZ0YWR6QiM3uJ8lgG95r3sfUv72 b+d+ZlJUu+pJcyUCq1S4tBcWx2dQRnIaEpvRFJfffEZYBeU42j2NxNOS8P8P29p52jgb wxA6DG0cJ9zkgoPreA+AjGzRfprJQZqkJOMVaMy45CmqHx8Pf71NGufeN2zTwsYGGrpI RRvUItuBTJ+EZHodoR3FtQ6pN5wfBC7GiTA28yZkk/RPt7iDhzMf4H+rLf9nEsHbt144 c95w== X-Gm-Message-State: AHPjjUj4aFlUMu9FsOUASrsc+WQN9NXLekvXGwOxtRfmaw2Qs+sufOLq TAdlx8X3vthcPhmV4kkICFkDeK4/J76F X-Google-Smtp-Source: ADKCNb6ZXNAzpmkfyqcEhwi4PWb0QfeLzlQnM7W6FLSwAi90oDofBOp/VOA0e/4kdGwZQj4zxi52h/vPnhhk1lNLfuw= X-Received: by 10.37.164.1 with SMTP id f1mr212509ybi.151.1504226875782; Thu, 31 Aug 2017 17:47:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.93.198 with HTTP; Thu, 31 Aug 2017 17:47:55 -0700 (PDT) In-Reply-To: <20170831205514.vxmirle2yoc3rm44@taurus.defre.kleine-koenig.org> References: <20170830161435.krq44m5zub4mq43x@taurus.defre.kleine-koenig.org> <20170830173652.2s26nti2s2mgupnd@taurus.defre.kleine-koenig.org> <20170831205514.vxmirle2yoc3rm44@taurus.defre.kleine-koenig.org> From: Christopher Li Date: Thu, 31 Aug 2017 20:47:55 -0400 X-Google-Sender-Auth: HQudT0bfRl-fw4YdQ2bHvcgy30w Message-ID: Subject: Re: sparse test failures on ppc32le (and other not so common archs) To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Ramsay Jones , Linux-Sparse , 873508@bugs.debian.org, Antoine Beaupre Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, Aug 31, 2017 at 4:55 PM, Uwe Kleine-König Yes that works. So to address the Debian bug I can do: > > - move sparse to /usr/lib > - teach cgcc about the move of sparse > - make /usr/bin/sparse call cgcc -no-compile "$@" I don't like that. It means the user can't invoke sparse directly. > > or is it easier to teach sparse about the architecture stuff? First of all. It is not very trivial to teach sparse about the architecture stuff. To my mind, we need to move all the cgcc logic into sparse. For this case, I think it is easier to teach the sparse validation code to use cgcc on those back end testing. Most validation don't need to include system header file at all so it does not have this problem. How about this patch? I know my patch is white space damaged in email. Git branch is at: https://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git/log/?h=llvm-cgcc Please let me know if that fix your problem. It pass check on my local machine running x86_64. I don't have ppc64 to test with. Chris --- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/sparsec b/sparsec index 9dc96c9..2990d26 100755 --- a/sparsec +++ b/sparsec @@ -32,7 +32,8 @@ done TMPLLVM=`mktemp -t tmp.XXXXXX`".llvm" TMPFILE=`mktemp -t tmp.XXXXXX`".o" -$DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM +env CHECK=$DIRNAME/sparse-llvm $DIRNAME/cgcc -no-compile \ + $SPARSEOPTS > $TMPLLVM LLC=`"${LLVM_CONFIG:-llvm-config}" --bindir`/llc diff --git a/sparsei b/sparsei index 3431a9f..3abd00f 100755 --- a/sparsei +++ b/sparsei @@ -10,4 +10,4 @@ if [ $# -eq 0 ]; then exit 1 fi -$DIRNAME/sparse-llvm $@ | $LLI +env CHECK=$DIRNAME/sparse-llvm $DIRNAME/cgcc -no-compile $@ | $LLI