From patchwork Sat Oct 5 09:48:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1172157 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.136; helo=silver.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="aYLflfWC"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46lhl14yZcz9sPq for ; Sat, 5 Oct 2019 19:48:29 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D95CD203C8; Sat, 5 Oct 2019 09:48:26 +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 dLheC-WxGpnd; Sat, 5 Oct 2019 09:48:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 94211203D4; Sat, 5 Oct 2019 09:48:25 +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 5FFB51BF5DB for ; Sat, 5 Oct 2019 09:48:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 5C063203D4 for ; Sat, 5 Oct 2019 09:48:24 +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 BeZe40n94Tvs for ; Sat, 5 Oct 2019 09:48:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by silver.osuosl.org (Postfix) with ESMTPS id 04958203C8 for ; Sat, 5 Oct 2019 09:48:23 +0000 (UTC) Received: by mail-wm1-f47.google.com with SMTP id f22so8015041wmc.2 for ; Sat, 05 Oct 2019 02:48:22 -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:mime-version :content-transfer-encoding; bh=jOo9ZfGRThsPpktonTPLq6+XTHzRvsJzzN0Bo4VpK60=; b=aYLflfWC4sy7GNMUmGmDGEV65Lc7Lyg+ADdxrfRYSpkY/+gs5V7rJKEgoN8FSRC3WG WTKMec9Pg7ieRZLGp9TfA8HlYyijsOnvpjWBIq0NXIxHH2Gqs8KhShrMHv/WRJGuiwRB rOrODorGXRZt+4c0OhK8iew7V5U/NDU5yMkh6IQeAuavGEGyYKNbjmmCvgTAWxqp8Nno gFiR5MhxVS5DD6vF49UimZPZTBJxqjQtmWJOxyRmfKTpuZ/f8yRmq1eEwtjla+Zm8znI hvJfKbYf9rX0H1FCGgiYy+9+nJclibMBFZTHhI2ZSrHvryyJvdpfH0jbvQtVy3IksPn9 ucCw== 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:mime-version :content-transfer-encoding; bh=jOo9ZfGRThsPpktonTPLq6+XTHzRvsJzzN0Bo4VpK60=; b=SfekbPkfRD6Zb3ku9mC1ppFoj2k6xEr5DN5iACEr3EHMr/AFms/LRXgY70gU64RLOq bEFsm6uKRuw6jhWrJXwYpduU7SXj/2D031DVoewDv8iEmiSPx3Mt/We/AoeikZIxG4iG Om38yRZ0nc/7DaYWByEX56Q+GZBOFIT289K+4VbV25XrC804jgzBGeKvqS7JwkXbJFvR nIoHTNj+KoHLndI/2F4lvvZ0+3oGbGFBImkpxlAWLOP9dQLYbQo7L6QXFbQoOCD5bP3L xMaS2oIYzQ+1LrePKF2vz87W651tHC31TAVrFqAPCkPbsJVFLFb4LRxbV593yu7DIlRN X9MA== X-Gm-Message-State: APjAAAXHOUnEJzS3ev1cZjYL+I/iW5gCTG/BpwsKWYQtxDTXtj5C/O/o NnJZVe7VFNqO5SE0p29eKmJ1ubus X-Google-Smtp-Source: APXvYqxXh1VT8O/1IaCsbNHuWBOcGj6kmvQ4REMN/VGe/F3lysEVj2XevsE9xAP4qoWV10aP+lPQQQ== X-Received: by 2002:a7b:c112:: with SMTP id w18mr14406907wmi.88.1570268900997; Sat, 05 Oct 2019 02:48:20 -0700 (PDT) Received: from localhost.localdomain (2a01cb0589880c00405dfcd6cc31e8fe.ipv6.abo.wanadoo.fr. [2a01:cb05:8988:c00:405d:fcd6:cc31:e8fe]) by smtp.gmail.com with ESMTPSA id h125sm15312426wmf.31.2019.10.05.02.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Oct 2019 02:48:20 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Sat, 5 Oct 2019 11:48:15 +0200 Message-Id: <20191005094818.1956334-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 1/4] package/llvm: add llvm RTTI option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Allow to build LLVM with run-time type information when this feature is needed (for example) by mesa3d's Gallium Nouveau driver or the Clover OpenCL state tracker when llvm support is enabled in mesa3d. Signed-off-by: Romain Naour Tested-by: Bernd Kuhls --- v2: rebase the patch on master package/llvm/Config.in | 12 ++++++++++++ package/llvm/llvm.mk | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/package/llvm/Config.in b/package/llvm/Config.in index 83e94660eb..4eaca3df58 100644 --- a/package/llvm/Config.in +++ b/package/llvm/Config.in @@ -35,6 +35,18 @@ config BR2_PACKAGE_LLVM_AMDGPU Build AMDGPU target. Select this option if you are going to install mesa3d with llvm and use Gallium Radeon driver. +config BR2_PACKAGE_LLVM_RTTI + bool "enable rtti" + help + Build LLVM with run-time type information. LLVM can be + built without rtti, but turning it off rtti changes the + ABI of C++ programs. + This features is needed to build the Gallium Nouveau + driver or the Clover OpenCL state tracker when llvm + support is enabled. + + https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html + endif comment "llvm needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, host gcc >= 4.8, dynamic library" diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index f14b537d94..27a9f41860 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -216,6 +216,14 @@ LLVM_CONF_OPTS += \ -DLLVM_INCLUDE_TOOLS=ON \ -DLLVM_BUILD_TOOLS=OFF +ifeq ($(BR2_PACKAGE_LLVM_RTTI),y) +HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON +LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON +else +HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=OFF +LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=OFF +endif + # Compiler-rt not in the source tree. # llvm runtime libraries are not in the source tree. # Polly is not in the source tree.