Re: [PATCH libgpg-error] Add patch to support IBM z/OS

Werner Koch via Gnupg-devel <[email protected]>
Newsgroups gmane.comp.encryption.gpg.devel
Message-ID <[email protected]>
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

_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
openpgp-digital-signature.asc (application/pgp-signature, 247 B)
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQSHd0YfKgdOvEgNNZQZzByeCFsQegUCaFJ8XA0cd2tAZ251cGcu
b3JnAAoJEBnMHJ4IWxB6vcMA/j44Z7/FCXfPDsHFBY3sozEnBVHVhfSTZCSBRlkV
cUyNAQClZpW1UapNe96ep+u/+LVgKdb71ke4VYxH7vKKUBWtBg==
=VJJC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.