All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rtty: fix openssl static build with -latomic
@ 2023-02-26 19:53 Fabrice Fontaine
  2023-02-27 16:04 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2023-02-26 19:53 UTC (permalink / raw)
  To: buildroot; +Cc: Jianhui Zhao, Fabrice Fontaine

Fix the following openssl static build failure with -latomic raised
since bump to version 8.1.0 in commit
7e608885a2df51ba77378f210f4c0e8cb59d5b8b:

/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-8/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o): in function `ssl_cert_free':
ssl_cert.c:(.text+0x53c): undefined reference to `__atomic_fetch_sub_4'

Fixes:
 - http://autobuild.buildroot.org/results/f606bb15bf4f88ba29ef0795413e13acc9cd0976

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...keLists.txt-prefer-pkg_check_modules.patch | 40 +++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 package/rtty/0001-CMakeLists.txt-prefer-pkg_check_modules.patch

diff --git a/package/rtty/0001-CMakeLists.txt-prefer-pkg_check_modules.patch b/package/rtty/0001-CMakeLists.txt-prefer-pkg_check_modules.patch
new file mode 100644
index 0000000000..3714050445
--- /dev/null
+++ b/package/rtty/0001-CMakeLists.txt-prefer-pkg_check_modules.patch
@@ -0,0 +1,40 @@
+From 565c003ac412c9b0fa39d208d4a911f4300477c3 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 26 Feb 2023 20:39:11 +0100
+Subject: [PATCH] CMakeLists.txt: prefer pkg_check_modules
+
+Prefer pkg_check_modules over find_package to avoid the following static
+build failure with openssl and -latomic:
+
+/home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: /home/autobuild/autobuild/instance-8/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o): in function `ssl_cert_free':
+ssl_cert.c:(.text+0x53c): undefined reference to `__atomic_fetch_sub_4'
+
+Fixes:
+ - http://autobuild.buildroot.org/results/f606bb15bf4f88ba29ef0795413e13acc9cd0976
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/zhaojh329/ssl/pull/4]
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/ssl/CMakeLists.txt b/src/ssl/CMakeLists.txt
+index 4868bf7..36488c7 100644
+--- a/src/ssl/CMakeLists.txt
++++ b/src/ssl/CMakeLists.txt
+@@ -14,10 +14,10 @@ endif()
+ 
+ find_package(PkgConfig QUIET)
+ 
+-find_package(OpenSSL)
++pkg_check_modules(OPENSSL openssl)
+ 
+ if (NOT OPENSSL_FOUND)
+-    pkg_check_modules(OPENSSL openssl)
++    find_package(OpenSSL)
+ endif()
+ 
+ find_package(WolfSSL)
+-- 
+2.39.1
+
-- 
2.39.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/rtty: fix openssl static build with -latomic
  2023-02-26 19:53 [Buildroot] [PATCH 1/1] package/rtty: fix openssl static build with -latomic Fabrice Fontaine
@ 2023-02-27 16:04 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2023-02-27 16:04 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Jianhui Zhao, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following openssl static build failure with -latomic raised
 > since bump to version 8.1.0 in commit
 > 7e608885a2df51ba77378f210f4c0e8cb59d5b8b:

 > /home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/sparc-buildroot-linux-uclibc/10.4.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
 > /home/autobuild/autobuild/instance-8/output-1/host/sparc-buildroot-linux-uclibc/sysroot/usr/lib/libssl.a(ssl_cert.o):
 > in function `ssl_cert_free':
 > ssl_cert.c:(.text+0x53c): undefined reference to `__atomic_fetch_sub_4'

 > Fixes:
 >  - http://autobuild.buildroot.org/results/f606bb15bf4f88ba29ef0795413e13acc9cd0976

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-27 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-26 19:53 [Buildroot] [PATCH 1/1] package/rtty: fix openssl static build with -latomic Fabrice Fontaine
2023-02-27 16:04 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.