4 changed files with 74 additions and 55 deletions
			
			
		| @ -0,0 +1,34 @@ | |||||
|  | From 7350874f6f62314af4c8ec1973c91d305a6f4ddc Mon Sep 17 00:00:00 2001 | ||||
|  | From: David Michael <fedora.dm0@gmail.com> | ||||
|  | Date: Fri, 26 Mar 2021 16:06:50 +0900 | ||||
|  | Subject: [PATCH] build: Fix generation of lock-obj-pub.native.h for cross | ||||
|  |  build. | ||||
|  | 
 | ||||
|  | * src/gen-lock-obj.sh: Capture echo output with quotes. | ||||
|  | 
 | ||||
|  | --
 | ||||
|  | 
 | ||||
|  | Fixes-commit: 99ae862a96a569724f49a604ebb7d3f6d2c2d374 | ||||
|  | Signed-off-by: David Michael <fedora.dm0@gmail.com> | ||||
|  | Upstream: 33593864cd54143db594c4237bba41e14179061c | ||||
|  | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> | ||||
|  | ---
 | ||||
|  |  src/gen-lock-obj.sh | 2 +- | ||||
|  |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
|  | 
 | ||||
|  | diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
 | ||||
|  | index a710f0c..258eec6 100755
 | ||||
|  | --- a/src/gen-lock-obj.sh
 | ||||
|  | +++ b/src/gen-lock-obj.sh
 | ||||
|  | @@ -38,7 +38,7 @@
 | ||||
|  |  #     AWK=gawk ./gen-lock-obj.sh | ||||
|  |  # | ||||
|  |   | ||||
|  | -if test -n `echo -n`; then
 | ||||
|  | +if test -n "`echo -n`"; then
 | ||||
|  |      ECHO_C='\c' | ||||
|  |      ECHO_N='' | ||||
|  |  else | ||||
|  | -- 
 | ||||
|  | 2.31.1 | ||||
|  | 
 | ||||
| @ -1,54 +0,0 @@ | |||||
| From 77c89f62f106d88ef2b5963f4a13755c337c793d Mon Sep 17 00:00:00 2001 |  | ||||
| From: Fabrice Fontaine <fontaine.fabrice@gmail.com> |  | ||||
| Date: Mon, 15 Feb 2021 07:56:29 +0100 |  | ||||
| Subject: [PATCH] configure.ac: fix build without threads |  | ||||
| 
 |  | ||||
| Cross-compilation of libgpg-error fails on toolchain without threads |  | ||||
| since commit 988211d3d4c1f3d5cfa6b460210f65ab636763b5, |  | ||||
| 9ee011259f819a3cf50fe7019fa4366dbc437e0e and |  | ||||
| 50e62b36ea01ed25d12c443088b85d4f41a2b3e1 |  | ||||
| 
 |  | ||||
| Indeed, since that time, libgpg-error assumes that pthread.h is always |  | ||||
| available resulting in the following error at configure time: |  | ||||
| 
 |  | ||||
| checking for arm-unknown-linux-gnueabi-objdump... (cached) /tmp/instance-1/output-1/host/bin/arm-linux-objdump |  | ||||
| conftest.c:1:10: fatal error: pthread.h: No such file or directory |  | ||||
|     1 | #include <pthread.h> |  | ||||
|       |          ^~~~~~~~~~~ |  | ||||
| compilation terminated. |  | ||||
| configure: generated src/lock-obj-pub.native.h using arm-unknown-linux-gnueabi-objdump and gawk |  | ||||
| checking whether to enable log_clock... no |  | ||||
| 
 |  | ||||
| This error will in turn results in a build failure because |  | ||||
| "Can't determine mutex size" is echoed by gen-lock-obj.sh: |  | ||||
| 
 |  | ||||
| In file included from strsource-sym.c:27: |  | ||||
| ./gpg-error.h:1115:4: warning: missing terminating ' character |  | ||||
|  1115 | Can't determine mutex size |  | ||||
|       |    ^ |  | ||||
| 
 |  | ||||
| Full build log: |  | ||||
| http://autobuild.buildroot.org/results/334/3344c96e5627a9327b0eabe0b27f34490bbabc0d/build-end.log |  | ||||
| 
 |  | ||||
| Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> |  | ||||
| [Upstream status: https://dev.gnupg.org/T5296] |  | ||||
| ---
 |  | ||||
|  configure.ac | 2 +- |  | ||||
|  1 file changed, 1 insertion(+), 1 deletion(-) |  | ||||
| 
 |  | ||||
| diff --git a/configure.ac b/configure.ac
 |  | ||||
| index b9a2a3e..15d9fdc 100644
 |  | ||||
| --- a/configure.ac
 |  | ||||
| +++ b/configure.ac
 |  | ||||
| @@ -599,7 +599,7 @@ if test x$cross_compiling = xyes; then
 |  | ||||
|    case $host in |  | ||||
|      *-*-linux*) |  | ||||
|      AC_CHECK_TOOL(OBJDUMP, [objdump]) |  | ||||
| -    if test -n "$OBJDUMP"; then
 |  | ||||
| +    if test -n "$OBJDUMP" -a x"$gl_use_threads" != xno; then
 |  | ||||
|        lock_obj_h_generated=yes |  | ||||
|        if test ! -d src; then mkdir src; fi |  | ||||
|        LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \ |  | ||||
| -- 
 |  | ||||
| 2.30.0 |  | ||||
| 
 |  | ||||
| @ -0,0 +1,39 @@ | |||||
|  | From 7ede0d4ce19e0ed14cd1cec81ba7df4e467f1eeb Mon Sep 17 00:00:00 2001 | ||||
|  | From: NIIBE Yutaka <gniibe@fsij.org> | ||||
|  | Date: Mon, 21 Jun 2021 12:16:20 +0900 | ||||
|  | Subject: [PATCH] build: Fix --disable-threads. | ||||
|  | 
 | ||||
|  | * src/gen-lock-obj.sh: Fix generating '}}}'. | ||||
|  | 
 | ||||
|  | --
 | ||||
|  | 
 | ||||
|  | GnuPG-bug-id: 5495 | ||||
|  | Reported-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||||
|  | Fixes-commit: 1fb90a7da186ee2ee098a666f6f3a35bb1720e59 | ||||
|  | Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> | ||||
|  | [Retrieved from: | ||||
|  | https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commit;h=220a427b4f997ef6af1b2d4e82ef1dc96e0cd6ff] | ||||
|  | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||||
|  | ---
 | ||||
|  |  src/gen-lock-obj.sh | 2 +- | ||||
|  |  1 file changed, 1 insertion(+), 1 deletion(-) | ||||
|  | 
 | ||||
|  | diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
 | ||||
|  | index 258eec6..014667f 100755
 | ||||
|  | --- a/src/gen-lock-obj.sh
 | ||||
|  | +++ b/src/gen-lock-obj.sh
 | ||||
|  | @@ -121,10 +121,10 @@ while test "$i" -lt $ac_mtx_size; do
 | ||||
|  |      fi | ||||
|  |      i=$(( i + 1 )) | ||||
|  |  done | ||||
|  | +echo '}}}'
 | ||||
|  |  fi | ||||
|  |   | ||||
|  |  cat <<'EOF' | ||||
|  | -}}}
 | ||||
|  |  ## | ||||
|  |  ## Local Variables: | ||||
|  |  ## mode: c | ||||
|  | -- 
 | ||||
|  | 2.31.1 | ||||
|  | 
 | ||||
					Loading…
					
					
				
		Reference in new issue