From patchwork Tue Apr 15 22:28:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Li X-Patchwork-Id: 3995781 Return-Path: X-Original-To: patchwork-linux-sparse@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC52A9F2BA for ; Tue, 15 Apr 2014 22:28:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13AE12021A for ; Tue, 15 Apr 2014 22:28:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2E78220103 for ; Tue, 15 Apr 2014 22:28:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211AbaDOW2k (ORCPT ); Tue, 15 Apr 2014 18:28:40 -0400 Received: from mail-qc0-f171.google.com ([209.85.216.171]:53679 "EHLO mail-qc0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751744AbaDOW2i (ORCPT ); Tue, 15 Apr 2014 18:28:38 -0400 Received: by mail-qc0-f171.google.com with SMTP id c9so11137715qcz.2 for ; Tue, 15 Apr 2014 15:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=yFDR/ZEQi6NJcD/IYhk+qmTzWSj6IF4wJCdtxvKBZyU=; b=K5lUM/T+RBA/bbJ7gKyXUphv1bsyi/vIfferjSt1jE1Lpaw0xTlmYD/9oEcFBKcfnl UIIziu4YM6lSH9AW44bDwPJHsVr1o7OgHmy8kisp2G70OXhMhmDYYdEoqbV3a0NdZ+Q2 ZhgenOyRrgy/7EJ1a/Okb8aJBzFwneQks3IRh7cnXQx/cglCDRS/BvG8MivTxEI36KbH OLks0o+PswtWEqySi2FwEx/XF6duMMqzhJRM+hbTsG9g89AHP1z16JYwuqz8wvvtHQxs e6wi7jfwAoEzsQv+cfsiAkS8F1tbQaLkY+JSrCT9KZ36lFjSve2Cfk1iOdfm/jW6tlUE p/8Q== MIME-Version: 1.0 X-Received: by 10.140.105.118 with SMTP id b109mr6129514qgf.28.1397600918131; Tue, 15 Apr 2014 15:28:38 -0700 (PDT) Received: by 10.140.21.209 with HTTP; Tue, 15 Apr 2014 15:28:38 -0700 (PDT) In-Reply-To: <1397591489-17411-1-git-send-email-cody@linux.vnet.ibm.com> References: <1397591489-17411-1-git-send-email-cody@linux.vnet.ibm.com> Date: Tue, 15 Apr 2014 15:28:38 -0700 X-Google-Sender-Auth: TFmdTQ1vkEOv6Zq6HGgIERxbF-E Message-ID: Subject: Re: [PATCH] sparse{i,c}: use LLVM_CONFIG to find llc and lli From: Christopher Li To: Cody P Schafer Cc: Linux-Sparse Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Apr 15, 2014 at 12:51 PM, Cody P Schafer wrote: > Some systems have multiple llvm versions installed, and have prefixed > executables ("-"). While we could require the user to > specify a variable for each executable (LLC, LLI), using llvm-config > --bindir to locate them and allowing them to override using LLVM_CONFIG > makes much less work. How about this minor incremental patch? It will use the default variable to make the change smaller. 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 f8e7256..9dc96c9 100755 --- a/sparsec +++ b/sparsec @@ -34,11 +34,9 @@ TMPFILE=`mktemp -t tmp.XXXXXX`".o" $DIRNAME/sparse-llvm $SPARSEOPTS > $TMPLLVM -if [ -z "$LLVM_CONFIG" ]; then - LLVM_CONFIG=llvm-config -fi +LLC=`"${LLVM_CONFIG:-llvm-config}" --bindir`/llc -`"$LLVM_CONFIG" --bindir`/llc -o - $TMPLLVM | as -o $TMPFILE +$LLC -o - $TMPLLVM | as -o $TMPFILE if [ $NEED_LINK -eq 1 ]; then if [ -z $OUTFILE ]; then diff --git a/sparsei b/sparsei index 7a2e0f1..3431a9f 100755 --- a/sparsei +++ b/sparsei @@ -3,10 +3,7 @@ set +e DIRNAME=`dirname $0` -if [ -z "$LLVM_CONFIG" ]; then - LLVM_CONFIG=llvm-config -fi -LLI=`"$LLVM_CONFIG" --bindir`/lli +LLI=`"${LLVM_CONFIG:-llvm-config}" --bindir`/lli if [ $# -eq 0 ]; then echo "`basename $0`: no input files"