From patchwork Tue Dec 4 04:08:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007435 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="QRFa5n6D"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4387g05SxBz9s55 for ; Tue, 4 Dec 2018 15:09:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 359EF84607; Tue, 4 Dec 2018 04:09:46 +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 8ZqIq+sp-A9F; Tue, 4 Dec 2018 04:09:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CC376810B5; Tue, 4 Dec 2018 04:09:01 +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 57F4A1C2BE9 for ; Tue, 4 Dec 2018 04:08:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 552FA86155 for ; Tue, 4 Dec 2018 04:08:58 +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 h4vXU0oxG131 for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx0b-00105401.pphosted.com (mx0b-00105401.pphosted.com [67.231.152.184]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4C0948570A for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) Received: from pps.filterd (m0074333.ppops.net [127.0.0.1]) by m0074333.ppops.net (8.16.0.22/8.16.0.22) with SMTP id wB445Gup016971; Mon, 3 Dec 2018 23:08:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id; s=POD051818; bh=5ulWW90PYklG61Mz1Jgyc2gNPI4llqfiTV9LAHy13H0=; b=QRFa5n6DkNVzD+bqCRuloIONMBl4sYzBxbV6z2pZYCzQ4WfBHyHnUuu53WbLxQhpAb8M B51BD60dWBSg8Xz/R9aPrkXwrQKT6tlxgTfX5qLGIozxIken1eMp3eoTuGeFDJcmDokc +3wzr12Krai9UfmxM/K266jrYwH689weaX9z0jIgyMxhorsVPANGEDO1Yr12Z2muowLn 1noVnLi0Hk4QrAh/lzNCIKA9lVFH5U1Uswf4d/1fCvahKabVtRJCDLTIWOn5WNMnL++u DQHXcfzNvPwFQ/HIXVhir/5ldvF9CQKCmZPvAyNce52UYYdcKyfiEAkaaG1fWlotU+t3 0Q== Received: from xmnpv36.utc.com ([167.17.255.16]) by m0074333.ppops.net with ESMTP id 2p5d39mqm9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 03 Dec 2018 23:08:55 -0500 Received: from uusnwa4t.utc.com (uusnwa4t.utc.com [159.82.101.253]) by xmnpv36.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448rYa026889 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:54 -0500 Received: from ch3vs04.rockwellcollins.com ([10.172.224.19]) by uusnwa4t.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448qr7029825 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:53 -0500 Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs04.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 7179020070; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:44 -0600 Message-Id: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 1/7] 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 , Ricardo Martincoski , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds support for the compiler-rt (CLANG runtime) library. 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 Cc: Ricardo Martincoski Cc: Valentin Korenblit --- Changes v1 -> v2 [Romain - Removed unnecessary host-cmake dependency v2 -> v3 [Romain - Update to use COMPILER_RT_INSTALL_PATH for library install [Ricardo - Fixed check-package extra line - Spelling in commit message v3 -> v4 [Valentin - Pointed out that non-glibc libraries won't build. Further investigation shows that the lib asan support in compiler-rt doesn't have the libc checks yet to support multiple libraries. (https://patchwork.ozlabs.org/patch/339938/ was the best example I could find and it doesn't look like anything has changed in the recent codebase) v4 -> v5 [Thomas P - Revisited staging install step and found a cleaner way to use the default and then a hook to setup the runtime library path --- DEVELOPERS | 1 + package/Config.in | 1 + package/compiler-rt/Config.in | 14 ++++++++++++++ package/compiler-rt/compiler-rt.hash | 3 +++ package/compiler-rt/compiler-rt.mk | 34 ++++++++++++++++++++++++++++++++++ 5 files changed, 53 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 ad80d36..6946cc3 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1374,6 +1374,7 @@ F: package/bridge-utils/ F: package/checkpolicy/ F: package/checksec/ F: package/cgroupfs-mount/ +F: package/compiler-rt/ F: package/crda/ F: package/cunit/ F: package/devmem2/ diff --git a/package/Config.in b/package/Config.in index 0339ec7..dac18dc 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1611,6 +1611,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..9afc0d9 --- /dev/null +++ b/package/compiler-rt/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_COMPILER_RT + bool "compiler-rt" + depends on BR2_PACKAGE_LLVM + depends on BR2_TOOLCHAIN_USES_GLIBC # asan lib requires + 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 and a glibc toolchain" + depends on !BR2_PACKAGE_LLVM + depends on !BR2_TOOLCHAIN_USES_GLIBC 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..8a3c98d --- /dev/null +++ b/package/compiler-rt/compiler-rt.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# 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 + +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 + +# The installation of the target runtime libraries defaults to DESTDIR, however +# the host-clang resources directory needs a link so Clang can find the runtime +# libraries in the same location they would be if built as part of the Clang +# build (vs this standalone build). +define COMPILER_RT_SETUP_RUNTIME_LIBS + mkdir -p $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib + ln -sf ../../../../$(GNU_TARGET_NAME)/sysroot/usr/lib/linux $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/lib/linux +endef +COMPILER_RT_POST_INSTALL_STAGING_HOOKS += COMPILER_RT_SETUP_RUNTIME_LIBS + +$(eval $(cmake-package)) From patchwork Tue Dec 4 04:08:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007433 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=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="d4tFTq+x"; 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 4387fD6QYcz9s7W for ; Tue, 4 Dec 2018 15:09:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 466FC2DF49; Tue, 4 Dec 2018 04:09:06 +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 nMGEyzy-UNQO; Tue, 4 Dec 2018 04:09:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id A229B2076E; Tue, 4 Dec 2018 04:09:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 131FA1C2BE9 for ; Tue, 4 Dec 2018 04:09:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 106B1821F0 for ; Tue, 4 Dec 2018 04:09:01 +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 Ik5NO3OPGRv3 for ; Tue, 4 Dec 2018 04:08:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-00105401.pphosted.com (mx0a-00105401.pphosted.com [67.231.144.184]) by hemlock.osuosl.org (Postfix) with ESMTPS id BDE0A81ED1 for ; Tue, 4 Dec 2018 04:08:59 +0000 (UTC) Received: from pps.filterd (m0075556.ppops.net [127.0.0.1]) by mx0a-00105401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB444gT2038675 for ; Mon, 3 Dec 2018 23:08:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=k+MBg89FwASTSw52yB+v/x0RBk2d7SlbjM3+4LsB/Ns=; b=d4tFTq+x0+FTFChk3OcF0ATfABE9pu8bdWBEyAmtTvJHWCmiMT0njoy2llVQhUtLCYyo /toxVJQOlII51tlPALubIntI6sBtrJLBwqIXweqZee1XUjW2vWX23MxoYQR4c8SkOoax iopYncUSBZN5Nst3SmErH8cgKxoOYZ+rMs+USCoadArPO9tDOscvKsk95dfmoGWCsmdx 7z/ylMt+OlLLGPQ26KT3OKp3ZDUlYRBwsJCU4UiD8UlfrhiLT+24B2GQKoJpLImj/wtc EYOcvrNwRgyfxS47YFVktC+lp4efm3xVMkN8x8woGGJ6NNB2W3m1NxQhwYo6/659RbPC Eg== Received: from xmnpv39.utc.com ([167.17.255.19]) by mx0a-00105401.pphosted.com with ESMTP id 2p3nn2c499-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 03 Dec 2018 23:08:59 -0500 Received: from uusmna14.utc.com (uusmna14.utc.com [159.82.227.148]) by xmnpv39.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448rYR172650 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 3 Dec 2018 23:08:53 -0500 Received: from da1vs03.rockwellcollins.com ([10.172.224.19]) by uusmna14.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448q11022958 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 3 Dec 2018 23:08:53 -0500 Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs03.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:53 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 82CBF20077; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:45 -0600 Message-Id: <1543896530-33550-2-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 2/7] package/llvm: install target binary/debug tools 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" The compiler-rt fuzzer and address sanitizer tools require additional LLVM binary tools installed to allow stack trace decoding actively during executable analysis. https://github.com/google/sanitizers/wiki/AddressSanitizerCallStack Signed-off-by: Matthew Weber Reviewed-by: Romain Naour --- Changes v1 -> v3 - None v4 - Added new patch for llvm dependency on libxml2 which was noticed during testing v5 - Rebased post 2018.11 on master --- package/llvm/llvm.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 1f9bd44..79477f0 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -197,8 +197,17 @@ HOST_LLVM_CONF_OPTS += \ # We need to activate LLVM_INCLUDE_TOOLS, otherwise it does not generate # libLLVM.so LLVM_CONF_OPTS += \ - -DLLVM_INCLUDE_TOOLS=ON \ + -DLLVM_INCLUDE_TOOLS=ON + +# The llvm-symbolizer binary is used by the Compiler-RT Fuzzer +# and AddressSanitizer tools for stack traces. +ifeq ($(BR2_PACKAGE_COMPILER_RT),y) +LLVM_CONF_OPTS += \ + -DLLVM_BUILD_TOOLS=ON +else +LLVM_CONF_OPTS += \ -DLLVM_BUILD_TOOLS=OFF +endif # Compiler-rt not in the source tree. # llvm runtime libraries are not in the source tree. From patchwork Tue Dec 4 04:08:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007436 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="JtLpDMEL"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4387gB5Gsgz9s8J for ; Tue, 4 Dec 2018 15:09:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C4220810FA; Tue, 4 Dec 2018 04:09:56 +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 j9v5qyQ21Iox; Tue, 4 Dec 2018 04:09:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 89C5086E58; Tue, 4 Dec 2018 04:09:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 569E61C2BE9 for ; Tue, 4 Dec 2018 04:09:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 53A1B84845 for ; Tue, 4 Dec 2018 04:09:00 +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 UZYWlX7lGk25 for ; Tue, 4 Dec 2018 04:08:57 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-00105401.pphosted.com (mx0b-00105401.pphosted.com [67.231.152.184]) by hemlock.osuosl.org (Postfix) with ESMTPS id DF0FC821F0 for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) Received: from pps.filterd (m0075420.ppops.net [127.0.0.1]) by mx0a-00105401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB444nw7014997; Mon, 3 Dec 2018 23:08:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=uTp92AhzvTYAIXCr9lUH16Wm9g/z2J8sFT4hPu9sdiU=; b=JtLpDMELOK7cBWvZgJ8W+NN1i6R2Iz6hTMQPIO7a1VVLsYkBf5ehACigX+U+3eHrlQ+l CI0mONDmP78zUJvOOEY2V1nOWSj/wx/+Kqw+RktaSIXlZII0znOJYyXSqnMvBI6Z7X4S mciD3x+0nGLA7NXQJKp9cydAg8Pk315GpfTuxtBy3nAwBQW3WIvZjjO8Zoc/Sr250DYe 4x9HtRgAI7b+hNpgTfPKZ0HxGluwTTg/9ULu0k+VCEPzseTM0KlV6xxSAdrV5T/yzWzn 3OuFEz3BPmhuWEwFEST3XVCBwpHCEMl1wLs1SB8LWcD5kRaGIHwPAgJFTM8xsbqECLbi nQ== Received: from xmnpv36.utc.com ([167.17.255.16]) by mx0a-00105401.pphosted.com with ESMTP id 2p3qt5jsmv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 03 Dec 2018 23:08:55 -0500 Received: from uusmna1r.utc.com (uusmna1r.utc.com [159.82.219.64]) by xmnpv36.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448s59026900 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:54 -0500 Received: from ch3vs03.rockwellcollins.com ([10.172.224.19]) by uusmna1r.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448qwD004278 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:53 -0500 Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs03.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id 9005D20079; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:46 -0600 Message-Id: <1543896530-33550-3-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 3/7] testing/infra/builder: build with target and environment 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: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Ricardo Martincoski Make the builder able to call 'VAR1=1 make VAR2=2 target'. Allow to send extra parameters to be added to the end of make command line. It can be used for these purposes: - to configure a br2-external, by passing 'BR2_EXTERNAL="dir"'; - to specify a make target, such as 'foo-source'. Allow to add variables to the environment in which make runs. It can be used to override values from environment, such as 'BR2_DL_DIR="dl"'. This change will be needed when adding support for br2-externals to the test infra. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Signed-off-by: Matt Weber --- Changes v2 - New from: http://patchwork.ozlabs.org/patch/912351/ v2 -> v3 [Ricardo - Updated patch commit description context. v4 - None v5 - Rebased post 2018.11 on master --- support/testing/infra/builder.py | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/support/testing/infra/builder.py b/support/testing/infra/builder.py index fc318fe..4d9c512 100644 --- a/support/testing/infra/builder.py +++ b/support/testing/infra/builder.py @@ -12,7 +12,18 @@ class Builder(object): self.builddir = builddir self.logfile = infra.open_log_file(builddir, "build", logtofile) - def configure(self): + def configure(self, make_extra_opts=[], make_extra_env={}): + """ + Configure the build. + + make_extra_opts: a list of arguments to be passed to the make + command. + e.g. make_extra_opts=["BR2_EXTERNAL=/path"] + + make_extra_env: a dict of variables to be appended (or replaced) + in the environment that calls make. + e.g. make_extra_env={"BR2_DL_DIR": "/path"} + """ if not os.path.isdir(self.builddir): os.makedirs(self.builddir) @@ -25,22 +36,41 @@ class Builder(object): self.logfile.flush() env = {"PATH": os.environ["PATH"]} + env.update(make_extra_env) + cmd = ["make", - "O={}".format(self.builddir), - "olddefconfig"] + "O={}".format(self.builddir)] + cmd += make_extra_opts + cmd += ["olddefconfig"] + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, env=env) if ret != 0: raise SystemError("Cannot olddefconfig") - def build(self): + def build(self, make_extra_opts=[], make_extra_env={}): + """ + Perform the build. + + make_extra_opts: a list of arguments to be passed to the make + command. It can include a make target. + e.g. make_extra_opts=["foo-source"] + + make_extra_env: a dict of variables to be appended (or replaced) + in the environment that calls make. + e.g. make_extra_env={"BR2_DL_DIR": "/path"} + """ env = {"PATH": os.environ["PATH"]} if "http_proxy" in os.environ: self.logfile.write("Using system proxy: " + os.environ["http_proxy"] + "\n") env['http_proxy'] = os.environ["http_proxy"] env['https_proxy'] = os.environ["http_proxy"] + env.update(make_extra_env) + cmd = ["make", "-C", self.builddir] + cmd += make_extra_opts + ret = subprocess.call(cmd, stdout=self.logfile, stderr=self.logfile, env=env) if ret != 0: From patchwork Tue Dec 4 04:08:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007434 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="BRLz5AOj"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4387fF5Px5z9s8J for ; Tue, 4 Dec 2018 15:09:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id AA87A8615D; Tue, 4 Dec 2018 04:09:06 +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 oV9aTILzsERv; Tue, 4 Dec 2018 04:09:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 02967869F5; Tue, 4 Dec 2018 04:09:03 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 68B0A1C2BE9 for ; Tue, 4 Dec 2018 04:08:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6600881ED1 for ; Tue, 4 Dec 2018 04:08:59 +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 vwK8Z6Yo0qob for ; Tue, 4 Dec 2018 04:08:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-00105401.pphosted.com (mx0a-00105401.pphosted.com [67.231.144.184]) by hemlock.osuosl.org (Postfix) with ESMTPS id 3C7DD84845 for ; Tue, 4 Dec 2018 04:08:57 +0000 (UTC) Received: from pps.filterd (m0072139.ppops.net [127.0.0.1]) by m0072139.ppops.net (8.16.0.22/8.16.0.22) with SMTP id wB4453kn037387; Mon, 3 Dec 2018 23:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=ldEBj1kAkSrGjvEdeHvJrkx7fEr+pczVYu5rJGaO07g=; b=BRLz5AOjJQf/8YXATDP8CHEk9jf9NN3PzGg5NCr1akk7g8XUGEX3ZDzYM+wlNVU4zlpF JnHBYEgYg4Np1IHZV9tcK9fg9Aw7cQEmyOJtMfsVA7eavJgRQOGx5vGWsIpgCNanwNhN 8U6k9knHSdRNffpL40hm03GueC68/9+fomS73yR1oWVgZ32HPGLLy8ZvIzAGd8mews4h g9KfpmzdqUzcV9rHs81lemHIHu83G6z0tjOH27XbZQrCBgwl4rp0sf0hn3aPTItCi8SV dFHrtLHvJ/nOGu0NFP4JNmXN8dVXNcWJPZFl9qLPrVCffVXjE/A5bHesM6uIikkKbHYF Mw== Received: from xmnpv38.utc.com ([167.17.255.18]) by m0072139.ppops.net with ESMTP id 2p5g62a03g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 03 Dec 2018 23:08:56 -0500 Received: from uusmna21.corp.utc.com (uusmna21.corp.utc.com [159.82.227.11]) by xmnpv38.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448swD080620 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:54 -0500 Received: from secvs01.rockwellcollins.com ([10.172.224.19]) by uusmna21.corp.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448qUq011047 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:53 -0500 Received: from ofwgwc03.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.225.12]) by secvs01.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id A3BE12007A; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:47 -0600 Message-Id: <1543896530-33550-4-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 4/7] testing/infra/basetest: support br2-external 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: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Ricardo Martincoski Some upcoming test cases can use one or more br2-external trees as fixtures that provide packages used only in runtime tests. Add support for br2-external into the BRTest class. Any test case can then provide a list of paths for be used as br2-external trees during the build of the image to be tested. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle Signed-off-by: Matt Weber --- Changes v2 - New from: http://patchwork.ozlabs.org/patch/912354/ v2 -> v3 [Ricardo - Updated patch commit description context. v4 - None v5 - Rebased post 2018.11 on master --- support/testing/infra/basetest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py index 5014fef..8413943 100644 --- a/support/testing/infra/basetest.py +++ b/support/testing/infra/basetest.py @@ -30,6 +30,7 @@ MINIMAL_CONFIG = \ class BRTest(unittest.TestCase): config = None + br2_external = list() downloaddir = None outputdir = None logtofile = True @@ -58,7 +59,7 @@ class BRTest(unittest.TestCase): if not self.b.is_finished(): self.show_msg("Building") - self.b.configure() + self.b.configure(["BR2_EXTERNAL={}".format(":".join(self.br2_external))]) self.b.build() self.show_msg("Building done") From patchwork Tue Dec 4 04:08:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007432 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="HxFvk+x6"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4387f95T28z9s7W for ; Tue, 4 Dec 2018 15:09:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9E5E08570A; Tue, 4 Dec 2018 04:09:03 +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 K1R_x7i4Syke; Tue, 4 Dec 2018 04:09:02 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7880286155; Tue, 4 Dec 2018 04:09:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id DD95D1C2BE9 for ; Tue, 4 Dec 2018 04:08:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id DAC6B859A5 for ; Tue, 4 Dec 2018 04:08:58 +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 yNfJcZCnVojx for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-00105401.pphosted.com (mx0b-00105401.pphosted.com [67.231.152.184]) by hemlock.osuosl.org (Postfix) with ESMTPS id 9977381ED1 for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) Received: from pps.filterd (m0075420.ppops.net [127.0.0.1]) by mx0a-00105401.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB444i6Y014952; Mon, 3 Dec 2018 23:08:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=Ld23Qpwy709KYywcbaKzGfin7USznN690TD6n978vFs=; b=HxFvk+x6B6nlR1qJFNUpEnjUDx3Cc0F4yKTSl55HDHHUJq+jzMrzVul3eOMaseM1qPEv f904nAp2gTTOskXoA9OTe7EW6VXf8dPGpo2w0gKBZl7w0xsvTF+jvCPIYxeXOGxLIYK+ T5Ic5HF7UQ3c7tcvyYQYgHRbPTUwoXdQRJWs1/mbNftMCXeE43/dj4N54WRtywEUfR8g M0FdZm0Kp8TP8TB/WSMVjpWi9KEEh5Bw7ghv3gYXWU0Qy/7wmsdRKEdDtVcJrASE6qTT SWN7XlGpdUinSZv7MIjosPEOzE+eHHXZlvcXQRF46/2GoBcWcKqfq/xAulYkOQTGNkEE yw== Received: from xnwpv37.utc.com ([167.17.239.17]) by mx0a-00105401.pphosted.com with ESMTP id 2p3qt5jsmu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 03 Dec 2018 23:08:55 -0500 Received: from uusnwa7g.corp.utc.com (uusnwa7g.corp.utc.com [159.82.101.105]) by xnwpv37.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448s4v054866 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:54 -0500 Received: from ch3vs03.rockwellcollins.com ([10.172.224.19]) by uusnwa7g.corp.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448rVE002596 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:54 -0500 Received: from ofwch3n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs03.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:53 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id B4F3C2007B; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:48 -0600 Message-Id: <1543896530-33550-5-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 5/7] testing/tests: CLANG compiler-rt runtime test 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: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch adds a test case that 1) Builds the complete LLVM and CLANG set of host tools 2) Cross-compiles the compiler-rt runtime using CLANG 3) Builds a cross-compiled application using CLANG and the libfuzzer compiler-rt library. 4) Executes the fuzz application (part of the libfuzzer package) on target and checks expected output Signed-off-by: Matthew Weber Cc: Ricardo Martincoski Reviewed-by: Ricardo Martincoski [with the entire series applied on next branch: https://gitlab.com/RicardoMartincoski/buildroot/-/jobs/121908178 NOTE: this test case takes longer than test_rust, ~2 hours in my host machine with all tarballs previously downloaded] Tested-by: Ricardo Martincoski --- Changes v1 -> v2 [Ricardo - updated yml with test case - moved emulator launch cmd to test case from infra - defconfig in the order provided by savedefconfig - indent defconfig - add full package for test code to the test br2-external - consolidated to one class only v2 -> v3 - Added Review/tested by v4 - None v5 - Rebased post 2018.11 on master --- .gitlab-ci.yml | 1 + .../br2-external/clang-compiler-rt/Config.in | 1 + .../br2-external/clang-compiler-rt/external.desc | 1 + .../br2-external/clang-compiler-rt/external.mk | 1 + .../clang-compiler-rt/package/libfuzzer/Config.in | 7 ++++ .../package/libfuzzer/libfuzzer.hash | 2 + .../package/libfuzzer/libfuzzer.mk | 24 +++++++++++ support/testing/tests/package/test_clang.py | 46 ++++++++++++++++++++++ 8 files changed, 83 insertions(+) create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/Config.in create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/external.desc create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/external.mk create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash create mode 100644 support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk create mode 100644 support/testing/tests/package/test_clang.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bd2d5ec..154b0ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -312,6 +312,7 @@ tests.init.test_systemd.TestInitSystemSystemdRoNetworkd: *runtime_test tests.init.test_systemd.TestInitSystemSystemdRwFull: *runtime_test tests.init.test_systemd.TestInitSystemSystemdRwIfupdown: *runtime_test tests.init.test_systemd.TestInitSystemSystemdRwNetworkd: *runtime_test +tests.package.test_clang.TestClangCompilerRT: *runtime_test tests.package.test_dropbear.TestDropbear: *runtime_test tests.package.test_ipython.TestIPythonPy2: *runtime_test tests.package.test_ipython.TestIPythonPy3: *runtime_test diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in b/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in new file mode 100644 index 0000000..e1f9f8c --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/Config.in @@ -0,0 +1 @@ +source "$BR2_EXTERNAL_CLANG_COMPILER_RT_PATH/package/libfuzzer/Config.in" diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc b/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc new file mode 100644 index 0000000..92df859 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/external.desc @@ -0,0 +1 @@ +name: CLANG_COMPILER_RT diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk b/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk new file mode 100644 index 0000000..6fa55c1 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/external.mk @@ -0,0 +1 @@ +include $(sort $(wildcard $(BR2_EXTERNAL_CLANG_COMPILER_RT_PATH)/package/*/*.mk)) diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in new file mode 100644 index 0000000..5af5d1b --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBFUZZER + bool "libfuzzer" + help + This is a set of tests (benchmarks) for fuzzing + engines (fuzzers). + + https://github.com/google/fuzzer-test-suite diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash new file mode 100644 index 0000000..6baf576 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash @@ -0,0 +1,2 @@ +sha256 c0addb4d7f0447fc9fd7c80e5721fafe4c137f29a8ebd94c5fef7e1d6a2c944c libfuzzer-64e4d9aa19a8d33b61882154addbf8419d7416e1.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE diff --git a/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk new file mode 100644 index 0000000..7d6f83b --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfuzzer +# +################################################################################ + +LIBFUZZER_VERSION = 64e4d9aa19a8d33b61882154addbf8419d7416e1 +LIBFUZZER_SITE = $(call github,google,fuzzer-test-suite,$(LIBFUZZER_VERSION)) +LIBFUZZER_LICENSE = Apache-2.0 +LIBFUZZER_LICENSE_FILES = LICENSE +LIBFUZZER_DEPENDENCIES = compiler-rt + +define LIBFUZZER_BUILD_CMDS + $(HOST_DIR)/bin/clang++ -mcpu=cortex-a53 --sysroot=$(STAGING_DIR) \ + -B $(HOST_DIR)/opt/ext-toolchain -fsanitize=address,fuzzer \ + $(@D)/tutorial/fuzz_me.cc \ + -o $(@D)/fuzz_me +endef + +define LIBFUZZER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/fuzz_me $(TARGET_DIR)/usr/bin/fuzz_me +endef + +$(eval $(generic-package)) diff --git a/support/testing/tests/package/test_clang.py b/support/testing/tests/package/test_clang.py new file mode 100644 index 0000000..84a2528 --- /dev/null +++ b/support/testing/tests/package/test_clang.py @@ -0,0 +1,46 @@ +import os + +import infra.basetest + +FUZZ_TIMEOUT = 120 + + +class TestClangCompilerRT(infra.basetest.BRTest): + br2_external = [infra.filepath("tests/package/br2-external/clang-compiler-rt")] + config = \ + """ + BR2_aarch64=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config" + BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y + BR2_PACKAGE_COMPILER_RT=y + BR2_PACKAGE_LLVM=y + BR2_TARGET_ROOTFS_CPIO=y + BR2_TARGET_ROOTFS_CPIO_GZIP=y + # BR2_TARGET_ROOTFS_TAR is not set + BR2_PACKAGE_LIBFUZZER=y + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.cpio.gz") + kern = os.path.join(self.builddir, "images", "Image") + # Sanitizers overallocate memory and the minimum that seemed to work was 512MB + self.emulator.boot(arch="aarch64", + kernel=kern, + kernel_cmdline=["console=ttyAMA0"], + options=["-M", "virt", "-cpu", "cortex-a53", "-m", "512", "-initrd", img]) + self.emulator.login() + + def test_run(self): + self.login() + + # The test case verifies both that the application executes and that + # the symbolizer is working to decode the stack trace + cmd = "fuzz_me 2>&1 | grep _M_replace" + _, exit_code = self.emulator.run(cmd, FUZZ_TIMEOUT) + self.assertEqual(exit_code, 0) From patchwork Tue Dec 4 04:08:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007431 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=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="hyj9u6lv"; 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 4387f63Z76z9s55 for ; Tue, 4 Dec 2018 15:09:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4C9F026808; Tue, 4 Dec 2018 04:09:00 +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 3cUAZ4zFJ7w0; Tue, 4 Dec 2018 04:08:59 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 1C64520767; Tue, 4 Dec 2018 04:08:59 +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 74B251C2BE9 for ; Tue, 4 Dec 2018 04:08:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 71D9820767 for ; Tue, 4 Dec 2018 04:08:57 +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 B5-PbSQ8TZ-w for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx0a-00105401.pphosted.com (mx0a-00105401.pphosted.com [67.231.144.184]) by silver.osuosl.org (Postfix) with ESMTPS id BF30B1FCB5 for ; Tue, 4 Dec 2018 04:08:56 +0000 (UTC) Received: from pps.filterd (m0072137.ppops.net [127.0.0.1]) by m0072137.ppops.net (8.16.0.22/8.16.0.22) with SMTP id wB445YF1028502; Mon, 3 Dec 2018 23:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=LGE/9nMRrWZNqKYir3EczGXR5UoKsv7T3PTkdovJJJc=; b=hyj9u6lvplX9S8DG3VP0R4vwGSNbo91eOA8ZUUBasSUr9F9JDrujIDNlrUKnl6PeGsaW CyqlJig03FurqKHfkNHZsvINDGI2z+lWmQNhf41WK3Mh7SatOCbRaSKJk1chjsuqUEj7 Eql1iJNmlkJTePxPbMJjWufyl8OtvxRGM/SFffFnYEguGpHZ6+Tk/z1prMsHR48cf7r4 +w6lNwfV11j6cvw6vlKGpWqMQeOlx4dl2mLJ3jty1FBBetpjcPJ+JAcIZANZtZVH+RBR lsX4j8j36YpeV+KHpui549jOV/I4LNsTiThHBflBbIpGnaOaGSAvz5tBj5u4CIzy4/l2 Vw== Received: from xmnpv36.utc.com ([167.17.255.16]) by m0072137.ppops.net with ESMTP id 2p5gq21ej0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 03 Dec 2018 23:08:55 -0500 Received: from uusnwa4u.utc.com (uusnwa4u.utc.com [159.82.101.254]) by xmnpv36.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448sRT026895 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:54 -0500 Received: from da1vs02.rockwellcollins.com ([10.172.224.19]) by uusnwa4u.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448rAH010034 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:53 -0500 Received: from ofwda1n02.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:53 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id C24712007C; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:49 -0600 Message-Id: <1543896530-33550-6-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 6/7] llvm/clang: add note about version bumping together 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: Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Matthew Weber Acked-by: Romain Naour Cc: Ricardo Martincoski --- Changes v1 -> v2 - None v2 -> v3 [Ricardo - Added compiler-rt to list of items to bump. I originaly had kept this patch independent of the compiler-rt series but since compiler-rt is first in the series, this one may as well include it in the statements v4 - None v5 - Rebased post 2018.11 on master --- package/clang/clang.mk | 1 + package/llvm/llvm.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/package/clang/clang.mk b/package/clang/clang.mk index f9d4ae3..461d5f9 100644 --- a/package/clang/clang.mk +++ b/package/clang/clang.mk @@ -4,6 +4,7 @@ # ################################################################################ +# LLVM, Clang and Compiler-RT should be version bumped together CLANG_VERSION = 7.0.0 CLANG_SITE = http://llvm.org/releases/$(CLANG_VERSION) CLANG_SOURCE = cfe-$(CLANG_VERSION).src.tar.xz diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 79477f0..14f317d 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -4,6 +4,7 @@ # ################################################################################ +# LLVM, Clang and Compiler-RT should be version bumped together LLVM_VERSION = 7.0.0 LLVM_SITE = http://llvm.org/releases/$(LLVM_VERSION) LLVM_SOURCE = llvm-$(LLVM_VERSION).src.tar.xz From patchwork Tue Dec 4 04:08:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Weber X-Patchwork-Id: 1007437 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.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=reject dis=none) header.from=collins.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=collins.com header.i=@collins.com header.b="BjQt3xxU"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4387gb6nPmz9s55 for ; Tue, 4 Dec 2018 15:10:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 41BD286E58; Tue, 4 Dec 2018 04:10:18 +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 Yzgy4EQDGvvk; Tue, 4 Dec 2018 04:10:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 338B2877A6; Tue, 4 Dec 2018 04:09:59 +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 B676A1C2BE9 for ; Tue, 4 Dec 2018 04:09:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B0510811D8 for ; Tue, 4 Dec 2018 04:09:41 +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 w124uCHoKK7K for ; Tue, 4 Dec 2018 04:09:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mx0b-00105401.pphosted.com (mx0b-00105401.pphosted.com [67.231.152.184]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5552D82C74 for ; Tue, 4 Dec 2018 04:08:57 +0000 (UTC) Received: from pps.filterd (m0074333.ppops.net [127.0.0.1]) by m0074333.ppops.net (8.16.0.22/8.16.0.22) with SMTP id wB4454fe016826; Mon, 3 Dec 2018 23:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=collins.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=POD051818; bh=PCQ5eSDzajF9HXWy0zviNMe8KkIRi7u3iEBDULna1O4=; b=BjQt3xxUMSXbQ6+A+d0hWjWjYGeB2JULwVGOGROtxSo6rTpOZf/z5sMFN+bklZDx3/uc MJWkX9leFLJ0POXPSnDriZeLoqBRkLr7ma3nfuzxTrjfvXt+fyTPw6sdkyqzX551ilB+ QgS7/GSUPla/tsez8y2j41Ry1Ko9dAozMrQvYHbIMkooXbX27QUItBp/Fl7lshDXjM2H /W6lizZudX/LCGeXkYNgKjBsgKqY/vgqxa7zMhz/6gy69fM+DM+rGCmYZKyAWwzhyEBM KBm/nLc1KjJZBluPtJTWlGhZtII8lvkNtxxYske5pBnOqcjH78T5dEn46BSBlc0IrG7z qA== Received: from xmnpv38.utc.com ([167.17.255.18]) by m0074333.ppops.net with ESMTP id 2p5d39mqmg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 03 Dec 2018 23:08:55 -0500 Received: from uusmna21.corp.utc.com (uusmna21.corp.utc.com [159.82.227.11]) by xmnpv38.utc.com (8.16.0.21/8.16.0.21) with ESMTPS id wB448taV080628 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 23:08:55 -0500 Received: from secvs01.rockwellcollins.com ([10.172.224.19]) by uusmna21.corp.utc.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id wB448qUr011047 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Dec 2018 23:08:54 -0500 Received: from ofwgwc03.rockwellcollins.com (HELO ciulimr02.rockwellcollins.com) ([205.175.225.12]) by secvs01.rockwellcollins.com with ESMTP; 03 Dec 2018 22:08:52 -0600 X-Received: from largo.rockwellcollins.com (unknown [192.168.140.76]) by ciulimr02.rockwellcollins.com (Postfix) with ESMTP id D191D2007D; Mon, 3 Dec 2018 22:08:52 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Mon, 3 Dec 2018 22:08:50 -0600 Message-Id: <1543896530-33550-7-git-send-email-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> References: <1543896530-33550-1-git-send-email-matthew.weber@rockwellcollins.com> X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=748 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812040034 Subject: [Buildroot] [PATCH v5 7/7] package/llvm: disable libxml2 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" libxml2 is needed during Windows builds to populate the COFF file manifest info If left enabled, a dependency would need to be added and paths set for libxml2 include and library paths. This isn't require at this point for Linux builds. Cc: Romain Naour Signed-off-by: Matthew Weber --- This change was discovered during testing of compiler-rt patchset. This patch could be independently applied. Romain, hopefully you are able to verify this resolves the path posioning you observed with the target build and libxml2. v4 - New patch v5 - Rebased post 2018.11 on master --- package/llvm/llvm.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 14f317d..ef54f10 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -123,6 +123,11 @@ HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_ZLIB=ON HOST_LLVM_DEPENDENCIES += host-zlib LLVM_CONF_OPTS += -DLLVM_ENABLE_ZLIB=OFF +# libxml2 can be disabled as it is used for LLVM Windows builds where COFF +# files include manifest info +HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_LIBXML2=OFF +LLVM_CONF_OPTS += -DLLVM_ENABLE_LIBXML2=OFF + # We don't use llvm for static only build, so enable PIC HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_PIC=ON LLVM_CONF_OPTS += -DLLVM_ENABLE_PIC=ON