From d5f7e00c7aa2391241c471e0a493016fc697ea29 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Mon, 21 Apr 2025 12:55:30 +0000 Subject: [PATCH] Don't check for RELRO on MorphOS It's not supported, but accepted by the toolchain, which will just issue a warning. FossilOrigin-Name: 0f70ee1915bb453293eeed9c511ca6ddd72271782b1a562c8138a56e1ba01ed9 --- build-aux/m4/buildsys.m4 | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/build-aux/m4/buildsys.m4 b/build-aux/m4/buildsys.m4 index aa0b344..93f0522 100644 --- a/build-aux/m4/buildsys.m4 +++ b/build-aux/m4/buildsys.m4 @@ -323,23 +323,29 @@ AC_DEFUN([BUILDSYS_RELRO], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_MSG_CHECKING(for RELRO support) - old_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" - - AC_LINK_IFELSE([ - AC_LANG_PROGRAM([ - #include - ], [ - puts("RELRO test"); - ]) - ], [ - AC_MSG_RESULT(yes) - AC_SUBST(RELRO_LDFLAGS, [-Wl,-z,relro,-z,now]) - ], [ + case "$host_os" in + morphos*) AC_MSG_RESULT(no) - ]) + ;; + *) + old_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -Wl,-z,relro,-z,now" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([ + #include + ], [ + puts("RELRO test"); + ]) + ], [ + AC_MSG_RESULT(yes) + AC_SUBST(RELRO_LDFLAGS, [-Wl,-z,relro,-z,now]) + ], [ + AC_MSG_RESULT(no) + ]) - LDFLAGS="$old_LDFLAGS" + LDFLAGS="$old_LDFLAGS" + ;; + esac ]) AC_DEFUN([BUILDSYS_SHARED_LIB], [