From patchwork Wed Feb 26 01:08:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Behan Webster X-Patchwork-Id: 25336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0907020143 for ; Wed, 26 Feb 2014 01:11:10 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id w7sf533297qcr.0 for ; Tue, 25 Feb 2014 17:11:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=gcy3kwJB0RL4neStyvP/cWXkTqf1qb5vqWZcxRrzNGg=; b=VHejeUiaGdUcXi5Tu7hUh2h3wmVhvwMjuAafWIB8II8+pGHfQTYLbCHICKxkNwbmAe KElgvLz4bg9VnIhZXdIczYXgEhpygRrU9HSJXwmUnbkiX3/RSDzZcLM97kawzb/96lSz fc4P4LrHG7epZuWZsrxV8Kv7TyLpOeJki2GKWZU2AXdoHROfd0C9b9YObzykbturWAER BZmQQDbdp4C+5MHcRNEsws2+wTQ1B7eLxnewSREFrHyT9cyuQric2itwmj/vvMvQj7dm ElCuCl+y2oBl7dplcz4jWXSOrEkgLlpJqDFoN8MwOUGi3tcUoJSfv9LYTWs6R5ZMYYYN t8Sg== X-Gm-Message-State: ALoCoQmuWYxOHwyRH6mIpZI3FJZTDAe0BTLOvbzAKm6IGddPmiXnLPpEfre0LKWZ4x/sYCNkf01k X-Received: by 10.59.7.2 with SMTP id cy2mr2226186ved.9.1393377070481; Tue, 25 Feb 2014 17:11:10 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.19.136 with SMTP id 8ls18252qgh.43.gmail; Tue, 25 Feb 2014 17:11:10 -0800 (PST) X-Received: by 10.220.95.139 with SMTP id d11mr3511119vcn.21.1393377059448; Tue, 25 Feb 2014 17:10:59 -0800 (PST) Received: from mail-vc0-x233.google.com (mail-vc0-x233.google.com [2607:f8b0:400c:c03::233]) by mx.google.com with ESMTPS id xn5si7257419vdc.146.2014.02.25.17.10.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:10:59 -0800 (PST) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::233; Received: by mail-vc0-f179.google.com with SMTP id lh14so218872vcb.24 for ; Tue, 25 Feb 2014 17:10:59 -0800 (PST) X-Received: by 10.58.37.67 with SMTP id w3mr3535596vej.22.1393377059364; Tue, 25 Feb 2014 17:10:59 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp179600vcz; Tue, 25 Feb 2014 17:10:58 -0800 (PST) X-Received: by 10.66.232.7 with SMTP id tk7mr5090474pac.94.1393377058523; Tue, 25 Feb 2014 17:10:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tg2si4315257pbc.83.2014.02.25.17.10.57; Tue, 25 Feb 2014 17:10:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbaBZBJk (ORCPT + 26 others); Tue, 25 Feb 2014 20:09:40 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:44250 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbaBZBJd (ORCPT ); Tue, 25 Feb 2014 20:09:33 -0500 Received: by mail-pd0-f173.google.com with SMTP id z10so209261pdj.32 for ; Tue, 25 Feb 2014 17:09:33 -0800 (PST) X-Received: by 10.66.161.38 with SMTP id xp6mr4858733pab.145.1393376973204; Tue, 25 Feb 2014 17:09:33 -0800 (PST) Received: from galdor.websterwood.com ([207.6.123.58]) by mx.google.com with ESMTPSA id un5sm154425478pab.3.2014.02.25.17.09.31 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:09:32 -0800 (PST) From: behanw@converseincode.com To: mmarek@suse.cz, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, sparse@chrisli.org Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sparse@vger.kernel.org, torvalds@linux-foundation.org, dwmw2@infradead.org, pageexec@freemail.hu, =?UTF-8?q?Jan-Simon=20M=C3=B6ller?= , Behan Webster , Mark Charlebois Subject: [PATCH 3/5] kbuild: LLVMLinux: Fix LINUX_COMPILER definition script for compilation with clang Date: Tue, 25 Feb 2014 17:08:41 -0800 Message-Id: <1393376923-21892-4-git-send-email-behanw@converseincode.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1393376923-21892-1-git-send-email-behanw@converseincode.com> References: <1393376923-21892-1-git-send-email-behanw@converseincode.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Original-Sender: behanw@converseincode.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=neutral (bad format) header.i=@converseincode.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jan-Simon Möller When building the LINUX_COMPILER definition, instead of merely taking the last line from "$(CC) -v", grep for ' version ' in the output. This supports both gcc and clang. Signed-off-by: Jan-Simon Möller Signed-off-by: Behan Webster Signed-off-by: Mark Charlebois Cc: PaX Team --- scripts/mkcompile_h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index f221ddf..cfb8440 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h @@ -76,7 +76,7 @@ UTS_TRUNCATE="cut -b -$UTS_LEN" echo \#define LINUX_COMPILE_BY \"`echo $LINUX_COMPILE_BY | $UTS_TRUNCATE`\" echo \#define LINUX_COMPILE_HOST \"`echo $LINUX_COMPILE_HOST | $UTS_TRUNCATE`\" - echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -n 1`\" + echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | grep ' version '`\" ) > .tmpcompile # Only replace the real compile.h if the new one is different,