On Tue, 17 Jun 2025 16:34, Sachin T said:
> Hi Gpg team,
>
> Please review patch required for libgpg-error on IBM z/OS platform.

Pretty small now.  Cool.  I have an improvement:

--8<---------------cut here---------------start------------->8---
    Set build specific variable for zOS
    
    * configure.ac (EXTRA_LIBS_FOR_BUILD): New ac_subst.
    * src/Makefile.am (mkheader): Append that var to the rule.

        Modified   configure.ac
diff --git a/configure.ac b/configure.ac
index 78d8356..30a241f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,17 @@ case "${host}" in
        ;;
 esac
 
+# Set some variables for building build platform helpers.
+case "$build_os" in
+    *zOS*)
+        EXTRA_LIBS_FOR_BUILD=zoslib
+        ;;
+    *)
+        EXTRA_LIBS_FOR_BUILD=
+       ;;
+esac
+AC_SUBST(EXTRA_LIBS_FOR_BUILD)
+
 
 if test "$have_w32_system" != yes; then
   gl_THREADLIB_EARLY
        Modified   src/Makefile.am
diff --git a/src/Makefile.am b/src/Makefile.am
index e56bb23..feae327 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -275,7 +275,8 @@ errnos-sym.h: Makefile mkstrtable.awk errnos.in
 
 mkheader$(EXEEXT_FOR_BUILD): mkheader.c Makefile
        $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
-       $(CPPFLAGS_FOR_BUILD) -g -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
+       $(CPPFLAGS_FOR_BUILD) -g -I. -I$(srcdir) \
+        -o $@ $(srcdir)/mkheader.c $(EXTRA_LIBS_FOR_BUILD)
 
 parts_of_gpg_error_h =                 \
        gpg-error.h.in          \

--8<---------------cut here---------------end--------------->8---

I don't know the cpu-vendor-os triplet for zOS - please fix run
config.guess.  But using the above approach we should even be abale to
cross-build and LIBS is saved for host things and can be used as you
like.  If you need to run configure (do you run it?) you may also want
to add zOS specific stuff into the 'case "${host}" in' part of
configure.


-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein

Attachment: openpgp-digital-signature.asc
Description: PGP signature

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel

Reply via email to