[Pkg-openssl-devel] Bug#1015792: openssl: Explicitly use libatomic on ARC/NIOS2/SPARC
Alexey Brodkin
Alexey.Brodkin at synopsys.com
Thu Jul 21 11:25:51 BST 2022
Package: openssl
Version: 1.1.1f-1ubuntu2.12
Severity: normal
Tags: patch
Dear Maintainer,
openssl fails to build on 32-bit architectures such as ARC, NIOS2 & SPARC
due to the fact that 64-bit atomisc are not natively supported.
Though with use of libatomic that problem gets solved, see
upsream openssl discussion here https://github.com/openssl/openssl/pull/15640.
And solution is as simple as the patch below:
------------------------>8------------------------
--- a/debian/patches/debian-targets.patch
+++ b/debian/patches/debian-targets.patch
@@ -29,7 +29,7 @@ index 000000000000..9688af8f1447
+ cflags => add("-mcpu=ev5"),
+ },
+ "debian-arc" => {
-+ inherit_from => [ "linux-generic32", "debian" ],
++ inherit_from => [ "linux-latomic", "debian" ],
+ },
+ "debian-arm64" => {
+ inherit_from => [ "linux-aarch64", "debian" ],
@@ -172,7 +172,7 @@ index 000000000000..9688af8f1447
+ },
+
+ "debian-nios2" => {
-+ inherit_from => [ "linux-generic32", "debian" ],
++ inherit_from => [ "linux-latomic", "debian" ],
+ },
+ "debian-powerpc" => {
+ inherit_from => [ "linux-ppc", "debian" ],
@@ -214,7 +214,7 @@ index 000000000000..9688af8f1447
+ inherit_from => [ "linux-latomic", "debian" ],
+ },
+ "debian-sparc" => {
-+ inherit_from => [ "linux-generic32", "debian", ],
++ inherit_from => [ "linux-latomic", "debian", ],
+ asm_arch => 'sparcv9',
+ cflags => add("-DB_ENDIAN -DBN_DIV2W"),
+ },
------------------------>8------------------------
That's because "linux-latomic" bascally extends "linux-generic32"
with addition of "-latomic" flag for the linker.
And for the record, "linux-latomic" is already used for the rest
of 32-bit architectures. So nothing new here.
-- System Information:
Debian Release: bullseye/sid
APT prefers focal-updates
APT policy: (500, 'focal-updates'), (500, 'focal-security'), (500, 'focal-proposed'), (500, 'focal'), (100, 'focal-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.10.74.3-microsoft-standard-WSL2+ (SMP w/12 CPU cores)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Versions of packages openssl depends on:
ii libc6 2.31-0ubuntu9.7
ii libssl1.1 1.1.1f-1ubuntu2.12
openssl recommends no packages.
Versions of packages openssl suggests:
ii ca-certificates 20210119~20.04.2
-- no debconf information
More information about the Pkg-openssl-devel
mailing list