Hi, Thanks regarding the EXTRA_LIBS_FOR_BUILD suggestion, I had a follow-up question.
zoslib consists of two static libraries and one separate object file. Due to a z/OS linker limitation, the .o file can’t be included inside an archive , it may get ignored unless one of its symbols is explicitly referenced. To work around this, we usually pass all three -lzoslib, lzoslib-supp, and celquopt.s.o— separately to the linker. Would it be acceptable to pass these externally via the configure invocation like this? ./configure EXTRA_LIBS_FOR_BUILD="-lzoslib -lzoslib-supp <lib_path>/celquopt.s.o " Or would you prefer this logic be handled entirely within configure.ac? Regards, Sachin On 18/06/25, 2:13 PM, "Werner Koch" <[email protected]> wrote: 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
