From patchwork Thu Mar 11 14:29:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451213 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=mCZGTd4P; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBD54p9Wz9sR4 for ; Fri, 12 Mar 2021 01:29:41 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 00E778341E; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7m-Rdww6Ml_A; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 30D2B834DE; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 2FB7E1BF9B2 for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1A9E8431D7 for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lRoc5bdf0YUe for ; Thu, 11 Mar 2021 14:29:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs03.rockwellcollins.com (da1vs03.rockwellcollins.com [205.175.227.47]) by smtp2.osuosl.org (Postfix) with ESMTPS id 1ED2D42FB1 for ; Thu, 11 Mar 2021 14:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id; bh=2+N5RgRwcEkDw+Q2VCld2YGwAreAlVAe+yR+ASB6dCs=; b=mCZGTd4PvkKjx41V45qnVMokFSMMhvB7052mEtvfejynjyQqgkrlvWFv +N7RNAdJbA6BXDkJDTyVSTxNdCpLAhZ0LrOc0KsKGopBv4h24M+y9Lf8p d7y/YOgxJz/kCCuv2YejhrpQRp9imu+5bq3Wbz/Tz7N1IlQSwsraIgfT8 pT04le2x5BSwFS89Vzy8jnPFegkh7EKqReDXiTa/o2UOWeRstk+IJcETy U6s7C+Outpp8ppWAF0O4YSZd+tsAGyHd0oiWZUP38mPHbTbe8oXcaC97O 052sKuJ5jjBg7UOt7RPMzTGE+XUKzIc6ffRN4PEo2MNg/YmzEiSPlKPc7 w==; IronPort-SDR: T78NbzlcysF3TNxNNFhg3EWXYDsNU5GKf6w4uLdS+97DQQ1X/P3XqYFXxfTk/opOKqSAE2b93o cXSbKfjCFoGU5Q5wncd2pYNU9SNujbgRSyMgqthPBVR+Ik9+bqXRyEwDKqStdVxA89zm2GkUVV T9y7umRPgIhg9Af97gMdAEBMCmVc9YGtIQuHBuPCAVSvLsTlgnvlRMVKFjq0iY7ssdSanxzhTD n1H3R5tu8m6RLrakI/5FyV71KXOZA3hxaJ0yMktx95RdzZO2sfyrodTC96YyMWxMv1x2T1Wgza brw= Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs03.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:34 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 6B2396021E; Thu, 11 Mar 2021 08:29:33 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:24 -0600 Message-Id: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH v11 1/9] package/llvm: bump to version 11.1.0 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Matthew Weber --- package/llvm/llvm.hash | 2 +- package/llvm/llvm.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/llvm/llvm.hash b/package/llvm/llvm.hash index 6bf2755777..e93a922492 100644 --- a/package/llvm/llvm.hash +++ b/package/llvm/llvm.hash @@ -1,3 +1,3 @@ # locally calculated -sha256 00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a llvm-9.0.1.src.tar.xz +sha256 ce8508e318a01a63d4e8b3090ab2ded3c598a50258cc49e2625b9120d4c03ea5 llvm-11.1.0.src.tar.xz sha256 8d85c1057d742e597985c7d4e6320b015a9139385cff4cbae06ffc0ebe89afee LICENSE.TXT diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 7d60fe7f8c..6c7ae3f838 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -5,7 +5,7 @@ ################################################################################ # LLVM, Clang and lld should be version bumped together -LLVM_VERSION = 9.0.1 +LLVM_VERSION = 11.1.0 LLVM_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LLVM_VERSION) LLVM_SOURCE = llvm-$(LLVM_VERSION).src.tar.xz LLVM_LICENSE = Apache-2.0 with exceptions From patchwork Thu Mar 11 14:29:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451214 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=cvzMtnjp; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBDN1bGCz9sR4 for ; Fri, 12 Mar 2021 01:29:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8F72C431DE; Thu, 11 Mar 2021 14:29:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XazFBo7HtgPK; Thu, 11 Mar 2021 14:29:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id DC0D142FC0; Thu, 11 Mar 2021 14:29:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 2A3521BF5DE for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 18C636F5BC for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Lmf83Sz7lefo for ; Thu, 11 Mar 2021 14:29:35 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by smtp3.osuosl.org (Postfix) with ESMTPS id 14377605AF for ; Thu, 11 Mar 2021 14:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=unBW8gozVoaAEIdTXAv5gWYsPM8wUBhG73G3cLNUq9Q=; b=cvzMtnjpKQCSSxVkBOS9odbOxIEHC7ExFiVVz8ooYtRIZobjmypKwrR+ 8n1jzY2rvOvw3q/mhKDw7NOhHmsLkCsI/6ruRiMQrnev51d1QhvkfR4C0 wQzkXy3tr6tNNqcEn1ZDpF6VcXbdxT++9OPU9SAiNsn3VAEhg0QytLURR tT7yHarydoIDT6MuLwf2UzCwmQYuLvrspvNp0wHgxCDIgevHeLp6wE6Ps W2NG9G6QLwIKoxWKFvH7IXKvl+20kb8ANWalTEY+65+jfKYzZAnRkWkSO h2MSD4VPcBV4zr03UZgMQYa+dDeiGizSI2/9Hr1TZ1IPCOFZKcmXbhX/M A==; IronPort-SDR: ldQ6NQmYxiB/rq9apE5fVcw5i0gK/ZMSDGehJuHPWnM8kpEs0rfne4rHMqZbMuxwjY1VO/kBUE Qj4qKakf0loFW6q+bM0A0PZc9AKX+GWtl1VZ14ALSzXbda3XxwlIgfCNzBSXjANrAuP9ndPpFJ bjpJamCUkBHoFwl83uWjaEHVlKY16bO5M2rNp1U61Et63eGYS9SBc8nQYM33YjheXi8cao3RoC u/ajArPBs9VStOBxSko9fCWSBLR+bXeoBzIp6kLxIyU8DnZarSwW3xcKH5yyKvZG79CvbIhVhz 45M= Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:34 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id D6C13602CE; Thu, 11 Mar 2021 08:29:33 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:25 -0600 Message-Id: <20210311142932.44985-2-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 2/9] package/clang: bump to version 11.1.0 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Signed-off-by: Matthew Weber --- package/clang/clang.hash | 2 +- package/clang/clang.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package/clang/clang.hash b/package/clang/clang.hash index 067a2c0470..32a19c1659 100644 --- a/package/clang/clang.hash +++ b/package/clang/clang.hash @@ -1,3 +1,3 @@ # locally calculated -sha256 5778512b2e065c204010f88777d44b95250671103e434f9dc7363ab2e3804253 clang-9.0.1.src.tar.xz +sha256 0a8288f065d1f57cb6d96da4d2965cbea32edc572aa972e466e954d17148558b clang-11.1.0.src.tar.xz sha256 ebcd9bbf783a73d05c53ba4d586b8d5813dcdf3bbec50265860ccc885e606f47 LICENSE.TXT diff --git a/package/clang/clang.mk b/package/clang/clang.mk index 939f000cbd..d1667d79b6 100644 --- a/package/clang/clang.mk +++ b/package/clang/clang.mk @@ -5,7 +5,8 @@ ################################################################################ # LLVM, Clang and lld should be version bumped together -CLANG_VERSION = 9.0.1 +CLANG_VERSION_MAJOR = 11 +CLANG_VERSION = $(CLANG_VERSION_MAJOR).1.0 CLANG_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(CLANG_VERSION) CLANG_SOURCE = clang-$(CLANG_VERSION).src.tar.xz CLANG_LICENSE = Apache-2.0 with exceptions From patchwork Thu Mar 11 14:29:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451217 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=xLvW/tJx; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBF40rS9z9sR4 for ; Fri, 12 Mar 2021 01:30:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 11AD3834EF; Thu, 11 Mar 2021 14:30:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6w3yg3jmXalp; Thu, 11 Mar 2021 14:30:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 55037834DE; Thu, 11 Mar 2021 14:30:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C254F1BF5DE for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id BF8D483578 for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OPeRetN-UFR0 for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ch3vs03.rockwellcollins.com (ch3vs03.rockwellcollins.com [205.175.226.47]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9BD908341E for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=B0Pf7cJawHv6XrtCeoV2uy5VsAzTHcNZxluOBi5Rh3I=; b=xLvW/tJxC67wRlJTG4jvtXoKqzE21iyXA/KLyVp6zNJqoXp5GQ/Qjf1S qAHPNJ3CKgfhuziEa/YUCHaJH0DDxe72Xn9dR6hjkpLCoRqhPrBob6AHb UEJ+KJFttjQvh6LYnluvt/0iw7uxLCkclWwJ7aJcNexUAgjXXoQqvHTrS pPoWZQt1J7AYE9p1YsFGfODUF42VhJLg27iwaihF3uPVMkq1TQOy39OkB XiSJOJoJFPW4j6dyeSD09mpmnYDIL1tEHxyRqmvIRPcnfaPmoPlXYue4H NhrFka5a+QAhHzRkGmKMNJIEt8aKyth0QREpLlQjRmq6/ZrMAa4OROQmr g==; IronPort-SDR: glonwg2gefQzWl+01WPv5iG+HikWRjfokNkZd7XK8EkVMC/fCVoqod/EYKEh5xd+02RlxI1FYR GvaFluwSuSolXCEeRhSh4pDg5jZ6Sz50oR0SDsmDDBUTderolLk37hOaL4hi/8yo/AVmVrvIt1 LUodvi8Nj2JC6hTJIwUcwmWCfQVHDkL1k2311BE+rrnVO0ZvOKBzzFlR3swjQV6kuU3TwcDYQF 7q39+iGTcpCqHTfas7O/248n6Bt3PQ2AE44x2W3Co/8KrQwOaw5j+0AjfEYaq8T5UkuLv+knrJ 5Ng= Received: from ofwch3n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs03.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:35 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 4CAF86021E; Thu, 11 Mar 2021 08:29:34 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:26 -0600 Message-Id: <20210311142932.44985-3-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 3/9] package/lld: bump to version 11.1.0 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" --- package/lld/lld.hash | 2 +- package/lld/lld.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/lld/lld.hash b/package/lld/lld.hash index 2144cc5666..17b8d18997 100644 --- a/package/lld/lld.hash +++ b/package/lld/lld.hash @@ -1,3 +1,3 @@ # locally calculated -sha256 86262bad3e2fd784ba8c5e2158d7aa36f12b85f2515e95bc81d65d75bb9b0c82 lld-9.0.1.src.tar.xz +sha256 017a788cbe1ecc4a949abf10755870519086d058a2e99f438829aef24f0c66ce lld-11.1.0.src.tar.xz sha256 f7891568956e34643eb6a0db1462db30820d40d7266e2a78063f2fe233ece5a0 LICENSE.TXT diff --git a/package/lld/lld.mk b/package/lld/lld.mk index cd1a03c1d3..4bf903cda0 100644 --- a/package/lld/lld.mk +++ b/package/lld/lld.mk @@ -5,7 +5,7 @@ ################################################################################ # LLVM, Clang and lld should be version bumped together -LLD_VERSION = 9.0.1 +LLD_VERSION = 11.1.0 LLD_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LLD_VERSION) LLD_SOURCE = lld-$(LLD_VERSION).src.tar.xz LLD_LICENSE = Apache-2.0 with exceptions From patchwork Thu Mar 11 14:29:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451216 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=uf+NAPQT; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBDq4cMVz9sWk for ; Fri, 12 Mar 2021 01:30:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5BB2C431EB; Thu, 11 Mar 2021 14:30:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 270rmvlFf3D6; Thu, 11 Mar 2021 14:30:16 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 64883431E4; Thu, 11 Mar 2021 14:30:15 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3B1101BF5DE for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2B07A431DE for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u6zfKOETc8Mq for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs05.rockwellcollins.com (da1vs05.rockwellcollins.com [205.175.227.130]) by smtp2.osuosl.org (Postfix) with ESMTPS id E7D9C42FC0 for ; Thu, 11 Mar 2021 14:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=/hNTVFdfu6RsrooMhYS6CcOQdoFdVDAkBFndkSmFoKE=; b=uf+NAPQTJ6Tuf8ZdszDSrdkwofXbyH87qHFNwNw1yEO7hQyp60Q48b9o +wOwPVDH6dMSnuL8UWa9bBecLOvcleBLNL7JQQQopi7wf0yQ53Zjft+rd 7ChUmoR43E2v/Z2MVgtWik2KgATLGk+UfqdODon+Ajwj/NbSNFYWNsfQu FgH+mYjgtQPj4fMQ2gjhvd0qBye3bhC2fnjAxRUYYw1KUpHQLe70C0rpf a2T4UlngfhkxTtJv68TthaFfswDCEKlLwDkgH2x4SQ4c+T+2XHujANPvb BH/7hlqtuUAQCL47y0f5iukGCAaGyxZvSZP6Ijw1PkBNonIFkD+4NvzUS w==; IronPort-SDR: FCFVBCJlL/WHcj8Xi4tDI8KYmtZby6bOrh8B1CrugkMEWeCXlF4XNySlF5aH/wPesUcWwipYag Xsnn3umw13vlqbDKZ+a3cZlj+NjYWFJ9LhbC+jM/NWv34jzNyZrPXXbn4yteqxNN2zs/bXlkTu 3YC5QrFOg9b9qNNFzSLD2Hjn3CpRGE39j2YMt/pQl9twMalAr6Dcq7Sjsl+7sMM6jdToNzgQ0M Azlt6TqqBsimPKAXlUuza9uZbX7BTaHT1/S1jwOWOFgxVRpOGvDQ0c9Sc5pT5oM0NS2eSyQPWV O+E= Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs05.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:35 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id B68636034B; Thu, 11 Mar 2021 08:29:34 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:27 -0600 Message-Id: <20210311142932.44985-4-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 4/9] package/libclc: bump version to 11.1.0 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" * Converts to the cmake pkg type * Updates download site * Adds a crosscompile fixups patch * Allow prepare_builtins utility to be directly called (it isn't installed into the path when cross compiling) * Fix file_find() for root search limitation Signed-off-by: Matthew Weber --- .../0001-support-out-of-tree-build.patch | 71 +++++++++++++++++++ package/libclc/libclc.hash | 2 +- package/libclc/libclc.mk | 42 +++-------- 3 files changed, 83 insertions(+), 32 deletions(-) create mode 100644 package/libclc/0001-support-out-of-tree-build.patch diff --git a/package/libclc/0001-support-out-of-tree-build.patch b/package/libclc/0001-support-out-of-tree-build.patch new file mode 100644 index 0000000000..918474c433 --- /dev/null +++ b/package/libclc/0001-support-out-of-tree-build.patch @@ -0,0 +1,71 @@ +From 495491e9d53bfb184c15753b5187e4bb55b19511 Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Tue, 9 Mar 2021 15:55:17 -0600 +Subject: [PATCH] support out of tree build + +(1) The package has a prepare_builtins tool which is built +but not placed in the path for later use in the build. This +fix allows the later build steps to use the binary in-place. + +(2) With cmake, find_file() when used for non-host builds is +limited by CMAKE_FIND_ROOT_PATH* scope. + +In $(HOST_DIR)/share/buildroot/toolchainfile.cmake we set the +following target settings for CMAKE_FIND_ROOT_PATH* which +limit the scope. +set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/aarch64-buildroot-linux-gnu/sysroot") +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + + +Signed-off-by: Matthew Weber +--- + CMakeLists.txt | 2 +- + cmake/CMakeDetermineCLCCompiler.cmake | 4 ++++ + cmake/CMakeDetermineLLAsmCompiler.cmake | 4 ++++ + 3 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9472f19..a784519 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -279,7 +279,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) + + # Add prepare target + add_custom_command( OUTPUT "${obj_suffix}" +- COMMAND prepare_builtins -o ++ COMMAND ./prepare_builtins -o + "${obj_suffix}" + "builtins.opt.${obj_suffix}" + DEPENDS "opt.${obj_suffix}" +diff --git a/cmake/CMakeDetermineCLCCompiler.cmake b/cmake/CMakeDetermineCLCCompiler.cmake +index 94d85d9..5de6a48 100644 +--- a/cmake/CMakeDetermineCLCCompiler.cmake ++++ b/cmake/CMakeDetermineCLCCompiler.cmake +@@ -12,7 +12,7 @@ mark_as_advanced(CMAKE_CLC_ARCHIVE) + + set(CMAKE_CLC_COMPILER_ENV_VAR "CLC_COMPILER") + set(CMAKE_CLC_ARCHIVE_ENV_VAR "CLC_LINKER") +-find_file(clc_comp_in CMakeCLCCompiler.cmake.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH}) ++set(clc_comp_in "${CMAKE_MODULE_PATH}/CMakeCLCCompiler.cmake.in" ) + # configure all variables set in this file + configure_file(${clc_comp_in} ${CMAKE_PLATFORM_INFO_DIR}/CMakeCLCCompiler.cmake @ONLY) + mark_as_advanced(clc_comp_in) +diff --git a/cmake/CMakeDetermineLLAsmCompiler.cmake b/cmake/CMakeDetermineLLAsmCompiler.cmake +index 1c424c7..dd3bfb6 100644 +--- a/cmake/CMakeDetermineLLAsmCompiler.cmake ++++ b/cmake/CMakeDetermineLLAsmCompiler.cmake +@@ -18,7 +18,7 @@ mark_as_advanced(CMAKE_LLAsm_ARCHIVE) + set(CMAKE_LLAsm_PREPROCESSOR_ENV_VAR "LL_PREPROCESSOR") + set(CMAKE_LLAsm_COMPILER_ENV_VAR "LL_ASSEMBLER") + set(CMAKE_LLAsm_ARCHIVE_ENV_VAR "LL_LINKER") +-find_file(ll_comp_in CMakeLLAsmCompiler.cmake.in PATHS ${CMAKE_ROOT}/Modules ${CMAKE_MODULE_PATH}) ++set(ll_comp_in "${CMAKE_MODULE_PATH}/CMakeLLAsmCompiler.cmake.in" ) + # configure all variables set in this file + configure_file(${ll_comp_in} ${CMAKE_PLATFORM_INFO_DIR}/CMakeLLAsmCompiler.cmake @ONLY) + mark_as_advanced(ll_comp_in) +-- +2.17.1 + diff --git a/package/libclc/libclc.hash b/package/libclc/libclc.hash index 2af64bc8e8..c670d92ed3 100644 --- a/package/libclc/libclc.hash +++ b/package/libclc/libclc.hash @@ -1,3 +1,3 @@ # locally calculated -sha256 54d7ae523aabf68d533011739d6c01546cae0c294442d0f44fd657c046cb707d libclc-d1cbc92e2ceee59963f5c3a576382e5bba31f060-br1.tar.gz +sha256 198dc45cdcc426c7968b9628a55062162ea338931157a18ddefb47188d119e1d libclc-11.1.0.src.tar.xz sha256 3c536c052db9afd997809e38785c9f2a9e54e2892330fa7c5b438e18a7413479 LICENSE.TXT diff --git a/package/libclc/libclc.mk b/package/libclc/libclc.mk index 6fe8e10a77..d460adcf41 100644 --- a/package/libclc/libclc.mk +++ b/package/libclc/libclc.mk @@ -4,43 +4,23 @@ # ################################################################################ -# Use the latest commit from release_90 branch. -LIBCLC_VERSION = d1cbc92e2ceee59963f5c3a576382e5bba31f060 -LIBCLC_SITE = https://github.com/llvm-mirror/libclc -LIBCLC_SITE_METHOD = git +LIBCLC_VERSION = 11.1.0 +LIBCLC_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(LIBCLC_VERSION) +LIBCLC_SOURCE = libclc-$(LIBCLC_VERSION).src.tar.xz LIBCLC_LICENSE = Apache-2.0 with exceptions or MIT LIBCLC_LICENSE_FILES = LICENSE.TXT LIBCLC_DEPENDENCIES = host-clang host-llvm LIBCLC_INSTALL_STAGING = YES -# C++ compiler is used to build a small tool (prepare-builtins) for the host. -# It must be built with the C++ compiler from the host. +# CMAKE_*_COMPILER_FORCED=ON skips testing the tools and assumes +# llvm-config provided values # -# The headers are installed in /usr/share and not /usr/include, -# because they are needed at runtime on the target to build the OpenCL -# kernels. +# CMAKE_CXX_COMPILER has to be set to the host compiler to build a host +# 'prepare_builtins' tool used during the build process LIBCLC_CONF_OPTS = \ - --with-llvm-config=$(HOST_DIR)/usr/bin/llvm-config \ - --prefix=/usr \ - --includedir=/usr/share \ - --pkgconfigdir=/usr/lib/pkgconfig \ - --with-cxx-compiler=$(HOSTCXX_NOCCACHE) + -DCMAKE_CLC_COMPILER_FORCED=ON \ + -DCMAKE_LLAsm_COMPILER_FORCED=ON \ + -DCMAKE_CXX_COMPILER="$(CMAKE_HOST_CXX_COMPILER)" -define LIBCLC_CONFIGURE_CMDS - (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.py $(LIBCLC_CONF_OPTS)) -endef - -define LIBCLC_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -endef - -define LIBCLC_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install -endef - -define LIBCLC_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install -endef - -$(eval $(generic-package)) +$(eval $(cmake-package)) From patchwork Thu Mar 11 14:29:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451218 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=YfEKH12S; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBFJ6rD4z9sR4 for ; Fri, 12 Mar 2021 01:30:44 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 067F8605AF; Thu, 11 Mar 2021 14:30:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M74QcdcOKmxE; Thu, 11 Mar 2021 14:30:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 062156F6CA; Thu, 11 Mar 2021 14:30:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 949581BF5DE for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id E690F42FC0 for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I_p_JmoF19eg for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs05.rockwellcollins.com (da1vs05.rockwellcollins.com [205.175.227.130]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5156542FB1 for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=B6DimgbLZwyV94rQna5ReN7krBpEtIgbWm3LYb3hOAs=; b=YfEKH12SciXH+g6AEJENC8LMRMAjGkdpgH7dBpMJ9YQtjVK1aDtMWK3C 2MNzxf5lRRWUG2jHcYUt/r3LLiV1w4qajvz89xeyO+PcV1/1NXqKyOTbS LhWwdOWLCjtCv4Bjo/JJ+f+4GG9t724O0ex55CYGxrDLGb1SSnLazdEfq m/JD13uJJdoHmby65DnjZos9FbBjDKV1CorS8WiIlWEpvbJvFo35v+SgU cdl5cKTA40QrSH7f5xK3HFPmXhgp+HQwCIlblJj1b/3WqezNshCRVCJLJ QPHV+/QhbWyCB4M3gaOaWlyQqSvs2l0srMJ94pR5Qmc3pwu7ru+IksRSE A==; IronPort-SDR: V532G8LOdhBEG/G7vFcoRzlF44VwyJ+ij/OwiRXHtUlku3vaOJu+sPAUMlpWFAh4mzxZ+4QKZF 7+V3fhCemMPtB8N9nO81U/DgswrCLbtm2SZFENk93TyevJ+SEuXuP8m0POeNmHKapk+GiwMl/T hZtKlq5HwJMfSgLsDMxYjY+0ZumO4WmzPx82a+FERJUV07aU7tSftGBaLm26n0hrPKlzSYVNp0 vN6uqbjleUH23CJLqyswFuxnhgFrRxwkmmgv9OqbQm7rdr6etbb/92W2Ar8Ry6OIPB1fuvzlqI C/E= Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs05.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:36 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 22FE1603B5; Thu, 11 Mar 2021 08:29:35 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:28 -0600 Message-Id: <20210311142932.44985-5-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 5/9] 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: Joseph Kogut , Michael Drake , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , 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. These libraries can then be used by developers in the SDK for building target applications for analysis. What is fuzzing and why libfuzzer? https://www.moritz.systems/blog/an-introduction-to-llvm-libfuzzer/ The compiler-rt fuzzer and address sanitizer tools require additional LLVM binary tools installed to allow stack trace decoding actively during executable analysis. This patch conditionally enables these tools. https://github.com/google/sanitizers/wiki/AddressSanitizerCallStack Signed-off-by: Matthew Weber Cc: Romain Naour Cc: Ricardo Martincoski Cc: Valentin Korenblit Cc: Michael Drake --- 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 v6 - Bumped to 7.0.1 to match current LLVM/Clang version v7 - Rebased on master for 8.0 LLVM/Clang version - Added comment about bumping verions of LLVM/Clang and Compiler-rt together [Romain - Disabled test cases (-DCOMPILER_RT_INCLUDE_TESTS=OFF) v8 - Rebased and updated version to 9.x to match llvm/clang [Romain - Squashed "[v7,1/5]package/llvm: install target binary/debug tools" to be included in this patch [Michael D - compiler-rt symlink creation to include shared folder such that control flow lists work v9 - Rebased post 2020.05 v10 - Switched compiler-rt site to point towards new github project - Updated compiler-rt version to 11.0.0 - Tested against master[8640e8ffde3f61c5838] using support/testing/run-tests -o runtest -k \ tests.package.test_clang.TestClangCompilerRT v11 - Updated compiler-rt version to 11.1.0 --- 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 | 37 ++++++++++++++++++++++++++++ package/llvm/llvm.mk | 11 ++++++++- 6 files changed, 66 insertions(+), 1 deletion(-) 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 c750105623..cc365c42ed 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1709,6 +1709,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/dacapo/ diff --git a/package/Config.in b/package/Config.in index 06dfc32cc6..61ec54fd38 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1856,6 +1856,7 @@ menu "Other" source "package/clang/Config.in" source "package/clapack/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 0000000000..9afc0d9d60 --- /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 0000000000..0689ec3d2a --- /dev/null +++ b/package/compiler-rt/compiler-rt.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 def1fc00c764cd3abbba925c712ac38860a756a43b696b291f46fee09e453274 compiler-rt-11.1.0.src.tar.xz +sha256 1a8f1058753f1ba890de984e48f0242a3a5c29a6a8f2ed9fd813f36985387e8d LICENSE.TXT diff --git a/package/compiler-rt/compiler-rt.mk b/package/compiler-rt/compiler-rt.mk new file mode 100644 index 0000000000..57f9c26854 --- /dev/null +++ b/package/compiler-rt/compiler-rt.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# 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 = 11.1.0 +COMPILER_RT_SOURCE = compiler-rt-$(COMPILER_RT_VERSION).src.tar.xz +COMPILER_RT_SITE = https://github.com/llvm/llvm-project/releases/download/llvmorg-$(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_STANDALONE_BUILD=OFF \ + -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 +# 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. The "resources" directory is loosely documented and seems to be +# assumed, as compiler-rt is usually build at the same time as Clang and not +# standalone. +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 + ln -sf ../../../../$(GNU_TARGET_NAME)/sysroot/usr/share $(HOST_DIR)/lib/clang/$(HOST_CLANG_VERSION)/share +endef +COMPILER_RT_POST_INSTALL_STAGING_HOOKS += COMPILER_RT_SETUP_RUNTIME_LIBS + +$(eval $(cmake-package)) diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk index 6c7ae3f838..9b0f3c30d2 100644 --- a/package/llvm/llvm.mk +++ b/package/llvm/llvm.mk @@ -215,8 +215,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 ifeq ($(BR2_PACKAGE_LLVM_RTTI),y) HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON From patchwork Thu Mar 11 14:29:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451220 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=aSlTHC++; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBFr4ST3z9sR4 for ; Fri, 12 Mar 2021 01:31:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AC7AE4EC0F; Thu, 11 Mar 2021 14:31:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id L6_Z_7j_YggN; Thu, 11 Mar 2021 14:31:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 4541C4EC59; Thu, 11 Mar 2021 14:31:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 981B91BF5DE for ; Thu, 11 Mar 2021 14:29:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 84A6442FB1 for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xJOYyr1QDsAn for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from secvs04.rockwellcollins.com (secvs04.rockwellcollins.com [205.175.225.130]) by smtp2.osuosl.org (Postfix) with ESMTPS id 145E9431D7 for ; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=jrhoSlflOZeWRUrd2FyRcQg+ji5QnoeVsSK+AVe4LdY=; b=aSlTHC++mbkpNC+aQz7Md9NdtRr7OLVn4Hr4lMZikkwAJvuHskxtdeOx EmglCSd4qeVN8e4VGr21iLsCkeDRA2YxfCXrIZ+pdh0DwfI99l9YRY9UM f1jOQ2kjsQKjrXhOWsk0fU1go36iD02BVQdveIZaG/nuvbgXvPwlfZelR 5LRHh/uBBZE9upQHYrfgClS4CRIQXVgHFnHwuuNbm2c5ImdCxpiG2QvM4 aZ9ckRL1Hqd51rZ8H5INmE/UZv5L4h9VziOFMAzovhxoOXvdoTI2eVkFE GReDnETwmOY+7v0J7s+26kNeyECfamdB0gvouBefjgV5xVbkEatM61gBY w==; IronPort-SDR: woFQDx/M89lYFFeLmWEunb8omtGGfLyyfUXIVl5FEwjdbHAmJT8OVc3GzBvtu4h/NjuabQCdox zk0AL6Xz1mbVPNYaqwC9LSe0Y1Dg+OtE4Gq5VZaa5tGW+16Pr8DN7hyhjj6Myi10YUb4NVr6T1 +XXFU0lB5pfoQXQIc/3y+IJAgR78OcRIkwG829VIVQvATTkfhkC1q2LvggO5obQxZ3K1jqCEvc Fr9+q5RY1ZRuKHV+rd4Fm9qouSHhUuYFsRp4Qn06jypx+whGt+BA1br0HT4WfdihFLoa77w6X4 6l8= Received: from ofwgwc03.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.225.12]) by secvs04.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:36 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 9D90F6021E; Thu, 11 Mar 2021 08:29:35 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:29 -0600 Message-Id: <20210311142932.44985-6-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 6/9] 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Romain Naour , Ricardo Martincoski , Valentin Korenblit 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 for a heap-buffer-overflow. Note: The libfuzzer package is just a tutorial example of how to use the toolkit provided by llvm (Thus not adding it as a full Buildroot package). Signed-off-by: Matthew Weber Cc: Ricardo Martincoski Cc: Romain Naour --- 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 Ricardo's [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] v4 - None v5 - Rebased post 2018.11 on master v6 - Testing of LLVM/Clang bump v7 - Rebase on master and testing of LLVM/Clang bump to 8.0 - Updated hashes for archive and legal info (legal info changed because of spelling cleanup) v8 - Cleaned up wording the 4th item of the message above. [Romain - Removes a hardcoded toolchain/sysroot path "b option" for libfuzzer pkg build, however requires this series applied. http://patchwork.ozlabs.org/project/buildroot/list/?series=129565 - updated test case to check for heap overflow string to keep arch generic - Removed the fixed mcpu arg from clang++ build and dropped --sysroot as cross compiler wrapper now provides this for libfuzzer build v9 - Rebased post 2020.05 v10 - Updated site for libfuzzer test case and bumped version - Switched back to have no dependency on clang as cross compiler series - Fixed a libfuzzer link time gcc ld error by adding sysroot and -B to the BUILD_CMDS since we don't depend on the cross wrapper. - Tested against master[8640e8ffde3f61c583] using support/testing/run-tests -o runtest -k \ tests.package.test_clang.TestClangCompilerRT v11 - Updated compiler-rt version to 11.1.0 --- .../br2-external/clang-compiler-rt/Config.in | 1 + .../clang-compiler-rt/external.desc | 1 + .../clang-compiler-rt/external.mk | 1 + .../package/libfuzzer/Config.in | 8 ++++ .../package/libfuzzer/libfuzzer.hash | 2 + .../package/libfuzzer/libfuzzer.mk | 24 ++++++++++ support/testing/tests/package/test_clang.py | 46 +++++++++++++++++++ 7 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/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 0000000000..e1f9f8c598 --- /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 0000000000..92df85911d --- /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 0000000000..6fa55c1211 --- /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 0000000000..2d335fd3c7 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBFUZZER + bool "libfuzzer" + help + This project aims at hosting tutorials, + examples, discussions, research proposals, + and other resources related to fuzzing. + + https://github.com/google/fuzzing 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 0000000000..9287005ed9 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.hash @@ -0,0 +1,2 @@ +sha256 c71360c3b1ba1d88b28b0b3cb3a1744d251b87a12f2881224cc53ec26eb7a2db libfuzzer-cec02db916d21baa4db5b8d262d78848b3a35f4b.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 0000000000..6c6371bea7 --- /dev/null +++ b/support/testing/tests/package/br2-external/clang-compiler-rt/package/libfuzzer/libfuzzer.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfuzzer +# +################################################################################ + +LIBFUZZER_VERSION = cec02db916d21baa4db5b8d262d78848b3a35f4b +LIBFUZZER_SITE = $(call github,google,fuzzing,$(LIBFUZZER_VERSION)) +LIBFUZZER_LICENSE = Apache-2.0 +LIBFUZZER_LICENSE_FILES = LICENSE +LIBFUZZER_DEPENDENCIES = compiler-rt + +define LIBFUZZER_BUILD_CMDS + $(HOST_DIR)/bin/clang++ --sysroot=$(STAGING_DIR) \ + -B $(HOST_DIR)/opt/ext-toolchain -fsanitize=address,fuzzer \ + $(@D)/tutorial/libFuzzer/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 0000000000..df3990c6be --- /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 the application executes and that + # the symbolizer is working to decode the stack trace. + cmd = "fuzz_me 2>&1 | grep heap-buffer-overflow" + _, exit_code = self.emulator.run(cmd, FUZZ_TIMEOUT) + self.assertEqual(exit_code, 0) From patchwork Thu Mar 11 14:29:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451219 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=IGg5ca9R; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBFZ4JgWz9sWX for ; Fri, 12 Mar 2021 01:30:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 1493383478; Thu, 11 Mar 2021 14:30:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j6A_j3BnElFW; Thu, 11 Mar 2021 14:30:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 0D5DF834DE; Thu, 11 Mar 2021 14:30:54 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 9F3DA1BF9B2 for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 8E5B445750 for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=rockwellcollins.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ilwORxBSxWBE for ; Thu, 11 Mar 2021 14:29:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ch3vs05.rockwellcollins.com (ch3vs05.rockwellcollins.com [205.175.226.130]) by smtp4.osuosl.org (Postfix) with ESMTPS id C8EB04542E for ; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=guyLePvFAmZ+v4Qfjib9PbJZRziFxRYhoRxG+1gGCwI=; b=IGg5ca9RaYd68QhCGCdwTw3YkuEXRjvwNc6LRKeHkTBsRBbgIwWz9+IF /aqLI2w+G0vgiw3qNOO6bSrQQrRfd9HDGqSp9gjDnNgiz2w1lqXLyaj7g S0n32Cd/+EKOqNvbQ8Hsf8a1FGQJ3PdqoakJ08fA2+UkhRiw2SN7iLjyU +oHUMIi2SnQJafYnDlH6E1zWKCe8/5GjUdmd7FZZSAIsva6FGTIvUKf6e xbHfpKO4UJSUUxnqAMU/j/SSlIGaZilODTgRkSF8pCBZVMhZk0AxyGRCK W+9wBVzbvZmrHre+yhi2weXcop0BONkTEzJ9oGeV1VLqDwFt+zE8J95Y9 g==; IronPort-SDR: oHoZqJ4MUOtPoxJU7GlVOSj4FDnF2Z7sC7c1My80osiacTZHWkR1gLrgtVqRTKRJVsiuG5iFXD yTONP6R86qAZp5TFNhN/oupQ2ItjX0gSFlz1B+FNvdbaVlLxuc6ab2IZODv8YVOqxFqlmAs8k8 o3AibQpf9ffmm3426ur+HtHhu1NsqhRf5RiMiilSu36L/6kwOQNIXKYA08WgnTiqGt/htznY6T 69DBYwS56oDGEQUtOU6v5jRPcMGp2FsBhEnXBCv+navaFZRpEkPBBWb7Qv7ujqY2THu7iRWfJC k/A= Received: from ofwch3n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs05.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:36 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 1AEF26036B; Thu, 11 Mar 2021 08:29:36 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:30 -0600 Message-Id: <20210311142932.44985-7-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 7/9] package/clang: help host-clang to find our external toolchain 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Romain Naour To build libfuzzer package Matthew Weber noticed that (host) clang doesn't run on the host without "-B $(HOST_DIR)/opt/ext-toolchain" option. This option add a new search path for binaries and object files used implicitly. Without -B clang fail to link due to missing crtbeging.o file and libgcc: output/host/bin/aarch64-linux-gnu-ld: cannot find crtbegin.o: No such file or directory output/host/bin/aarch64-linux-gnu-ld: cannot find -lgcc Indeed, clang search path doesn't include the dafault cross-gcc's search paths: $ output/host/bin/clang -print-search-dirs programs: = output/host/bin:output/host/bin:/..//bin libraries: = output/host/lib/clang/8.0.0: output/host/bin/../lib64: /lib/../lib64: /usr/lib/../lib64: output/host/bin/../lib: /lib:/usr/lib Here is the same command for cross-gcc: $ output/host/bin/aarch64-linux-gnu-gcc -print-search-dirs install: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/ programs: = output/host/opt/ext-toolchain/bin/../libexec/gcc/aarch64-linux-gnu/8.3.0/: output/host/opt/ext-toolchain/bin/../libexec/gcc/: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/aarch64-linux-gnu/8.3.0/: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/bin/ libraries: = output/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/: output/host/opt/ext-toolchain/bin/../lib/gcc/: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/lib/aarch64-linux-gnu/8.3.0/: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/lib/../lib64/: output/host/aarch64-buildroot-linux-gnu/sysroot/lib/aarch64-linux-gnu/8.3.0/: output/host/aarch64-buildroot-linux-gnu/sysroot/lib/../lib64/: output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/aarch64-linux-gnu/8.3.0/: output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/../lib64/: output/host/opt/ext-toolchain/bin/../lib/gcc/aarch64-linux-gnu/8.3.0/../../../../aarch64-linux-gnu/lib/: output/host/aarch64-buildroot-linux-gnu/sysroot/lib/: output/host/aarch64-buildroot-linux-gnu/sysroot/usr/lib/ We can see that gcc default search path contains "output/host/opt/ext-toolchain" directory where the external toolchain has been extracted. Since we want to use clang without additional option like -B, patch clang in order to use GCC_INSTALL_PREFIX instead of using automatic detection (which doesn't work for Buildroot). We eventually want to relocate the Buildroot SDK containing the clang cross-compiler, so we provide a relative path to GCC_INSTALL_PREFIX in order to avoid to hardcode the path to the GCC toolchain. Also the path between clang and the GCC external toolchain is not always the same, we have the following case: * Toolchain to be downloaded and installed The toolchain is extracted into $(HOST_DIR)/opt/ext-toolchain, so the path is "../opt/ext-toolchain". * Pre-installed toolchain The toolchain is localed somewhere in the host filesystem and defined by the user using BR2_TOOLCHAIN_EXTERNAL_PATH. So, set GCC_INSTALL_PREFIX using realpath: -DGCC_INSTALL_PREFIX:PATH=`realpath --relative-to=$(HOST_DIR)/bin/ $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)` When we use a Buildroot's internal toolchain, clang will find theses crt*.o files and libgcc. http://lists.busybox.net/pipermail/buildroot/2019-August/256204.html Signed-off-by: Romain Naour Cc: Matthew Weber Cc: Valentin Korenblit Tested-by: Matt Weber --- Changes v1 -> v2 [Arnout - Can't dropped ":PATH" from "-DGCC_INSTALL_PREFIX:PATH=" as suggested, The string isn't set correctly and results in "cannot find crtbegin.o" - Attempting to post patch upstream - I did not address the relative vs absolute path comment. The current approach seemed correct per my understanding for handling the two toolchain install location cases --- ...hains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch | 78 +++++++++++++++++++ package/clang/clang.mk | 7 ++ 2 files changed, 85 insertions(+) create mode 100644 package/clang/0001-lib-Driver-ToolChains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch diff --git a/package/clang/0001-lib-Driver-ToolChains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch b/package/clang/0001-lib-Driver-ToolChains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch new file mode 100644 index 0000000000..08371154d5 --- /dev/null +++ b/package/clang/0001-lib-Driver-ToolChains-Gnu-Use-GCC_INSTALL_PREFIX-in-.patch @@ -0,0 +1,78 @@ +From fe21cede3939a435d62efbd5799547fab6af1b0a Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Mon, 5 Aug 2019 16:06:48 +0200 +Subject: [PATCH] lib/Driver/ToolChains/Gnu: Use GCC_INSTALL_PREFIX in the set + of prefixes for searching the gcc toolchain + +By default, the Gnu Toolchains driver is looking at the parent +directory while looking for the gcc toolchain when clang is installed +at "D.InstalledDir" + +But this doesn't work with Buildroot since the external +toolchain is installed in host/opt/ext-toolchain and the sysroot is +moved to host/-buildroot-linux-gnu/sysroot/ directory. + +We tried by setting GCC_INSTALL_PREFIX in clang.mk for host-clang +but it doesn't work since we already provide a sysroot [1]. + +Help the Gnu Toolchains driver by using GCC_INSTALL_PREFIX path. + +Since we want to be able to relocate the clang toolchain, +allow to use a relative path with GCC_INSTALL_PREFIX. + +Buildroot will provide such relative path by using: +HOST_CLANG_CONF_OPTS += -DGCC_INSTALL_PREFIX:PATH=`realpath --relative-to=$(HOST_DIR)/bin/ $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)` + +Doing so allow to use clang without providing additional search +paths with -B option on the clang's command line. + +[1] https://reviews.llvm.org/D49244 +[2] http://lists.busybox.net/pipermail/buildroot/2019-August/256204.html + +Signed-off-by: Romain Naour +Signed-off-by: Matthew Weber +--- +Pending, access to llvm mailing lists to submit it is pending. They +seem to be having issues with their listserv. +--- + lib/Driver/ToolChains/Gnu.cpp | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp +index 2ad45097dc..90d6b5b748 100644 +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -1725,6 +1725,8 @@ void Generic_GCC::GCCInstallationDetector::init( + + Prefixes.push_back(GCCToolchainDir); + } else { ++ StringRef GccIinstallPrefix = GCC_INSTALL_PREFIX; ++ + // If we have a SysRoot, try that first. + if (!D.SysRoot.empty()) { + Prefixes.push_back(D.SysRoot); +@@ -1734,6 +1736,21 @@ void Generic_GCC::GCCInstallationDetector::init( + // Then look for gcc installed alongside clang. + Prefixes.push_back(D.InstalledDir + "/.."); + ++ // Use GCC_INSTALL_PREFIX if provided by the buildsystem. ++ if (!GccIinstallPrefix.empty()) ++ { ++ if (llvm::sys::path::is_relative(GccIinstallPrefix)) ++ { ++ // Use a relative path to gcc from clang install path. ++ Prefixes.push_back(D.InstalledDir + "/" + GccIinstallPrefix.str()); ++ } ++ else ++ { ++ // Hardcode the absolute path provided by GCC_INSTALL_PREFIX. ++ Prefixes.push_back(GCC_INSTALL_PREFIX); ++ } ++ } ++ + // Next, look for prefix(es) that correspond to distribution-supplied gcc + // installations. + if (D.SysRoot.empty()) { +-- +2.20.1 + diff --git a/package/clang/clang.mk b/package/clang/clang.mk index d1667d79b6..95b4964be3 100644 --- a/package/clang/clang.mk +++ b/package/clang/clang.mk @@ -105,5 +105,12 @@ CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON HOST_CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all +# Help host-clang to find our external toolchain, use a relative path from the clang +# installation directory to the external toolchain installation directory in order to +# not hardcode the toolchain absolute path. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +HOST_CLANG_CONF_OPTS += -DGCC_INSTALL_PREFIX:PATH=`realpath --relative-to=$(HOST_DIR)/bin/ $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)` +endif + $(eval $(cmake-package)) $(eval $(host-cmake-package)) From patchwork Thu Mar 11 14:29:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451215 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=MyHKGaLR; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBDb0dJYz9sR4 for ; Fri, 12 Mar 2021 01:30:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7BF026F6CA; Thu, 11 Mar 2021 14:30:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KemKsyni1HuB; Thu, 11 Mar 2021 14:30:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 97E2C6F610; Thu, 11 Mar 2021 14:30:02 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id DD4051BF5DE for ; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id CC9526F5BC for ; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nhHKFXmXgQe6 for ; Thu, 11 Mar 2021 14:29:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from da1vs02.rockwellcollins.com (da1vs02.rockwellcollins.com [205.175.227.29]) by smtp3.osuosl.org (Postfix) with ESMTPS id 045EE605AF for ; Thu, 11 Mar 2021 14:29:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=h52WZ0GFCtXlHTLS6WC2TlvBQTzcRroLFp8yhBz/jBM=; b=MyHKGaLRLULZNe0BX2wtLeFE/0DykadMX6SGVusbazDmRfoRQBwUN/Ih BvC7cPjha8LyyCNnlRCZWBBAJ75QvukcwSeF2mHdP3wgbDnz0fZoa/Pgo qh2/t0QGo4qTmfeUr8zxoeMO6Yth4hRiifjMahmM3246PwxUNzAYpEuug d6L9iTLv0mNp90FrRkhX3xEab5u9/4+AYd26FmZB8CvEeGQm8RokbxGxz dCc9idJ6IoIL0iqtyKTH5rr9qEZzW+JG1JMWRmM7xHJ81O08HCw0fWZO6 DmBFzbzv2BQjFPba8bPezU3fgUAnmtbAs80R6lKXTjj32heZsDHYqLpWo A==; IronPort-SDR: 2Fk0iD5xcH8hytMTEsScih8u+FyIcJ/Ef75U5TiPHsSDPQIehs7LsXEVWj8HtaHqX3YR2SvaUD 1Imxn7O6OrNXzsSaPy6zx9jtwPz8mVR2Che3Q3BAd5E0dIAgfagyzMsXGCit41ssYDvW/RAwsF 6I4wSd2778Iq0F/4Qqf4w6+B3r12+xRRpz3FFGtNejkrM9bqy1ClSLClGYasIJsDeTZHHIcfe3 MLvGoElUiDcTRrlsGO4VGKVhc7FmZmWuuT5JlZjAJgsfWU9238o++PUq4pTsG/fLtWn/1brPSe f58= Received: from ofwda1n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.227.14]) by da1vs02.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:37 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id 842D4603C5; Thu, 11 Mar 2021 08:29:36 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:31 -0600 Message-Id: <20210311142932.44985-8-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 8/9] package/clang: install a toolchain-wrapper for the host clang cross-compiler 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Romain Naour In order to use Clang as a host cross-compiler for Buildroot, we need to provide at least the path to the sysroot (using --sysroot) and some other compiler flags. This series looks to reuse the toolchain wrapper for GCC since Clang support most of the gcc flags used in the Buildroot's toolchain wrapper. The only flag -mfused-madd (deprecated since gcc 4.6) for mips is not supported by clang. Since Clang require gcc >= 5.x this flag can never be used. host-clang refers to an existing GCC-based toolchain (internal or external) for libstdc++. However, a Buildroot external toolchain gets a different BR_CROSS_PATH_SUFFIX. Therefore, we can't reuse the toolchain-wrapper that gets built for the GCC-based toolchain, but instead have to compile an additional clang-specific wrapper, called toolchain-wrapper-clang. After building the clang toolchain wrapper, create the symlinks needed to force package infrastructure to use clang througt the wrapper. Initially clang install the clang-8 binary and create all other symlinks: # clang -> clang-8 # clang++ -> clang # clang-8 # clang-cl -> clang # clang-cpp -> clang Use a post install hook to rename the clang-8 binary to clang-8.br_real and recreate all symlinks: # clang -> toolchain-wrapper-clang # clang++ -> toolchain-wrapper-clang # clang-8 -> toolchain-wrapper-clang # clang-8.br_real # clang++.br_real -> clang-8.br_real # clang.br_real -> clang-8.br_real # clang-cl -> toolchain-wrapper-clang # clang-cl.br_real -> clang-8.br_real # clang-cpp -> toolchain-wrapper-clang # clang-cpp.br_real -> clang-8.br_real NOTE: *.br_real symlinks are needed as the wrapper references them Use the previously introduced CLANG_VERSION_MAJOR variable to create theses symlinks. Set BR_CROSS_PATH_SUFFIX to ".br_real" as for the Buildroot's internal GCC toolchain backend to find the "real" clang binary installed in $(HOST_DIR)/bin. Borrow TOOLCHAIN_WRAPPER_BUILD and TOOLCHAIN_WRAPPER_INSTALL to build and install the specific clang toolchain wrapper. Signed-off-by: Romain Naour Cc: Valentin Korenblit Signed-off-by: Matthew Weber --- Changes v1 -> v2 [Arnout - Fixup commit description and clarified *.br_real - Simplified loop --- package/clang/clang.mk | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/package/clang/clang.mk b/package/clang/clang.mk index 95b4964be3..3c75f8d6b1 100644 --- a/package/clang/clang.mk +++ b/package/clang/clang.mk @@ -112,5 +112,33 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) HOST_CLANG_CONF_OPTS += -DGCC_INSTALL_PREFIX:PATH=`realpath --relative-to=$(HOST_DIR)/bin/ $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)` endif +define HOST_CLANG_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS + $(Q)cd $(HOST_DIR)/bin; \ + rm -f clang-$(CLANG_VERSION_MAJOR).br_real; \ + mv clang-$(CLANG_VERSION_MAJOR) clang-$(CLANG_VERSION_MAJOR).br_real; \ + ln -sf toolchain-wrapper-clang clang-$(CLANG_VERSION_MAJOR); \ + for i in clang clang++ clang-cl clang-cpp; do \ + ln -snf toolchain-wrapper-clang $$i; \ + ln -snf clang-$(CLANG_VERSION_MAJOR).br_real $$i.br_real; \ + done +endef + +define HOST_CLANG_TOOLCHAIN_WRAPPER_BUILD + $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \ + -s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \ + toolchain/toolchain-wrapper.c \ + -o $(@D)/toolchain-wrapper-clang +endef + +define HOST_CLANG_TOOLCHAIN_WRAPPER_INSTALL + $(INSTALL) -D -m 0755 $(@D)/toolchain-wrapper-clang \ + $(HOST_DIR)/bin/toolchain-wrapper-clang +endef + +HOST_CLANG_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"' +HOST_CLANG_POST_BUILD_HOOKS += HOST_CLANG_TOOLCHAIN_WRAPPER_BUILD +HOST_CLANG_POST_INSTALL_HOOKS += HOST_CLANG_TOOLCHAIN_WRAPPER_INSTALL +HOST_CLANG_POST_INSTALL_HOOKS += HOST_CLANG_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS + $(eval $(cmake-package)) $(eval $(host-cmake-package)) From patchwork Thu Mar 11 14:29:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Weber X-Patchwork-Id: 1451221 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rockwellcollins.com header.i=@rockwellcollins.com header.a=rsa-sha256 header.s=hrcrc2020 header.b=O9X5Lrfh; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DxBG436lNz9sWX for ; Fri, 12 Mar 2021 01:31:24 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6E97384108; Thu, 11 Mar 2021 14:31:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YvwUUYoVKh1N; Thu, 11 Mar 2021 14:31:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B5C5B834DE; Thu, 11 Mar 2021 14:31:20 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id D49261BF5DE for ; Thu, 11 Mar 2021 14:29:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C401F83578 for ; Thu, 11 Mar 2021 14:29:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YXhfrNjgSx63 for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from ch3vs02.rockwellcollins.com (ch3vs02.rockwellcollins.com [205.175.226.29]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9437D834DE for ; Thu, 11 Mar 2021 14:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rockwellcollins.com; s=hrcrc2020; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=RLghZS4dbWh/LBXycPmJzu9GO4/rbvOxTLYH1pfC00U=; b=O9X5LrfhFE8Kd5TXaio6o/txBf0BXAEn82i2eZfv5Mj54O8ADuLnC72H F3QGaTqbn2N9mQszmLdFawNTvtJ8sQH/1ixxcKwrE6iuis911KoL9x7HO zkeM/lZ/PR9Q98yiGDLDc6Egb7rj506MBVZi14Orh9Mh15xQ4EXb1Gzt0 4l6lHT0AF83CtC4lZyenG5IxQaOF8bLHFpYTYDd+7OW7jwQXngKs3OQ1h M8ojGuREedSVPwf4odpwlqaHw8MwOnmCRDwkB7l04Bdv2iEeBxnKzqTr3 pQSquVmbyIQLag8/LD2amq9G8qf+7/NLDpPt21Wrdd434dFK8lil8gr2A g==; IronPort-SDR: N3OSWv62Ufnt84YS2oPLpMf/d8RoGvVz3BTwQZEMlegaLRVkqsiRAQLhmZpA6NDRlczbHGENxx VjvTN8Z7aFSUTf4pmEDxwxqgR9i4hZcrUHhZijobMskYU5BxPN7ifu4dka95wuSGzGkoOTYuaU FtNbCix9b18lexT3eBdAmNXoz2NBXXDVcibfsgWbZeq2JP7GJNiWqjvII2yfd54ugxmloPu30Z j5J5FVtUMViJbj03j2ZLksGNZzU1uzFQqUL1l5PvPwU9rC7YZuubhwiy7BNeGMU13SLdt7XMpl ids= Received: from ofwch3n02.rockwellcollins.com (HELO dtulimr01.rockwellcollins.com) ([205.175.226.14]) by ch3vs02.rockwellcollins.com with ESMTP; 11 Mar 2021 08:29:38 -0600 X-Received: from biscuits.rockwellcollins.com (biscuits.rockwellcollins.lab [10.148.119.137]) by dtulimr01.rockwellcollins.com (Postfix) with ESMTP id ED6B560365; Thu, 11 Mar 2021 08:29:36 -0600 (CST) From: Matt Weber To: buildroot@buildroot.org Date: Thu, 11 Mar 2021 08:29:32 -0600 Message-Id: <20210311142932.44985-9-matthew.weber@rockwellcollins.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> References: <20210311142932.44985-1-matthew.weber@rockwellcollins.com> Subject: [Buildroot] [PATCH v11 9/9] package/compiler-rt: runtime test use toolchain-wrapper 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: Joseph Kogut , Matt Weber , Samuel Martin , Thomas Petazzoni , Romain Naour , Valentin Korenblit MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The toolchain wrapper for clang allows the build of the libfuzzer package to not point at "-B $(HOST_DIR)/opt/ext-toolchain" which prevents a build failure to link due to missing crtbeging.o and libgcc. Signed-off-by: Matthew Weber --- .../clang-compiler-rt/package/libfuzzer/libfuzzer.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 6c6371bea7..0515b9da35 100644 --- 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 @@ -12,7 +12,7 @@ LIBFUZZER_DEPENDENCIES = compiler-rt define LIBFUZZER_BUILD_CMDS $(HOST_DIR)/bin/clang++ --sysroot=$(STAGING_DIR) \ - -B $(HOST_DIR)/opt/ext-toolchain -fsanitize=address,fuzzer \ + -fsanitize=address,fuzzer \ $(@D)/tutorial/libFuzzer/fuzz_me.cc \ -o $(@D)/fuzz_me endef