From patchwork Wed Aug 6 19:16:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Diorcet X-Patchwork-Id: 377353 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 6DF3C1400AA for ; Thu, 7 Aug 2014 05:17:18 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id D35B53FDB1 for ; Wed, 6 Aug 2014 21:17:16 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by hugin.dotsrc.org (Postfix) with ESMTPS id 1A4363FD91 for ; Wed, 6 Aug 2014 21:17:15 +0200 (CEST) Received: by mail-wi0-f180.google.com with SMTP id n3so3760863wiv.1 for ; Wed, 06 Aug 2014 12:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ti+e+xvAok13muaofr9KyYiRcVXg65YenXsAIQvew3k=; b=PPs+N1kJdYRCBVe4bUPvj9MiZndGZI7VJ2PQuEtU/lPnNOOTpaYNTCIw5ZEdU137jv gp+o/kx51oEjQsOafwaRW9zKzAZX6dmJiJMnnD8hlJ4yXPqOwJw0S4xZyz1g65VdMVGB yxT0yZzXOCMjmUr0pe1Xs1S+5nCvwgoWP8LdhWR+3VoQwLrhnotcJDJeWlSsgTRqCxLE bQrrBRa16juKiet3k+kDZRDiWikGQBJjJn5KC9ckKt39WC2uUsxjxS+WYJgbxFp4BEbc c/3bFgxQTQdKIKC9Zd1wUzn3otWI8KOYunXQAOBz9osAj8TWe4EcgblZ7mjWgywkInSh wEoQ== X-Received: by 10.194.9.198 with SMTP id c6mr18478229wjb.131.1407352634548; Wed, 06 Aug 2014 12:17:14 -0700 (PDT) Received: from localhost.localdomain (mut38-h01-31-33-249-220.dsl.sta.abo.bbox.fr. [31.33.249.220]) by mx.google.com with ESMTPSA id ej10sm21057792wib.12.2014.08.06.12.17.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Aug 2014 12:17:13 -0700 (PDT) From: Yann Diorcet To: dev@oe-lite.org Subject: [PATCH 10/20] Clang support Date: Wed, 6 Aug 2014 21:16:41 +0200 Message-Id: <1407352611-7652-10-git-send-email-diorcet.yann@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1407352611-7652-1-git-send-email-diorcet.yann@gmail.com> References: <1407352611-7652-1-git-send-email-diorcet.yann@gmail.com> X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org --- classes/c++.oeclass | 25 ++++++++++++++++++++++--- classes/c.oeclass | 29 +++++++++++++++++++++++------ conf/distro/common.inc | 1 + 3 files changed, 46 insertions(+), 9 deletions(-) diff --git a/classes/c++.oeclass b/classes/c++.oeclass index 8bb21c8..f699ea9 100644 --- a/classes/c++.oeclass +++ b/classes/c++.oeclass @@ -17,9 +17,28 @@ export CXXFLAGS export BUILD_CXX export BUILD_CXXFLAGS -BUILD_CXX = "${BUILD_PREFIX}g++" -HOST_CXX = "${HOST_PREFIX}g++" -TARGET_CXX = "${TARGET_PREFIX}g++" +BUILD_CXX = "${BUILD_PREFIX}${BUILD_CXX_PROG}" +HOST_CXX = "${HOST_PREFIX}${HOST_CXX_PROG}" +TARGET_CXX = "${TARGET_PREFIX}${TARGET_CXX_PROG}" + +# CXX Prog +BUILD_CXX_PROG ?= "g++" +MACHINE_CXX_PROG ?= "g++" +SDK_CXX_PROG ?= "g++" +HOST_CXX_PROG:native = "${BUILD_CXX_PROG}" +HOST_CXX_PROG:cross = "${BUILD_CXX_PROG}" +HOST_CXX_PROG:machine = "${MACHINE_CXX_PROG}" +HOST_CXX_PROG:sdk = "${SDK_CXX_PROG}" +HOST_CXX_PROG:sdk-cross = "${BUILD_CXX_PROG}" +HOST_CXX_PROG:canadian-cross = "${SDK_CXX_PROG}" +TARGET_CXX_PROG:native = "${BUILD_CXX_PROG}" +TARGET_CXX_PROG:cross = "${MACHINE_CXX_PROG}" +TARGET_CXX_PROG:machine = "${MACHINE_CXX_PROG}" +TARGET_CXX_PROG:sdk = "${SDK_CXX_PROG}" +TARGET_CXX_PROG:sdk-cross = "${SDK_CXX_PROG}" +TARGET_CXX_PROG:canadian-cross = "${MACHINE_CXX_PROG}" + + CXX = "${HOST_CXX}" BUILD_CXXFLAGS ?= "${BUILD_CFLAGS} -fpermissive" diff --git a/classes/c.oeclass b/classes/c.oeclass index b236d99..24abb90 100644 --- a/classes/c.oeclass +++ b/classes/c.oeclass @@ -209,9 +209,26 @@ TARGET_LDFLAGS:canadian-cross = "${MACHINE_LDFLAGS} \ # CC export CC = "${HOST_CC}" export BUILD_CC -BUILD_CC = "${BUILD_PREFIX}gcc" -HOST_CC = "${HOST_PREFIX}gcc" -TARGET_CC = "${TARGET_PREFIX}gcc" +BUILD_CC = "${BUILD_PREFIX}${BUILD_CC_PROG}" +HOST_CC = "${HOST_PREFIX}${HOST_CC_PROG}" +TARGET_CC = "${TARGET_PREFIX}${TARGET_CC_PROG}" + +# CC Prog +BUILD_CC_PROG ?= "gcc" +MACHINE_CC_PROG ?= "gcc" +SDK_CC_PROG ?= "gcc" +HOST_CC_PROG:native = "${BUILD_CC_PROG}" +HOST_CC_PROG:cross = "${BUILD_CC_PROG}" +HOST_CC_PROG:machine = "${MACHINE_CC_PROG}" +HOST_CC_PROG:sdk = "${SDK_CC_PROG}" +HOST_CC_PROG:sdk-cross = "${BUILD_CC_PROG}" +HOST_CC_PROG:canadian-cross = "${SDK_CC_PROG}" +TARGET_CC_PROG:native = "${BUILD_CC_PROG}" +TARGET_CC_PROG:cross = "${MACHINE_CC_PROG}" +TARGET_CC_PROG:machine = "${MACHINE_CC_PROG}" +TARGET_CC_PROG:sdk = "${SDK_CC_PROG}" +TARGET_CC_PROG:sdk-cross = "${SDK_CC_PROG}" +TARGET_CC_PROG:canadian-cross = "${MACHINE_CC_PROG}" # CPP export CPP = "${HOST_CPP}" @@ -230,9 +247,9 @@ TARGET_LD = "${TARGET_PREFIX}ld" # CCLD export CCLD = "${HOST_CCLD}" export BUILD_CCLD -BUILD_CCLD = "${BUILD_PREFIX}gcc" -HOST_CCLD = "${HOST_PREFIX}gcc" -TARGET_CCLD = "${TARGET_PREFIX}gcc" +BUILD_CCLD = "${BUILD_PREFIX}${BUILD_CC_PROG}" +HOST_CCLD = "${HOST_PREFIX}${HOST_CC_PROG}" +TARGET_CCLD = "${TARGET_PREFIX}${TARGET_CC_PROG}" # AS export AS = "${HOST_AS}" diff --git a/conf/distro/common.inc b/conf/distro/common.inc index ef08c87..0a9e6af 100644 --- a/conf/distro/common.inc +++ b/conf/distro/common.inc @@ -1,5 +1,6 @@ GCC_VERSION ?= "4.5.3" GCC_VERSION:TARGET_OS_mingw32 ?= "4.5.3" +CLANG_VERSION ?= "3.4" DISTRO_USE_sdk_linux_libc ?= "glibc:2.12.2" DISTRO_USE_sdk_windows_libc ?= "mingw:3.18"