The attached patch has been tested in the past few months on Debian's
CrossQA infrastructure [1] with various cross-build scenarios.  As
sparc64 is not an official architecture and therefore does not have
crossqa autobuilders, I have verified it myself by cross-building the
Debian gnustep-base package on amd64 for sparc64.

[1] https://crossqa.debian.net/src/gnustep-base
>From 8600f41989a525034ddc78f23fee1515b804cf56 Mon Sep 17 00:00:00 2001
From: Yavor Doganov <[email protected]>
Date: Fri, 19 Sep 2025 16:05:57 +0300
Subject: [PATCH] Minor tweaks for cross-compilation

---
 ChangeLog    |  5 +++++
 configure.ac |  2 +-
 cross.config | 18 +++++++++---------
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 234b9b9d1..6bab68c00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-09-19  Yavor Doganov  <[email protected]>
+
+       * cross.config: Update some variables to workable values.
+       * configure.ac: Override cross_NEED_WORD_ALIGNMENT on SPARC.
+
 2025-08-21 Richard Frith-Macdonald <[email protected]>
 
        * Source/NSHost.m: Improve lock granularity with a lock for host name.
diff --git a/configure.ac b/configure.ac
index afbbb1338..2bc84fbeb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,7 +191,7 @@ fi
 # import information from the cross-config.
 . "$CROSS_CONFIG"
 
-
+AS_CASE([$host_cpu], [sparc*], [cross_NEED_WORD_ALIGNMENT=1])
 
 #---------------------------------------------------------------------
 # Location of the GNUstep.conf config file (--with-config-file)
diff --git a/cross.config b/cross.config
index ed2310749..791c038a4 100644
--- a/cross.config
+++ b/cross.config
@@ -1,27 +1,27 @@
 # This configuration file contains the default values for AC_TRY_RUN 
 # or AC_RUN_IFELSE checks performed by the configure script.
 cross_utf8literal_ok=no
-cross_reuseaddr_ok=0
+cross_reuseaddr_ok=1
 cross_gs_cv_objc_works=yes
-cross_gs_cv_objc_compiler_supports_constant_string_class=no
-cross_gs_cv_objc_load_method_worked=no
+cross_gs_cv_objc_compiler_supports_constant_string_class=yes
+cross_gs_cv_objc_load_method_worked=yes
 cross_have_poll=no
 cross_VSPRINTF_RETURNS_LENGTH=1
 cross_VASPRINTF_RETURNS_LENGTH=1
-cross_NEED_WORD_ALIGNMENT=1
+cross_NEED_WORD_ALIGNMENT=0
 cross_working_register_printf=1
 cross_wide_register_printf=1
-cross_gs_cv_program_invocation_name_worked=no
-cross_CMDLINE_TERMINATED=0
+cross_gs_cv_program_invocation_name_worked=yes
+cross_CMDLINE_TERMINATED=1
 cross_have_kvm_env=0
 cross_ffi_ok=yes
 cross_non_fragile=no
 cross_have_unexpected=no
-cross_safe_initialize=no
-cross_found_iconv_libc=no
+cross_safe_initialize=yes
+cross_found_iconv_libc=yes
 cross_found_iconv_liconv=no
 cross_found_iconv_lgiconv=no
-cross_objc2_runtime=0
+cross_objc2_runtime=1
 
 # Enable for true cross build
 if test "$cross_compiling"="yes"; then
-- 
2.51.0

Reply via email to