[PATCH libgpg-error] build: Fix cross-compiling into a separate build dir.

David Michael fedora.dm0 at gmail.com
Mon Jun 1 16:24:53 CEST 2020


* configure.ac: Create the src directory before writing into it.
* src/Makefile.am (EXTRA_DIST): Add gen-lock-obj.sh.

--

Signed-off-by: David Michael <fedora.dm0 at gmail.com>
---
(resending since this apparently didn't get delivered)

Hi,

I tried to cross-compile libgpg-error-1.38 configured in a separate
directory, and it fails at two points.  First, it can't redirect output
to src/lock-obj-pub.native.h because src doesn't exist.  Second, the
script gen-lock-obj.sh was not included in the release archive.

Can something like this be applied to fix it?

Thanks.

David

 configure.ac    | 1 +
 src/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 6bd634b..1dd6489 100644
--- a/configure.ac
+++ b/configure.ac
@@ -598,6 +598,7 @@ if test x$cross_compiling = xyes; then
   case $host in
     *-*-linux*)
     lock_obj_h_generated=yes
+    mkdir src
     LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \
         CC=$CC OBJDUMP=$host_alias-objdump \
         ac_ext=$ac_ext ac_objext=$ac_objext \
diff --git a/src/Makefile.am b/src/Makefile.am
index 7e36d69..b2bffd2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,7 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
 	gpg-error.vers gpg-error.def.in \
         versioninfo.rc.in gpg-error.w32-manifest.in \
 	gpg-error-config-test.sh gpg-error.pc.in \
-	$(lock_obj_pub)
+	gen-lock-obj.sh $(lock_obj_pub)
 
 BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
 	code-to-errno.h code-from-errno.h \
-- 
2.26.2




More information about the Gnupg-devel mailing list