From patchwork Sun Aug 25 19:41:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1976529 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) 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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WsPML5wsQz1yfF for ; Mon, 26 Aug 2024 05:41:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id DAD9740274; Sun, 25 Aug 2024 19:41:41 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id H_l1UU67Z3rm; Sun, 25 Aug 2024 19:41:41 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CD06040234 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id CD06040234; Sun, 25 Aug 2024 19:41:40 +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 673141BF33A for ; Sun, 25 Aug 2024 19:41:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 55903402BC for ; Sun, 25 Aug 2024 19:41:36 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id eOJbCQjCJVO0 for ; Sun, 25 Aug 2024 19:41:35 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::131; helo=mail-lf1-x131.google.com; envelope-from=geomatsi@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 5721840021 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5721840021 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5721840021 for ; Sun, 25 Aug 2024 19:41:35 +0000 (UTC) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-5343e75c642so2061475e87.2 for ; Sun, 25 Aug 2024 12:41:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724614892; x=1725219692; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PmqiZoPbGKYCB5J0SVRYbECOiZOmFlWgjWcb7MKzlFU=; b=tGESjORTQIy106iZZoNSgl30/YZ8U3JLVorYzTNvoLXZ+0IS5Yzwm7BE+CPiGTqE3g g1QlKUCmqMHs31sAJMzRa5aCaJMbSfh2rNknjCsUWKrRL1jw3rkCuIpvkfDsRVMd5wth +RerzTl19ei2PGhGJ1eVtGoZWxCwa+UIKAMhEYmOz8lZZjzLICCQVf3WAb3YL3oFfqyc vjXRbqPJAAE/SMU2DgMln2+SCUOAEBPPtGRc0LQvrOByA5kRtqpwh0TjO+rIdsk0Iz8i oEPrf7RFVAyTccoJ2ZN4MKk+9xGofD9S2RsKWYPFPlrwabJ9Q6g6VI14HZugsSHMg3OF 0HqA== X-Gm-Message-State: AOJu0YzgSM+0gCSrZiUUL50kJuysoDyp9EIKeSQr0MLiBhFWFEUSZxmg zk6QfNxNmsJZZODeoLusmk72ziq5QUT3RkL95GeLE/Nt2vnxmhZYQCAU5rIw X-Google-Smtp-Source: AGHT+IG0YGfiKcw2d9M/1b+9hpdcmCDhGK8C4LoVZi+LbRH3spfTZP6Dzk93ed3ZSA2cs1fukk78lQ== X-Received: by 2002:a05:6512:159f:b0:52e:9f17:8418 with SMTP id 2adb3069b0e04-5343882e162mr4923925e87.12.1724614891924; Sun, 25 Aug 2024 12:41:31 -0700 (PDT) Received: from localhost.localdomain ([5.188.167.4]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-534365f8061sm1004737e87.250.2024.08.25.12.41.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 12:41:30 -0700 (PDT) From: Sergey Matyukevich To: buildroot@buildroot.org Date: Sun, 25 Aug 2024 22:41:08 +0300 Message-ID: <20240825194124.4719-2-geomatsi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240825194124.4719-1-geomatsi@gmail.com> References: <20240825194124.4719-1-geomatsi@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724614892; x=1725219692; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PmqiZoPbGKYCB5J0SVRYbECOiZOmFlWgjWcb7MKzlFU=; b=kCxEkPUt8IuwUyA95KMxxbM7cFmU9BKxmpARWx3w692V1wk6hF7nBxkeVoexrqgkDO 4yx/KReyasv1mVhTc9z2PJGLAbPE81mYuwUorSuSTpCEI3SoZ05ay5yxVDdx2wL4pqP2 MrA4n1dJJjXQqUUgMF5ZvrLz9Crr40or8MsEfVNkDhcUs6TWVuNrg353amr7s2E4biMJ GxebI3aERzRo1V594Nyj5Nr4JvmSJP3lD4NbOsRxujFLL6DIQqKKOLazq5WSK2/GebRi xJmShXEqBK936HTohgXXp1RY8wuQQGSkG0T8qix3R7JGtCLjI87KutswtKgjsrJHeylV eqwA== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=kCxEkPUt Subject: [Buildroot] [PATCH 1/2] package: binutils: install libsframe to target X-BeenThere: buildroot@buildroot.org 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 , Giulio Benetti , "Yann E . MORIN" , Sergey Matyukevich Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Starting from v2.40, binutils provides libsframe, a library for manipulating the SFRAME debug format. Buildroot installs libsframe to the target image only if BR2_PACKAGE_BINUTILS_TARGET option is enabled. However other dynamic libraries from binutils are linked against libsframe, including libbfd and libopcodes. Any binary linked dynamically against libbfd, e.g. perf, will need libsframe as well. So always install libsframe the target. Signed-off-by: Sergey Matyukevich --- package/binutils/binutils.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index d98dd7b830..b459d4a271 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -120,6 +120,7 @@ ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y) define BINUTILS_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/opcodes DESTDIR=$(TARGET_DIR) install + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libsframe DESTDIR=$(TARGET_DIR) install endef endif From patchwork Sun Aug 25 19:41:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 1976530 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WsPMQ00vFz1yfF for ; Mon, 26 Aug 2024 05:41:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id AA0FF40289; Sun, 25 Aug 2024 19:41:45 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id PI7e5coCxWfm; Sun, 25 Aug 2024 19:41:44 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B6ED140265 Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id B6ED140265; Sun, 25 Aug 2024 19:41:44 +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 3AD451BF33A for ; Sun, 25 Aug 2024 19:41:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 27E9F80FA2 for ; Sun, 25 Aug 2024 19:41:38 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id uO15QEcvrNhk for ; Sun, 25 Aug 2024 19:41:37 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::134; helo=mail-lf1-x134.google.com; envelope-from=geomatsi@gmail.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 23C3C80DB9 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 23C3C80DB9 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by smtp1.osuosl.org (Postfix) with ESMTPS id 23C3C80DB9 for ; Sun, 25 Aug 2024 19:41:37 +0000 (UTC) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5343e75c642so2061488e87.2 for ; Sun, 25 Aug 2024 12:41:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724614894; x=1725219694; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FguxlINKo5uj4BAiBs2CcCGsG7+hdBdMkqf5AHiU9MI=; b=sGgzzQ1psIDs9FqxAK6BMqz5rBt5INYyopsiOPYgmZozaJsCFEIV97Dq9IkaoeInUl onDYXy+Py5f9Av/VR5NAkDYuUkENF6J1Xo6jgM5uNkQaxvnnxiBQ6k32iIO8agtdNBIK 1RGI0TCoZdALjLiIeYIzATrZ0yLVMd6oIeIJceTp3cG+woOvGhc6ezJ3mSVkBIgMFtGU T/NU406uYC4N9btiB8L+KjkI0YM+Aw5cUMsz4RiC/wbYZKqjesCjvPwx2XzzZHGCrXwL 7jGphyfo+k2zrTrukRYVVqGd/pUn6qVgYD3/2iC08aUPuoJDaJxCpA7G0tMcC4ZHx4bQ E/Ag== X-Gm-Message-State: AOJu0YwDKjOBTP0haK+FYvW1GjD7+pQQ2+Ig1W5oNsrdpk4lIS7iby1P WCLymNJ635KMZYoMpVtlih3Y0eSmhrkOxPEH17hsLObINetq2gkipuY2zTlL X-Google-Smtp-Source: AGHT+IEf51vsewy602ZsOAy5SqFKMRL0DJ/Z+jKFhV1MqeOzzt+vOXjKitRXbzxxpYJxfnOI3eD1ww== X-Received: by 2002:a05:6512:3992:b0:52e:9e70:d068 with SMTP id 2adb3069b0e04-5343882e1c6mr5190089e87.4.1724614893912; Sun, 25 Aug 2024 12:41:33 -0700 (PDT) Received: from localhost.localdomain ([5.188.167.4]) by smtp.googlemail.com with ESMTPSA id 2adb3069b0e04-534365f8061sm1004737e87.250.2024.08.25.12.41.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Aug 2024 12:41:32 -0700 (PDT) From: Sergey Matyukevich To: buildroot@buildroot.org Date: Sun, 25 Aug 2024 22:41:09 +0300 Message-ID: <20240825194124.4719-3-geomatsi@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240825194124.4719-1-geomatsi@gmail.com> References: <20240825194124.4719-1-geomatsi@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724614894; x=1725219694; darn=buildroot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FguxlINKo5uj4BAiBs2CcCGsG7+hdBdMkqf5AHiU9MI=; b=fD6+kq8DkmtPbGhfnf6hI6l9wVMQR78dKoSoT98Rz66We7MR6ImO26/zcvJEkNzMYN 53yfuej4Rudv+OLTAMh7cGbKGaqUD+7LLaloowOt9UxjBp4Hy9fJPm8IKKzUJ64WOEeD HvZn1qR1MT3R62ODnwtyHwDe2a3JjVKuw1b/eU6TivFQY7tt6AKC29z3/JPI54pQFdTO bsApZk4ZY8Y5WqdUHARfBs/8mg9q/dVxK//phrNwq369qSIO5j8rc8Iq5FOSbR0PefIP q8UdfLf77tO3wUheHMI6ALLe3gy5UUVkS5zLqgGAgjuHPZSl8BCcDILUrOSWivOTnJF9 P9KQ== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=fD6+kq8D Subject: [Buildroot] [PATCH 2/2] package/linux-tools: perf: explicit option for libbfd support X-BeenThere: buildroot@buildroot.org 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 , Giulio Benetti , "Yann E . MORIN" , Sergey Matyukevich Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" Before Linux v6.4, libbfd support in perf was opted in by default and could be disabled using NO_LIBBFD=1. Starting from Linux v6.4, libbfd support in perf is opted out by default and can be enabled with new variable BUILD_NONDISTRO=1. For details see the kernel commit [1]. In brief, the reason why libbfd support in perf is usually disabled is license: binutils is GPLv3, so some distributions can not ship perf linked against libbfd. This commit adds new NONDISTRO option for perf to explicitly enable libbfd support in perf when appropriate. Note that if binutils is enabled in config, but NONDISTRO is not enabled, then legacy option NO_LIBBFD will be set for perf in pre-v6.4 Linux kernels. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd317df072071903031ab5f91b4823858445c4a0 Signed-off-by: Sergey Matyukevich --- package/linux-tools/Config.in | 6 ++++++ package/linux-tools/linux-tool-perf.mk.in | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/package/linux-tools/Config.in b/package/linux-tools/Config.in index 5a38f6dafe..e87a1d571a 100644 --- a/package/linux-tools/Config.in +++ b/package/linux-tools/Config.in @@ -112,6 +112,12 @@ config BR2_PACKAGE_LINUX_TOOLS_PERF_TUI enables zooming into DSOs and threads as well as other features. +config BR2_PACKAGE_LINUX_TOOLS_PERF_NONDISTRO + bool "enable perf NONDISTRO" + help + Enable building an linking against libbfd and libiberty + distribution license incompatible libraries. + config BR2_PACKAGE_LINUX_TOOLS_PERF_NEEDS_HOST_PYTHON3 bool "perf need python3 to build" select BR2_PACKAGE_HOST_PYTHON3 diff --git a/package/linux-tools/linux-tool-perf.mk.in b/package/linux-tools/linux-tool-perf.mk.in index 65aba2e9fe..c26a3eb31b 100644 --- a/package/linux-tools/linux-tool-perf.mk.in +++ b/package/linux-tools/linux-tool-perf.mk.in @@ -96,7 +96,14 @@ PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1 endif ifeq ($(BR2_PACKAGE_BINUTILS),y) +ifeq ($(BR2_PACKAGE_LINUX_TOOLS_PERF_NONDISTRO),y) PERF_DEPENDENCIES += binutils +# Explicitely enable for Linux >= v6.4 +PERF_MAKE_FLAGS += BUILD_NONDISTRO=1 +else +# Explicitely disable for Linux < v6.4 +PERF_MAKE_FLAGS += NO_DEMANGLE=1 NO_LIBBFD=1 +endif else PERF_MAKE_FLAGS += NO_DEMANGLE=1 endif