From patchwork Thu Jul 11 17:51:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3205 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8DA693F15B for ; Thu, 11 Jul 2024 19:51:19 +0200 (CEST) Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a77f48f2118sf163718966b.1 for ; Thu, 11 Jul 2024 10:51:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720720279; cv=pass; d=google.com; s=arc-20160816; b=HDt5MK6R1ffuT0rNxw8rqtCNBfoGQRJIA42TzEoaOhv3UQgR3gJFW7BVDgs1BU5Kof UOGEk3s1MfFVfPTQ1WqfIXHn6SJJ3FW0jkahAP3j+LDDpH7JgHGiOZTcVkfOel7YdlwS jpb0Pji2vHvYxtKbJz41Uzi/6+LbvVMSDjLNiO3cMt8ie6eWEx33EQ1jTm5GFldW5WBz p1cT06vjcZLYKc2vMRFRiwaM7+3ENvJqkLBnxsgbbhzxIH8eXRF647sEEGcttV4TNh6t Um/+1TgOSRp90KuOcTRIfE9PTJmnNCGaoCooONo5IDVUSHgAzFGAKpJPjTU9PYPvR/ti Q/JA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eFQVWhtSeTxyCR2H+pmGKL+nD5zV6j6WOumkNIpfXos=; fh=MujxyrSEAlKyEZvehxu+JH68uatvX/S8X4Toae51A6E=; b=wPJPStdINFbNcH8tWtW5RC11s0FtD4PWFdU3WE8w6oXFR0iCsukYbin0rvJTZ1pJVa xqG/oM1AMn+xSdbqSoEBoFqzBeK7yWBPz2D040Wsfb4GfyZ2Kf+OzGjidQWYlm6D2RY6 xrmZKv9obTiRQcvyjFocqgAMt8oFoI6vn09II2wl4dcR0ss5tSjfZih44TJpjMhK4MFV nD/oJUQZbnVfUvESWAA55lXthHB0aCETuMQpQPBxZPc9XYb4qsz5iw+Rh+B0mACD/31Q 52rtxsMyeDyJsWuEAdi41NbGjlaDyOm7XpRvkq/SLYZZgfthJ5XjryXX2NwtH28yS7iH vTGg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=djqyu98L; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1720720279; x=1721325079; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=eFQVWhtSeTxyCR2H+pmGKL+nD5zV6j6WOumkNIpfXos=; b=jb3cGed3d8uPN5JC8Uvr5AsV0jr2NBiIR9/+6fvXMDOMBfeF2pRH0Ote5g/moeGW7m o51nsarSzyiRr6Qp9S88k64GoM4SXctFCa1kZ67kQPJzrltODUS8lrIooWghm4UguA42 vhhQaCDzzy8BQHlXecBrktX9XlK1UqQKgPrsA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720720279; x=1721325079; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eFQVWhtSeTxyCR2H+pmGKL+nD5zV6j6WOumkNIpfXos=; b=pTdV+WtHZkxfw2OYxiYarivXYgKTw/iJgoK41sxyK4BukLam/bR9kWWtXKaCosUxbY 6cbVMfOtTewi8QyPw+C2B+Fzte7nvqkzl/gwKbT4DePEWgGE28x4DreyBnGOtc9xED7r hbY+bpaEjwJj6Y87G5CTJ9JcV1Ph6CfoxtX2qkXZzIC8CFr8vc2wMDw4Y33JLbC5BaV5 DLq8tcEOxrSzeDRSJcOokaQR2Odnuy1OID40lZ2Ta7IgowTXxf/qCFaxrfMiM9z1N+KK udC0sDyaxzlecO24KgrUqleoJUwI6ydJ2g0/mxgNCA1EaXBLng+xIorKD30dB11v7FM0 pMsw== X-Forwarded-Encrypted: i=2; AJvYcCVi0KQjTMRovvl1YLb0iX0bgyqGwsUZhFNvz+JIaPj0ExcAQWhdgdf7EPCe7AlMVulL/qQOKuJVdP4PiRGizbTk/H+mlmxaMqgixeQz5lmSzml6lWjmKHKkutNPXA== X-Gm-Message-State: AOJu0YwQwZJVomX3JL/0MemkiqPfSLJxEwZMrpyk4DQQQxmA+dY4GxOh jnnlSUtQ0foOsoAow8m8rj/kqrczGmyhq6VoD+y5WsMkkdoccB7+tIv3D7VVoEIGgQ== X-Google-Smtp-Source: AGHT+IGQ70SHnJOocrln69gqe3fafKIbKTBy7UHW0K9oYsx8ad5ZIYADqqF0QDslJ3+2PpsF+4u00g== X-Received: by 2002:a17:906:5ad4:b0:a77:e031:bb86 with SMTP id a640c23a62f3a-a799cc278abmr26021866b.7.1720720278982; Thu, 11 Jul 2024 10:51:18 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:aa7:c84e:0:b0:583:9e8e:cd8c with SMTP id 4fb4d7f45d1cf-59826224658ls440235a12.1.-pod-prod-00-eu; Thu, 11 Jul 2024 10:51:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWgV+xdgOdG8cr5hjNUoY7eivRKOzoCwI2B8ESJ4rD2nelY3UG1yE5x9GiXV/U/GV4c3VI3OYka/QtfW8LE+GtCLue8Xcy0jNGmnesV6klMu2Bz X-Received: by 2002:a17:907:7d90:b0:a77:e152:a8e with SMTP id a640c23a62f3a-a799cd00609mr30035566b.26.1720720277476; Thu, 11 Jul 2024 10:51:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720720277; cv=none; d=google.com; s=arc-20160816; b=QwBAqDCMfmQ3jrb7uyeCulIqYksvHGSnqpAYbNHwL7eyRNmYuFIzyMnWCt7/Y+ziap wNBOaHIGGKqF9GU74JjyMXnLga+oxcuArQPA5FapPhnOCsfPWL4uZ7wcgmdc6sMVE7oz OxGdoBc6SqiKE/pm0QrusZM5WT24S+oYTNhsj91udSC1FgEXTliU4VH3MHTcYjs0XCWE NZrX91C/uxdKSfJCNyfazlmZ6VU0lRujIpeuMuu8rU0LNpqfCIFpDX/rBgVkylecM/tk DFp6hxYaBMHdClM3HmRZcLu2pXw9RzIbVRW2uba1mjVEXRB2GWT71bkV7b3fgdyCQZQ6 d2WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=JguE6JIRJemMD62fSbpQG2qsUI3x7O3V7PolR0byLg8=; fh=BP/dcKLltFzaudW23bYRprGixyumrcvydYsHskXVNfQ=; b=IRI5PuE3XUnEYpiRWTgESnYDsYCrxHRLyCu5SH+RGnWIicsDPCDyoJkU8l3HM6p51H 6mIeH7+zhOsBbsWryACXtcHvFzNCvP+TX+4fgoXxr3MscdXdgYYpd5ISRmgOZS0ydv+j ePBbGf8J5Y9mUXDGzX2DE4VyJPKRkx4SBYxBF6n8Kpz7zGq9KNfzAQLZwPkT7J5UfvKQ DNfvqeEthI2cKbnECyffTwyuXgnSUpK+u6XsRIt92U936X5r7O1TFgYi+tSHxm1N8KB1 0IbsdF1FLVMQoy9E9WwcPTW5+kIqLbf7xbsfXXlrSzeq08eD3wWCs41KtCRVx6Rlw9Fe qa5w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=djqyu98L; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a77e4e750e1sor453411966b.7.2024.07.11.10.51.17 for (Google Transport Security); Thu, 11 Jul 2024 10:51:17 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCUyRTlj9iMUFRh9WlkwYu40YmmMqRyewujOJN9h5mITlnsdPRhq0Kx1SMRJV1njY/CvPgtqtIZIMDFj3C271ZLJszNpNYyN8algd+10JlhmLj5a X-Received: by 2002:a17:907:97cf:b0:a77:e420:9e5d with SMTP id a640c23a62f3a-a799d3a44e5mr22821366b.34.1720720277035; Thu, 11 Jul 2024 10:51:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.40.36]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a780a6e0633sm269905066b.81.2024.07.11.10.51.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jul 2024 10:51:16 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: "Yann E . MORIN" , linux-amarula@amarulasolutions.com, Thomas Petazzoni , Dario Binacchi Subject: [PATCH v2 1/2] package/snappy: fix compilation error raised by vqtbl1q_u8 instruction Date: Thu, 11 Jul 2024 19:51:03 +0200 Message-ID: <20240711175104.2989194-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=djqyu98L; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The package compilation for the raspberrypi3_qt5we_defconfig raises the following error: In file included from buildroot/output/build/snappy-1.1.10/snappy.cc:29: buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’: buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’? 109 | return vqtbl1q_u8(input, shuffle_mask); | ^~~~~~~~~~ | vtbl1_u8 make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1 The issue was raised by commit b3fb0b5b4b076 ("Enable vector byte shuffle optimizations on ARM NEON") contained in version 1.1.10. Signed-off-by: Dario Binacchi --- Changes v1 -> v2: - Swap position with the other patch. So first apply the fixing compilation error patch and then bump to version 1.2.1. ...error-raised-by-vqtbl1q_u8-instructi.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch diff --git a/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch new file mode 100644 index 000000000000..b10ea7ecdfbe --- /dev/null +++ b/package/snappy/0001-Fix-compilation-error-raised-by-vqtbl1q_u8-instructi.patch @@ -0,0 +1,52 @@ +From 284d5a6f267d4962b2b88540f218c10740a6c053 Mon Sep 17 00:00:00 2001 +From: Dario Binacchi +Date: Sat, 8 Jun 2024 18:42:16 +0200 +Subject: [PATCH] Fix compilation error raised by vqtbl1q_u8 instruction +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The compilation in Buildroot for the raspberrypi3_qt5we_defconfig +configuration: + +make raspberrypi3_qt5we_defconfig +make + +raises the following error: + +In file included from buildroot/output/build/snappy-1.2.1/snappy.cc:29: +buildroot/output/build/snappy-1.2.1/snappy-internal.h: In function ‘snappy::internal::V128 snappy::internal::V128_Shuffle(V128, V128)’: +buildroot/output/build/snappy-1.2.1/snappy-internal.h:109:10: error: ‘vqtbl1q_u8’ was not declared in this scope; did you mean ‘vtbl1_u8’? + 109 | return vqtbl1q_u8(input, shuffle_mask); + | ^~~~~~~~~~ + | vtbl1_u8 +make[4]: *** [CMakeFiles/snappy.dir/build.make:118: CMakeFiles/snappy.dir/snappy.cc.o] Error 1 + +As reported by [1], the vqtbl1q_u8 instruction is supported by A64 +architectures. For this reason, the patch enables the use of the +instruction only for NEON of such architecture. + +[1] https://developer.arm.com/architectures/instruction-sets/intrinsics/vqtbl1q_u8 + +Signed-off-by: Dario Binacchi +Upstream: https://github.com/google/snappy/pull/185 +--- + snappy-internal.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/snappy-internal.h b/snappy-internal.h +index ae78247dbbc9..256d32344d1a 100644 +--- a/snappy-internal.h ++++ b/snappy-internal.h +@@ -46,7 +46,7 @@ + #include + #endif + +-#if SNAPPY_HAVE_SSSE3 || SNAPPY_HAVE_NEON ++#if SNAPPY_HAVE_SSSE3 || (SNAPPY_HAVE_NEON && defined(__aarch64__)) + #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 1 + #else + #define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 0 +-- +2.43.0 +