From patchwork Sat Nov 17 03:56:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 999244 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=none (p=none dis=none) header.from=rockwellcollins.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42xh9Y0WxXz9s5c for ; Sat, 17 Nov 2018 14:56:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A4B0F88078; Sat, 17 Nov 2018 03:56:27 +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 O+rGMuPxDMUO; Sat, 17 Nov 2018 03:56:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 066FC87E40; Sat, 17 Nov 2018 03:56:26 +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 456A41BF295 for ; Sat, 17 Nov 2018 03:56:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 42BD72273A for ; Sat, 17 Nov 2018 03:56:25 +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 laPLo6jH7nJm for ; Sat, 17 Nov 2018 03:56:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by silver.osuosl.org (Postfix) with ESMTPS id 5D49822680 for ; Sat, 17 Nov 2018 03:56:24 +0000 (UTC) Received: from ofwda1n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 16 Nov 2018 21:56:23 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id 386BA600D8; Fri, 16 Nov 2018 21:56:23 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Fri, 16 Nov 2018 21:56:17 -0600 Message-Id: <1542426982-54683-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v2 1/6] package/compiler-rt: new package 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 MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds support for the compiler-rt (CLANG runtime) libary. It builds a set of static libraries and installs them into the CLANG/LLVM toolchain resource folder. Signed-off-by: Matthew Weber Cc: Romain Naour --- Changes v1 -> v2 [Romain - Removed unnecessary host-cmake dependency --- DEVELOPERS | 1 + package/Config.in | 1 + package/compiler-rt/Config.in | 12 ++++++++++++ package/compiler-rt/compiler-rt.hash | 3 +++ package/compiler-rt/compiler-rt.mk | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 package/compiler-rt/Config.in create mode 100644 package/compiler-rt/compiler-rt.hash create mode 100644 package/compiler-rt/compiler-rt.mk diff --git a/DEVELOPERS b/DEVELOPERS index 53467da..e78d649 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1360,6 +1360,7 @@ F: package/bridge-utils/ F: package/checkpolicy/ F: package/checksec/ F: package/cgroupfs-mount/ +F: package/compiler-rt/ F: package/crda/ F: package/devmem2/ F: package/dnsmasq/ diff --git a/package/Config.in b/package/Config.in index b60e770..73ddc2d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1602,6 +1602,7 @@ menu "Other" source "package/clapack/Config.in" source "package/classpath/Config.in" source "package/cmocka/Config.in" + source "package/compiler-rt/Config.in" source "package/cppcms/Config.in" source "package/cracklib/Config.in" source "package/dawgdic/Config.in" diff --git a/package/compiler-rt/Config.in b/package/compiler-rt/Config.in new file mode 100644 index 0000000..e15d3aa --- /dev/null +++ b/package/compiler-rt/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_COMPILER_RT + bool "compiler-rt" + depends on BR2_PACKAGE_LLVM + help + A collection of runtime libraries primarily used by clang and + llvm to provide builtins, sanitizer runtimes, and profiling + at runtime. + + https://compiler-rt.llvm.org/ + +comment "compiler-rt requires llvm to be enabled" + depends on !BR2_PACKAGE_LLVM diff --git a/package/compiler-rt/compiler-rt.hash b/package/compiler-rt/compiler-rt.hash new file mode 100644 index 0000000..df6ed19 --- /dev/null +++ b/package/compiler-rt/compiler-rt.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 bdec7fe3cf2c85f55656c07dfb0bd93ae46f2b3dd8f33ff3ad6e7586f4c670d6 compiler-rt-7.0.0.src.tar.xz +sha256 417541d990edb3f96327ac03cb67e52eac80fc5c3e7afc69213cd04d7c3b9b27 LICENSE.TXT diff --git a/package/compiler-rt/compiler-rt.mk b/package/compiler-rt/compiler-rt.mk new file mode 100644 index 0000000..dd962fb --- /dev/null +++ b/package/compiler-rt/compiler-rt.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# compiler-rt +# +################################################################################ + +# Compiler-RT should be bumped together with LLVM and Clang as the run-time is +# tied to the version of those tools +COMPILER_RT_VERSION = 7.0.0 +COMPILER_RT_SOURCE = compiler-rt-$(COMPILER_RT_VERSION).src.tar.xz +COMPILER_RT_SITE = http://llvm.org/releases/$(COMPILER_RT_VERSION) +COMPILER_RT_LICENSE = NCSA MIT +COMPILER_RT_LICENSE_FILES = LICENSE.TXT +COMPILER_RT_DEPENDENCIES = host-clang llvm + +COMPILER_RT_INSTALL_STAGING = YES +COMPILER_RT_INSTALL_TARGET = NO + + +# -DCMAKE_INSTALL_PREFIX="" allows the COMPILER_RT_INSTALL_STAGING_CMDS to +# provide the complete path to compilier-rt for installation of the runtime +# libraries into the host-{clang,llvm} resources directory. The "resources" +# directory is loosely document at this point and will probably need revisited +# when making the llvm/clang tools SDK relocatable. +COMPILER_RT_CONF_OPTS=-DCOMPILER_RT_INCLUDE_TESTS=ON \ + -DCOMPILER_RT_STANDALONE_BUILD=ON \ + -DCOMPILER_RT_DEFAULT_TARGET_TRIPLE=$(GNU_TARGET_NAME) \ + -DLLVM_CONFIG_PATH=$(HOST_DIR)/usr/bin/llvm-config \ + -DCMAKE_INSTALL_PREFIX="" + +define COMPILER_RT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/ install/fast +endef + +$(eval $(cmake-package))