From patchwork Sun Aug 13 07:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waldemar Brodkorb X-Patchwork-Id: 1820666 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::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RNpsS4Kjjz1yfg for ; Sun, 13 Aug 2023 17:23:07 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7BB5581C58; Sun, 13 Aug 2023 07:23:02 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7BB5581C58 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 ZTTJhqrKjlXn; Sun, 13 Aug 2023 07:23:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id B5B9581911; Sun, 13 Aug 2023 07:23:00 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B5B9581911 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 7E0301BF470 for ; Sun, 13 Aug 2023 07:22:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 243F74040D for ; Sun, 13 Aug 2023 07:22:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 243F74040D 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 c67qvHUGahvC for ; Sun, 13 Aug 2023 07:22:57 +0000 (UTC) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) by smtp2.osuosl.org (Postfix) with ESMTPS id 5391B40004 for ; Sun, 13 Aug 2023 07:22:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 5391B40004 Received: by helium.openadk.org (Postfix, from userid 1000) id 96754352BD3A; Sun, 13 Aug 2023 09:22:52 +0200 (CEST) Date: Sun, 13 Aug 2023 09:22:51 +0200 From: Waldemar Brodkorb To: buildroot@buildroot.org Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: Linux 5.10.0-21-amd64 x86_64 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openadk.org; s=2022; t=1691911372; bh=JLWAf7ACbqyOr2ggSbizQI5GYOJyluSgmB0eWTI/BM4=; h=Date:From:To:Cc:Subject:From; b=v5bmIiyaZSMHY36SkhonANj538kVuFlfvOE0J8C1Dc/XNe37KKaCGyxI9i25lDa46 1DFEnzfmzYflQmj3QcQ2NukRvqkCaY+NS6vbpmy6JqTwPscjzQw0gV/jBN7oM6105M BmVUi0qoyK05LpLA7rwJGiJgX7RSz0ljLqQZosTH96KIB/J6DRZhhMjNV97RKXyBfa Ly9aW00frnWo3GyM3kDF9/KhuOXK9h9abGwnk0BNtmghQaa8mragO/qREJHJtx6y0S RrJkUVUYw7Yzcm3e2J8RPjbbxp8QkPwZdppkWeLpbkPtkCAXb9Y/AzbcYpR7KXj8LC YAKNKX6/AdZZw== Subject: [Buildroot] [PATCH 1/2] package/uclibc: add hwcap header for arm 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: Eugene Tarassov , Norbert Lange Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" This is used by package tcf-agent when getauxval is used. Signed-off-by: Waldemar Brodkorb --- .../0003-arm-add-hwcap-header-file.patch | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 package/uclibc/0003-arm-add-hwcap-header-file.patch diff --git a/package/uclibc/0003-arm-add-hwcap-header-file.patch b/package/uclibc/0003-arm-add-hwcap-header-file.patch new file mode 100644 index 0000000000..9a74d79c8e --- /dev/null +++ b/package/uclibc/0003-arm-add-hwcap-header-file.patch @@ -0,0 +1,71 @@ +From 3d781a52bae133907ba61bfbe987604f8cb00373 Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sat, 12 Aug 2023 19:48:40 +0200 +Subject: [PATCH] arm: add hwcap header file + +Signed-off-by: Waldemar Brodkorb +Upstream: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3d781a52bae133907ba61bfbe987604f8cb00373 +--- + libc/sysdeps/linux/arm/bits/hwcap.h | 50 +++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + create mode 100644 libc/sysdeps/linux/arm/bits/hwcap.h + +diff --git a/libc/sysdeps/linux/arm/bits/hwcap.h b/libc/sysdeps/linux/arm/bits/hwcap.h +new file mode 100644 +index 000000000..0a741b469 +--- /dev/null ++++ b/libc/sysdeps/linux/arm/bits/hwcap.h +@@ -0,0 +1,50 @@ ++/* Defines for bits in AT_HWCAP. ARM Linux version. ++ Copyright (C) 2012-2023 Free Software Foundation, Inc. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++#if !defined (_SYS_AUXV_H) && !defined (_LINUX_ARM_SYSDEP_H) ++# error "Never include directly; use instead." ++#endif ++ ++/* The following must match the kernel's . */ ++#define HWCAP_ARM_SWP 1 ++#define HWCAP_ARM_HALF 2 ++#define HWCAP_ARM_THUMB 4 ++#define HWCAP_ARM_26BIT 8 ++#define HWCAP_ARM_FAST_MULT 16 ++#define HWCAP_ARM_FPA 32 ++#define HWCAP_ARM_VFP 64 ++#define HWCAP_ARM_EDSP 128 ++#define HWCAP_ARM_JAVA 256 ++#define HWCAP_ARM_IWMMXT 512 ++#define HWCAP_ARM_CRUNCH 1024 ++#define HWCAP_ARM_THUMBEE 2048 ++#define HWCAP_ARM_NEON 4096 ++#define HWCAP_ARM_VFPv3 8192 ++#define HWCAP_ARM_VFPv3D16 16384 ++#define HWCAP_ARM_TLS 32768 ++#define HWCAP_ARM_VFPv4 65536 ++#define HWCAP_ARM_IDIVA 131072 ++#define HWCAP_ARM_IDIVT 262144 ++#define HWCAP_ARM_VFPD32 524288 ++#define HWCAP_ARM_LPAE 1048576 ++#define HWCAP_ARM_EVTSTRM 2097152 ++#define HWCAP_FPHP 4194304 ++#define HWCAP_ASIMDHP 8388608 ++#define HWCAP_ASIMDDP 16777216 ++#define HWCAP_ASIMDFHM 33554432 ++#define HWCAP_ASIMDBF16 67108864 ++#define HWCAP_I8MM 134217728 +-- +2.30.2 + From patchwork Sun Aug 13 07:23:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Waldemar Brodkorb X-Patchwork-Id: 1820667 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.138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RNptL1j6Xz1yfg for ; Sun, 13 Aug 2023 17:23:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CCEA6813F5; Sun, 13 Aug 2023 07:23:51 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org CCEA6813F5 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 bH0HqW96jkTf; Sun, 13 Aug 2023 07:23:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 1A36D813C6; Sun, 13 Aug 2023 07:23:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1A36D813C6 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 26D711BF470 for ; Sun, 13 Aug 2023 07:23:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E717A60B1B for ; Sun, 13 Aug 2023 07:23:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E717A60B1B 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 UkSXYDso4gVT for ; Sun, 13 Aug 2023 07:23:47 +0000 (UTC) Received: from helium.openadk.org (helium.openadk.org [89.238.66.15]) by smtp3.osuosl.org (Postfix) with ESMTPS id E3D0260808 for ; Sun, 13 Aug 2023 07:23:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org E3D0260808 Received: by helium.openadk.org (Postfix, from userid 1000) id CF292352BD3A; Sun, 13 Aug 2023 09:23:44 +0200 (CEST) Date: Sun, 13 Aug 2023 09:23:44 +0200 From: Waldemar Brodkorb To: buildroot@buildroot.org Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Operating-System: Linux 5.10.0-21-amd64 x86_64 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=openadk.org; s=2022; t=1691911424; bh=B7A9iAQxHwL+ZfAPfXf5XsfskB84T+LEBmCVT4TKZEM=; h=Date:From:To:Cc:Subject:From; b=GnJeJ2MsAt6p2tEFYHL5Px1hJF/q+OK1ee3f/Kg9iZMoEIcyW/7r/9K/Tm0pjLtL+ 0kpjJ+oRMv8SxsS5L6LBpWjaG2l6YbCd9kRo755tH2uVLpdA9cYNCz1mm2M3XfEEnm GWmDrkwVJ9lA8fMLQe1rt2A8sO93fDEewxgUE+8p+tCfABLMxhCTkJq+ilP3En5t33 Kd4s2KVXMI/EJpYu+KhUXKXYB55MXkHh05R0vWX2Oopzbr83GclMSx9DiRTehm6g5Z gJCqIRiPVhDHMQd9RJ5dskJnLrpbzgcxx6ep+JywrVqi7AOg2cTvT21tHl37Qf3t+d RnTksUjMXniJA== Subject: [Buildroot] [PATCH 2/2] package/tcf-agent: fix uClibc-ng compile on ARM 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: Eugene Tarassov , Norbert Lange Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" When a shared build is used, we can use getauxval and no ARM only instuctions are in use. When a static build is used, we need to override, as uClibc-ng only supports getauxval for shared case. Fixes: - http://autobuild.buildroot.net/results/3b5/3b5c5519a3e5ee490308bc1a1b9579ce13417235 Signed-off-by: Waldemar Brodkorb --- .../0001-fix-uClibc-ng-compile.patch | 27 +++++++++++++++++++ package/tcf-agent/tcf-agent.mk | 6 +++++ 2 files changed, 33 insertions(+) create mode 100644 package/tcf-agent/0001-fix-uClibc-ng-compile.patch diff --git a/package/tcf-agent/0001-fix-uClibc-ng-compile.patch b/package/tcf-agent/0001-fix-uClibc-ng-compile.patch new file mode 100644 index 0000000000..b8f46f3c48 --- /dev/null +++ b/package/tcf-agent/0001-fix-uClibc-ng-compile.patch @@ -0,0 +1,27 @@ +From a78007cd139e1dea3d893f5fe1d1c3a47503e6a2 Mon Sep 17 00:00:00 2001 +From: Waldemar Brodkorb +Date: Sat, 12 Aug 2023 18:27:02 +0200 +Subject: [PATCH] fix uClibc-ng compile + +Signed-off-by: Waldemar Brodkorb +Upstream: N/A only mail available +--- + agent/machine/arm/tcf/cpudefs-mdep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/agent/machine/arm/tcf/cpudefs-mdep.c b/agent/machine/arm/tcf/cpudefs-mdep.c +index 051631a0..7c4fbf3e 100644 +--- a/agent/machine/arm/tcf/cpudefs-mdep.c ++++ b/agent/machine/arm/tcf/cpudefs-mdep.c +@@ -21,7 +21,7 @@ + + #ifndef USE_getauxval + # include +-# define USE_getauxval (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16))) ++# define USE_getauxval (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) || (defined(__UCLIBC__) && defined(__HAVE_SHARED__))) + #endif + + #include +-- +2.39.2 + diff --git a/package/tcf-agent/tcf-agent.mk b/package/tcf-agent/tcf-agent.mk index 2b8a61b66f..7859d0ed43 100644 --- a/package/tcf-agent/tcf-agent.mk +++ b/package/tcf-agent/tcf-agent.mk @@ -21,6 +21,12 @@ TCF_AGENT_CONF_OPTS = \ -DBUILD_SHARED_LIBS=OFF \ -DTCF_MACHINE=$(call qstrip,$(BR2_PACKAGE_TCF_AGENT_ARCH)) +ifeq ($(BR2_STATIC_LIBS),y) +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +TCF_AGENT_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -marm" +endif +endif + define TCF_AGENT_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 644 package/tcf-agent/tcf-agent.service \ $(TARGET_DIR)/usr/lib/systemd/system/tcf-agent.service