From patchwork Sat Oct 20 19:42:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 987227 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=none (p=none dis=none) header.from=rockwellcollins.com 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 42ctVc6QKZz9sC2 for ; Sun, 21 Oct 2018 06:43:04 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 2170930456; Sat, 20 Oct 2018 19:42:59 +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 f--wq2g+qado; Sat, 20 Oct 2018 19:42:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C075A30427; Sat, 20 Oct 2018 19:42:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 73D211BF39D for ; Sat, 20 Oct 2018 19:42:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 715A186AAE for ; Sat, 20 Oct 2018 19:42:55 +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 62ppYCJUHJ3y for ; Sat, 20 Oct 2018 19:42:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs02.rockwellcollins.com (ch3vs02.rockwellcollins.com [205.175.226.29]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 75FBE86A8C for ; Sat, 20 Oct 2018 19:42:54 +0000 (UTC) Received: from ofwch3n02.rockwellcollins.com (HELO crulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs02.rockwellcollins.com with ESMTP; 20 Oct 2018 14:42:55 -0500 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by crulimr01.rockwellcollins.com (Postfix) with ESMTP id 6A3FF600B7; Sat, 20 Oct 2018 14:42:53 -0500 (CDT) From: Matt Weber To: buildroot@buildroot.org Date: Sat, 20 Oct 2018 14:42:53 -0500 Message-Id: <1540064574-54964-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 Subject: [Buildroot] [PATCH v2 1/2] libfuzzer: compiler-rt integ 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Matthew Weber Conflicts: package/Config.in --- package/Config.in | 1 + package/compiler-rt/Config.in | 13 +++++++++++++ package/compiler-rt/compiler-rt.hash | 3 +++ package/compiler-rt/compiler-rt.mk | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 49 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/package/Config.in b/package/Config.in index 8d53c72..2f799ee 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1592,6 +1592,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..4233668 --- /dev/null +++ b/package/compiler-rt/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_COMPILER_RT + bool "compiler-rt" + depends on BR2_PACKAGE_CLANG +# Need to add libfuzzer as a sub option and a dependency on arch supported. aarch64 doesn't seem to work + help + A collection of runtime libraries primarily used by clang and + llvm to provide builtins, sanitizer runtimes, profiling and + blocks runtime. + + https://compiler-rt.llvm.org/ + +comment "compiler-rt requires clang to be enabled" + depends on !BR2_PACKAGE_CLANG diff --git a/package/compiler-rt/compiler-rt.hash b/package/compiler-rt/compiler-rt.hash new file mode 100644 index 0000000..7acc879 --- /dev/null +++ b/package/compiler-rt/compiler-rt.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 d0cc1342cf57e9a8d52f5498da47a3b28d24ac0d39cbc92308781b3ee0cea79a compiler-rt-6.0.0.src.tar.xz +sha256 bdec7fe3cf2c85f55656c07dfb0bd93ae46f2b3dd8f33ff3ad6e7586f4c670d6 compiler-rt-7.0.0.src.tar.xz diff --git a/package/compiler-rt/compiler-rt.mk b/package/compiler-rt/compiler-rt.mk new file mode 100644 index 0000000..9853eca --- /dev/null +++ b/package/compiler-rt/compiler-rt.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# compiler-rt +# +################################################################################ + +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-cmake clang + +COMPILER_RT_INSTALL_STAGING = YES +COMPILER_RT_INSTALL_TARGET = NO + +#ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +#COMPILER_RT_TARGET_LDFLAGS += --target=aarch64-linux-gnu +#--gcc-toolchain=$(TOOLCHAIN_EXTERNAL_INSTALL_DIR) +#else +#COMPILER_RT_TARGET_LDFLAGS += --target=aarch64-linux-gnu --gcc-toolchain=$(HOST_DIR) +#endif + +COMPILER_RT_CONF_ENV = TARGET_CC="clang" \ + TARGET_CXX="clang++" \ + TARGET_CFLAGS="$(CHROMIUM_TARGET_CFLAGS)" \ + TARGET_CXXFLAGS="$(CHROMIUM_TARGET_CXXFLAGS)" \ + TARGET_LDFLAGS="$(CHROMIUM_TARGET_LDFLAGS)" + +COMPILER_RT_CONF_OPTS= -DCOMPILER_RT_INCLUDE_TESTS=ON + +$(eval $(cmake-package))