From 2f680db530996204949edcf3f14c3c7569c1a21f Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 2 Nov 2024 13:43:17 +0100 Subject: [PATCH 1/2] Assume unknown operating systems use ELF. There's a lot of new Unix-like operating systems out that that might port LibreSSL (my Sortix is among them) and they all use ELF. If the operating system doesn't use ELF or isn't an Unix, it doesn't have a chance at working out of this box anyway, and this change makes LibreSSL work on a generic and sufficiently featured POSIX system. --- configure.ac | 4 ---- m4/check-os-options.m4 | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 87a80cc02d..51e096bd90 100644 --- a/configure.ac +++ b/configure.ac @@ -32,10 +32,6 @@ LT_INIT([pic-only]) CHECK_OS_OPTIONS -if test "$HOST_OS" = "unsupported"; then - AC_MSG_ERROR([unsupported platform: $host_os]) -fi - CHECK_C_HARDENING_OPTIONS DISABLE_AS_EXECUTABLE_STACK diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 91c30214cb..1f0b7e4730 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 @@ -132,7 +132,8 @@ char buf[1]; getentropy(buf, 1); AC_SUBST([PLATFORM_LDADD], ['-ldl -lmd -lnsl -lsocket']) ;; *) - HOST_OS=unsupported + HOST_OS=$host_os + HOST_ABI=elf ;; esac From 4db5917a6d51dfa71d446e1de5e51a5ca089a109 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Sat, 2 Nov 2024 14:13:17 +0100 Subject: [PATCH 2/2] Warn on unsupported operating systems --- configure.ac | 4 ++++ m4/check-os-options.m4 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 51e096bd90..864a4ad8fc 100644 --- a/configure.ac +++ b/configure.ac @@ -159,3 +159,7 @@ AM_CONDITIONAL([ENABLE_LIBTLS_ONLY], [test "x$enable_libtls_only" = xyes]) AC_REQUIRE_AUX_FILE([tap-driver.sh]) AC_OUTPUT + +if test "$HOST_OS" = "unsupported"; then + AC_MSG_WARN([unsupported platform: $host_os]) +fi diff --git a/m4/check-os-options.m4 b/m4/check-os-options.m4 index 1f0b7e4730..2ef42937fa 100644 --- a/m4/check-os-options.m4 +++ b/m4/check-os-options.m4 @@ -132,7 +132,7 @@ char buf[1]; getentropy(buf, 1); AC_SUBST([PLATFORM_LDADD], ['-ldl -lmd -lnsl -lsocket']) ;; *) - HOST_OS=$host_os + HOST_OS=unsupported HOST_ABI=elf ;; esac