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: 3719901 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E8128BF13A for ; Wed, 26 Feb 2014 01:09:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0C5220204 for ; Wed, 26 Feb 2014 01:09:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EA5C201FB for ; Wed, 26 Feb 2014 01:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751966AbaBZBJe (ORCPT ); Tue, 25 Feb 2014 20:09:34 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:38097 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751491AbaBZBJd (ORCPT ); Tue, 25 Feb 2014 20:09:33 -0500 Received: by mail-pd0-f177.google.com with SMTP id g10so211817pdj.22 for ; Tue, 25 Feb 2014 17:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=converseincode.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=NIynBQ+2FvEkmeTQF6+IoMI/FoucD+qVlyW4HhdOhuQ=; b=mBw2h105ZcHU6ao7ex+lHsdkqEca4wEpwtoDe7xdlbAy/R41eQNrS0TntdobCs2iz0 a2Bhck0UZZQceUBPu0/DLI8hmDy59F+9M907gSnKm6Q2KFMxCRWTqFsOprysG2VE3d42 EiEUeaAgpgpBiNji/wh7+aHsXw8cTMFMEvLXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=NIynBQ+2FvEkmeTQF6+IoMI/FoucD+qVlyW4HhdOhuQ=; b=B19wHVRPbayTs345f+KDwK2AZ0Ft+sUpOisTh4Vwf2uRp3ObngQROd1j0nNe4Tsg9Z OOciFPQVQdhRub2p7Ji56nk1rIMA8bbkwQTMSmyZEUk7kp6L1/yFl89OCBzo9QxNoN0j sA/cJSdbjuBFPLFqwiH9QhbS5tBR+ItE9cMS80+9gvoBPbU3FOzvQZLoc+OrVlWcfRhU llgf1zlaSNK2M2L350UteOGvOQCWKBpsd+AXOm6a8AKDpyy21EAxzI+SMyje/D/O3bNG W+Q9CaGxHyIvty8LfmLv2bvwi9eog0Nnh2Co7GF5zp8G61KQrhVs0UF3aRbVKx+9bS2p RSog== X-Gm-Message-State: ALoCoQlZbHKtvGk+bTCPS8kLBMRFQ4lEcozPLbDuiXghg/JAw4bWZ7YJxVIS8LiZeIIailooalbz 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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, KHOP_BIG_TO_CC,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 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,