Skip to content
Snippets Groups Projects
Commit 3f9438b3 authored by mio's avatar mio Committed by Natanael Copa
Browse files

community/openpgm: fix build with 32-bit mmx

Fix -Wimplicit-function-declaration error due to undefined
`_mm_cvtm64_si64` function.

```
checksum.c: In function 'do_csumcpy_mmx':
checksum.c:952:34: error: implicit declaration of function
'_mm_cvtm64_si64'; did you mean '_mm_cvtsi64_si32'?
[-Wimplicit-function-declaration]
  952 |                 *(int64_t*)dst = _mm_cvtm64_si64 (tmp);
      |                                  ^~~~~~~~~~~~~~~
      |                                  _mm_cvtsi64_si32
```
parent b77203dc
No related branches found
No related tags found
1 merge request!74436community/openpgm: fix build with 32-bit mmx
Pipeline #274637 skipped
Source: https://github.com/steve-o/openpgm/pull/67.patch
The paths were adjusted to the build directory path.
--
From b7fa865fa6b06d97d424c500fd1c4bc44c096359 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 1 Nov 2020 22:46:18 +0100
Subject: [PATCH] openpgm/pgm/checksum.c: fix build with 32 bits MMX
Build with i386-pentium-mmx or i686 is broken since version 5-3-128 and
https://github.com/steve-o/openpgm/commit/b276dc15be5d4e6e1143b9de25d09f63f9c85135
because _mm_cvtm64_si64 is undefined resulting in the following build
failure for example on zeromq:
/srv/storage/autobuild/run/instance-3/output-1/host/opt/ext-toolchain/bin/../lib/gcc/i586-buildroot-linux-musl/8.3.0/../../../../i586-buildroot-linux-musl/bin/ld: /srv/storage/autobuild/run/instance-3/output-1/host/i586-buildroot-linux-musl/sysroot/usr/lib32/libpgm-5.3.so.0: undefined reference to `_mm_cvtm64_si64'
So use the fallback if __x86_64__ is not defined
Fixes:
- http://autobuild.buildroot.org/results/01d9be37e8a743307128f53f41785654c9971e1a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
openpgm/pgm/checksum.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/openpgm/pgm/checksum.c b/openpgm/pgm/checksum.c
index fef89bce2..8d8dd3f32 100644
--- a/checksum.c
+++ b/checksum.c
@@ -948,7 +948,7 @@ do_csumcpy_mmx (
sum = _mm_add_pi32 (sum, lo);
sum = _mm_add_pi32 (sum, hi);
-#if 1
+#if defined(__x86_64__)
*(int64_t*)dst = _mm_cvtm64_si64 (tmp);
#else
((int*)dst)[1] = _mm_cvtsi64_si32 (tmp);
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi> # Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=openpgm pkgname=openpgm
pkgver=5.3.128 pkgver=5.3.128
pkgrel=0 pkgrel=1
pkgdesc="Implementation of the PGM reliable multicast protocol" pkgdesc="Implementation of the PGM reliable multicast protocol"
url="https://www.freshports.org/net/openpgm/" url="https://www.freshports.org/net/openpgm/"
arch="all" arch="all"
...@@ -15,7 +15,9 @@ makedepends=" ...@@ -15,7 +15,9 @@ makedepends="
python3 python3
" "
subpackages="$pkgname-dev" subpackages="$pkgname-dev"
source="https://github.com/steve-o/openpgm/archive/refs/tags/release-${pkgver//./-}.tar.gz" source="https://github.com/steve-o/openpgm/archive/refs/tags/release-${pkgver//./-}.tar.gz
32-bits-mmx.patch
"
builddir="$srcdir/openpgm-release-${pkgver//./-}/openpgm/pgm" builddir="$srcdir/openpgm-release-${pkgver//./-}/openpgm/pgm"
options="!check" # no tests options="!check" # no tests
...@@ -41,4 +43,5 @@ package() { ...@@ -41,4 +43,5 @@ package() {
sha512sums=" sha512sums="
ad1148cb01d982be48ca35c027938e60fc86f2da3de14e994c3d390a6c5b13385893f2bd87d23c2d6cbd9015770ff72ef6fb1090b6ccf3bfd0812189e67fd3bd release-5-3-128.tar.gz ad1148cb01d982be48ca35c027938e60fc86f2da3de14e994c3d390a6c5b13385893f2bd87d23c2d6cbd9015770ff72ef6fb1090b6ccf3bfd0812189e67fd3bd release-5-3-128.tar.gz
e28ef5cbea52209f0405fa50d479ed2c8cf7cc1fcd82d4aa44fa8857b6af91c7f352d7afefee216de7a5ce23af6ed190072c9f29b686021b61396bdcb86ac50d 32-bits-mmx.patch
" "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment