From patchwork Mon Jul 3 10:18:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 783410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x1NRK3nxsz9s4q for ; Mon, 3 Jul 2017 20:19:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="flH6rtuK"; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 892AA86855; Mon, 3 Jul 2017 10:19:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVH4FgDMdnfe; Mon, 3 Jul 2017 10:19:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5574D86774; Mon, 3 Jul 2017 10:19:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id F148E1C0599 for ; Mon, 3 Jul 2017 10:19:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id EB4822FFD9 for ; Mon, 3 Jul 2017 10:19:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6zu2Sj4THm28 for ; Mon, 3 Jul 2017 10:19:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by silver.osuosl.org (Postfix) with ESMTPS id E50EA2FFE1 for ; Mon, 3 Jul 2017 10:18:59 +0000 (UTC) Received: by mail-wm0-f41.google.com with SMTP id i127so103307279wma.0 for ; Mon, 03 Jul 2017 03:18:59 -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=hGxt2bHf3ACg763ayjmwXP0tQOia+OOop7ZuO3YrCFI=; b=flH6rtuKEDKjNrZf0mhcvoT3r2x5Ui1MEqSrl3sICDunEPfQtY67U8n3VHLpf1rRvM FFBNOPjx2ZdyjxkVNqXJGsr9eM1dxwiGg11YSNpqboKo8bdMAgSUqxb7e1+oOSSJ+S54 v7hZVBPTHn8d0L7oST0FW/p2pUou4veGogT2ORhmXmXzWtnZS5O6kld4QBHRL84nIpSC oUzNWsC0/JpfvwpRDmO5fIwDgIW+SSZQ/PI0J9mZpfCY0jqRBvdjZSKH4WB9JXDAhgWs 37CxvWmElo1T90E74LNcV1hgmZh4ntePbzujvAniQRLe8EZ4Jl1MTTWKq+SHLKZv+uUu Ap9w== 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=hGxt2bHf3ACg763ayjmwXP0tQOia+OOop7ZuO3YrCFI=; b=OeK+4aLlSIcrf2aVIZYoG8X+SlzXK7u/Lz89zR0eZ3mwd+HpaJiCO42cWhoq+nzCdx 3vwSFCR8pgEXcO9oTQ7chUnldSRKs/lKH6BJvnR25iMdpWJHym7VHAhTeKowDiswviqo O6yXsqbrDA2Ff4XCf4EExlP/erlFFlBDE67BTow4ccOK9kTUij9EDVzgypbjwq2Ksrgh JPg4EITxNCaz10RKn/LIVFyzKjXld/c4P+7zLGfLQLapFPB7QQfxYgPUGOfJyCPNcf6A n2vMAlDy2optboIO4zPuhYOspDEUqjPIzJqfnHcJLnZJGxuktVlx/ANsa6kYszlMkhRE 4Pnw== X-Gm-Message-State: AKS2vOyLpt0YsqARmjk+wX8Oofclm+2zqzdqSlS65bRTmnoHpORZff6q wNJrKYfiWY7vQzYh7sM= X-Received: by 10.28.229.209 with SMTP id c200mr19695212wmh.43.1499077138240; Mon, 03 Jul 2017 03:18:58 -0700 (PDT) Received: from adeos.bzh.lan (2a01cb088610730038a959d3e6243673.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:38a9:59d3:e624:3673]) by smtp.gmail.com with ESMTPSA id v144sm15817474wmv.27.2017.07.03.03.18.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Jul 2017 03:18:57 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Mon, 3 Jul 2017 12:18:43 +0200 Message-Id: <20170703101846.1158-7-romain.naour@gmail.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170703101846.1158-1-romain.naour@gmail.com> References: <20170703101846.1158-1-romain.naour@gmail.com> Cc: Romain Naour Subject: [Buildroot] [RFC 6/9] package/llvm: add AMDGPU support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Limit the number of supported target for mesa3d when openCL support is enabled. With -DLLVM_TARGETS_TO_BUILD="all" mesa3d fail to build on x86_64 target with AMDGPU target: CXXLD libOpenCL.la ../../../../src/gallium/state_trackers/clover/.libs/libclover.a(libclllvm_la-invocation.o): In function `(anonymous namespace)::create_context(std::__cxx11::basic_string, std::allocator >&)': invocation.cpp:(.text+0x1a8): undefined reference to `LLVMInitializeAArch64Target' invocation.cpp:(.text+0x1b2): undefined reference to `LLVMInitializeARMTarget' invocation.cpp:(.text+0x1b7): undefined reference to `LLVMInitializeBPFTarget' invocation.cpp:(.text+0x1bc): undefined reference to `LLVMInitializeHexagonTarget' invocation.cpp:(.text+0x1c1): undefined reference to `LLVMInitializeLanaiTarget' invocation.cpp:(.text+0x1c6): undefined reference to `LLVMInitializeMipsTarget' invocation.cpp:(.text+0x1cb): undefined reference to `LLVMInitializeMSP430Target' invocation.cpp:(.text+0x1d0): undefined reference to `LLVMInitializeNVPTXTarget' invocation.cpp:(.text+0x1d5): undefined reference to `LLVMInitializePowerPCTarget' invocation.cpp:(.text+0x1da): undefined reference to `LLVMInitializeRISCVTarget' invocation.cpp:(.text+0x1df): undefined reference to `LLVMInitializeSparcTarget' invocation.cpp:(.text+0x1e4): undefined reference to `LLVMInitializeSystemZTarget' invocation.cpp:(.text+0x1ee): undefined reference to `LLVMInitializeXCoreTarget' invocation.cpp:(.text+0x1f3): undefined reference to `LLVMInitializeAArch64TargetInfo' invocation.cpp:(.text+0x1fd): undefined reference to `LLVMInitializeARMTargetInfo' invocation.cpp:(.text+0x202): undefined reference to `LLVMInitializeBPFTargetInfo' invocation.cpp:(.text+0x207): undefined reference to `LLVMInitializeHexagonTargetInfo' invocation.cpp:(.text+0x20c): undefined reference to `LLVMInitializeLanaiTargetInfo' invocation.cpp:(.text+0x211): undefined reference to `LLVMInitializeMipsTargetInfo' invocation.cpp:(.text+0x216): undefined reference to `LLVMInitializeMSP430TargetInfo' invocation.cpp:(.text+0x21b): undefined reference to `LLVMInitializeNVPTXTargetInfo' invocation.cpp:(.text+0x220): undefined reference to `LLVMInitializePowerPCTargetInfo' invocation.cpp:(.text+0x225): undefined reference to `LLVMInitializeRISCVTargetInfo' invocation.cpp:(.text+0x22a): undefined reference to `LLVMInitializeSparcTargetInfo' invocation.cpp:(.text+0x22f): undefined reference to `LLVMInitializeSystemZTargetInfo' invocation.cpp:(.text+0x239): undefined reference to `LLVMInitializeXCoreTargetInfo' invocation.cpp:(.text+0x23e): undefined reference to `LLVMInitializeAArch64TargetMC' invocation.cpp:(.text+0x248): undefined reference to `LLVMInitializeARMTargetMC' invocation.cpp:(.text+0x24d): undefined reference to `LLVMInitializeBPFTargetMC' invocation.cpp:(.text+0x252): undefined reference to `LLVMInitializeHexagonTargetMC' invocation.cpp:(.text+0x257): undefined reference to `LLVMInitializeLanaiTargetMC' invocation.cpp:(.text+0x25c): undefined reference to `LLVMInitializeMipsTargetMC' invocation.cpp:(.text+0x261): undefined reference to `LLVMInitializeMSP430TargetMC' invocation.cpp:(.text+0x266): undefined reference to `LLVMInitializeNVPTXTargetMC' invocation.cpp:(.text+0x26b): undefined reference to `LLVMInitializePowerPCTargetMC' invocation.cpp:(.text+0x270): undefined reference to `LLVMInitializeRISCVTargetMC' invocation.cpp:(.text+0x275): undefined reference to `LLVMInitializeSparcTargetMC' invocation.cpp:(.text+0x27a): undefined reference to `LLVMInitializeSystemZTargetMC' invocation.cpp:(.text+0x284): undefined reference to `LLVMInitializeXCoreTargetMC' invocation.cpp:(.text+0x289): undefined reference to `LLVMInitializeAArch64AsmPrinter' invocation.cpp:(.text+0x293): undefined reference to `LLVMInitializeARMAsmPrinter' invocation.cpp:(.text+0x298): undefined reference to `LLVMInitializeBPFAsmPrinter' invocation.cpp:(.text+0x29d): undefined reference to `LLVMInitializeHexagonAsmPrinter' invocation.cpp:(.text+0x2a2): undefined reference to `LLVMInitializeLanaiAsmPrinter' invocation.cpp:(.text+0x2a7): undefined reference to `LLVMInitializeMipsAsmPrinter' invocation.cpp:(.text+0x2ac): undefined reference to `LLVMInitializeMSP430AsmPrinter' invocation.cpp:(.text+0x2b1): undefined reference to `LLVMInitializeNVPTXAsmPrinter' invocation.cpp:(.text+0x2b6): undefined reference to `LLVMInitializePowerPCAsmPrinter' invocation.cpp:(.text+0x2bb): undefined reference to `LLVMInitializeSparcAsmPrinter' invocation.cpp:(.text+0x2c0): undefined reference to `LLVMInitializeSystemZAsmPrinter' invocation.cpp:(.text+0x2ca): undefined reference to `LLVMInitializeXCoreAsmPrinter' collect2: error: ld returned 1 exit status Signed-off-by: Romain Naour --- package/llvm/Config.in | 9 +++++++++ package/llvm/llvm.mk | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/package/llvm/Config.in b/package/llvm/Config.in index 84dde8d..417af6e 100644 --- a/package/llvm/Config.in +++ b/package/llvm/Config.in @@ -27,3 +27,12 @@ config BR2_PACKAGE_LLVM compiler and toolchain technologies. http://llvm.org + +if BR2_PACKAGE_LLVM + +config BR2_PACKAGE_LLVM_TARGET_ARCH_AMDGPU + bool "AMDGPU" + help + TODO + +endif # BR2_PACKAGE_LLVM diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 45ce4b4..0e381ff 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -228,8 +228,13 @@ HOST_LLVM_CONF_OPTS += -DLLVM_BUILD_EXTERNAL_COMPILER_RT=OFF LLVM_CONF_OPTS += -DLLVM_BUILD_EXTERNAL_COMPILER_RT=OFF HOST_LLVM_TARGET_ARCH = $(call qstrip,$(BR2_PACKAGE_LLVM_TARGET_ARCH)) -HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD=$(HOST_LLVM_TARGET_ARCH) -LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD=$(HOST_LLVM_TARGET_ARCH) + +ifeq ($(BR2_PACKAGE_LLVM_TARGET_ARCH_AMDGPU),y) +HOST_LLVM_TARGET_TO_BUILD = "$(HOST_LLVM_TARGET_ARCH);AMDGPU" +endif + +HOST_LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD=$(HOST_LLVM_TARGET_TO_BUILD) +LLVM_CONF_OPTS += -DLLVM_TARGETS_TO_BUILD=$(HOST_LLVM_TARGET_TO_BUILD) # LLVM target to use for native code generation. HOST_LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(HOST_LLVM_TARGET_ARCH) LLVM_CONF_OPTS += -DLLVM_TARGET_ARCH=$(HOST_LLVM_TARGET_ARCH)