pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
openssl: "architecture lacks an FPU" on Debian 12/armv7
Hi all,
On my Raspberry 2B (armv7) running Debian 12, or rather Raspberry Pi OS,
I set up pkgsrc and tried to build a package. However security/openssl
failed with this compile error:
cc1: error: '-mfloat-abi=hard': selected architecture lacks an FPU
It turns out having to with openssl's configure adding -march=armv7-a
which is easy to reproduce in isolation:
$ cc hello.c
$ cc hello.c -march=armv7-a
cc1: error: ‘-mfloat-abi=hard’: selected architecture lacks an FPU
As far as I'm aware this only happens with Debian 12. I'm not sure why.
There's an upstream ticket[1] suggesting explicitly selecting the armv4
target. This seems like a downgrade from armv4 but in fact the
automatically selected target is armv4 anyway except with the
problematic -march added.
In security/openssl/Makefile the change is to add:
OPENSSL_HOST.Linux-armv7l= linux-armv4
Is this a suitable solution? In that case I can commit. Full patch
attached below.
1: https://github.com/openssl/openssl/issues/21630
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/security/openssl/Makefile,v
retrieving revision 1.301
diff -u -u -r1.301 Makefile
--- Makefile 5 Jun 2024 07:47:33 -0000 1.301
+++ Makefile 12 Jul 2024 18:31:25 -0000
@@ -110,6 +110,7 @@
OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc
.endif
OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc
+# Prevent configure adding breaking -march=armv7-a:
+# https://github.com/openssl/openssl/issues/21630
+OPENSSL_HOST.Linux-armv7l= linux-armv4
# Ensure consistent socket interfaces are used across the codebase.
CPPFLAGS.SunOS+= -D_XOPEN_SOURCE=600 -D__EXTENSIONS__
Home |
Main Index |
Thread Index |
Old Index