From patchwork Sun Jun 10 20:54:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Kogut X-Patchwork-Id: 927428 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="PzoQ3igG"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 413pL75PLhz9s31 for ; Mon, 11 Jun 2018 06:54:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 491F9880FA; Sun, 10 Jun 2018 20:54:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eUu3zEFjTZys; Sun, 10 Jun 2018 20:54:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 0FC63880B9; Sun, 10 Jun 2018 20:54:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DAA421C01B3 for ; Sun, 10 Jun 2018 20:54:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D806C85E67 for ; Sun, 10 Jun 2018 20:54:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X1-EVb6doMyY for ; Sun, 10 Jun 2018 20:54:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by whitealder.osuosl.org (Postfix) with ESMTPS id B547A85D8D for ; Sun, 10 Jun 2018 20:54:31 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id p21-v6so8762394pgd.11 for ; Sun, 10 Jun 2018 13:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RHUdUsu/1vMK7xQyULwh+4eUUIKSm92cr2LCfJRfffc=; b=PzoQ3igGWq6pzLeXs2HfqwO3FD5kSzyNhWQY5ve/o05sW//RZQR6UeV+dP2grNDEKm xyCyorlKwV/Ksdy5Quw6auxqjnPix6eoiqwaxPKO7/SwpRM48tYC60dhHq3K/Rp/U1r/ CtBruVbCG6itfDH97XWgT/qpJV0habMONmEPnHdabfBcIgFL7hheEYfLxqxoVkDIA41V s1/6EIiv5c4sLCjODUuZjYMvxOOHp6aq6tfRMYq4CpIvpS3C+rZ4OUx0IRPjj9tHbel6 3z/zoGRC4x1Hf/Kf5sp3H5XTQAC/fkwWfCEfrONUlJrDaQoGMKdUlZ8fuGkjO/XcIxwy sgGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RHUdUsu/1vMK7xQyULwh+4eUUIKSm92cr2LCfJRfffc=; b=Zk3lg+zJTEHT6ZEDWLqIf/3pwH4KNjD3QyCqS1n5XWWdPxpti8c2PifmYUTnJmNQT3 LHoMP6kYdRwl3Z3F3mRrutWCM2rUGx6359rVsZbsht9JUOR+YB1w86rPOXGWGEYShBZC 3h498ivCH3iXd1u581OOfccrZGFtpnU/7zt+KbNjOXE1PVH+wLhbMx/eU9prTs1MJZ8B 2p+bqzyLbUKS9fws5DmQCBsUa7Gfmid5kLC1AHYoawBbcthHHb4Pmfpa3rZooOJ0fiLC lcUxqHbALt1VHR6Dkz905asMC0scZMoCtR+93Ovq50kZi3sFW17tSuJTZ2bi/vSBTdJI 8Mvg== X-Gm-Message-State: APt69E37mRDXeukb3sZv8NzZaA6TP6ZW6IkCZOpHJqQxr9Q6dUbEHmNa LWk9QW07p3NsryMtW2MhPrUs8jJj X-Google-Smtp-Source: ADUXVKJu8lIETUERDJit5wXcmL4Ty000+xf1IgafLuncNeppj9kH/7xpo4XP/blVGc5te1/dhyUZvw== X-Received: by 2002:a63:9a52:: with SMTP id e18-v6mr12409669pgo.188.1528664071119; Sun, 10 Jun 2018 13:54:31 -0700 (PDT) Received: from JAKWS.YakimaSteel.local ([162.251.69.147]) by smtp.gmail.com with ESMTPSA id l85-v6sm41147760pfk.79.2018.06.10.13.54.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jun 2018 13:54:30 -0700 (PDT) From: Joseph Kogut To: buildroot@buildroot.org Date: Sun, 10 Jun 2018 13:54:13 -0700 Message-Id: <20180610205417.13963-6-joseph.kogut@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180610205417.13963-1-joseph.kogut@gmail.com> References: <20180610204449.13646-1-joseph.kogut@gmail.com> <20180610205417.13963-1-joseph.kogut@gmail.com> Subject: [Buildroot] [RFC PATCH v3 5/9] llvm: add config to build backend for host arch X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Valentin Korenblit , Joseph Kogut , Fabrice Fontaine MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Joseph Kogut --- package/llvm/Config.in | 9 +++++++++ package/llvm/llvm.mk | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/package/llvm/Config.in b/package/llvm/Config.in index 83e94660eb..e9c461b92f 100644 --- a/package/llvm/Config.in +++ b/package/llvm/Config.in @@ -11,6 +11,15 @@ config BR2_PACKAGE_LLVM_TARGET_ARCH default "ARM" if BR2_arm || BR2_armeb default "X86" if BR2_i386 || BR2_x86_64 +config BR2_PACKAGE_LLVM_HOST_ARCH + string + default "AArch64" if BR2_HOSTARCH="aarch64" + default "X86" if BR2_HOSTARCH = "x86" || BR2_HOSTARCH = "x86_64" + default "ARM" if BR2_HOSTARCH = "arm" + +config BR2_PACKAGE_HOST_LLVM_ENABLE_HOST_ARCH + bool + config BR2_PACKAGE_LLVM bool "llvm" depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 3abf428989..04e99eb5b4 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -59,6 +59,11 @@ ifeq ($(BR2_PACKAGE_LLVM_AMDGPU),y) LLVM_TARGETS_TO_BUILD += AMDGPU endif +# Build backend for host architecture +ifeq ($(BR2_PACKAGE_LLVM_ENABLE_HOST_ARCH),y) +LLVM_TARGETS_TO_BUILD += $(call qstrip,$(BR2_PACKAGE_LLVM_HOST_ARCH)) +endif + # Use native llvm-tblgen from host-llvm (needed for cross-compilation) LLVM_CONF_OPTS += -DLLVM_TABLEGEN=$(HOST_DIR)/bin/llvm-tblgen