mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] libgpg-error: fix echo behavior related build issue
@ 2021-10-01  8:10 Lucas Stach
  2021-10-20  9:39 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2021-10-01  8:10 UTC (permalink / raw)
  To: ptxdist

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 ...1-fix-the-last-cross-compilation-fix.patch | 55 +++++++++++++++++++
 patches/libgpg-error-1.42/series              |  4 ++
 2 files changed, 59 insertions(+)
 create mode 100644 patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
 create mode 100644 patches/libgpg-error-1.42/series

diff --git a/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch b/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
new file mode 100644
index 000000000000..6776ff10fc7b
--- /dev/null
+++ b/patches/libgpg-error-1.42/0001-fix-the-last-cross-compilation-fix.patch
@@ -0,0 +1,55 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Sat, 11 Sep 2021 01:52:35 +0200
+Subject: [PATCH] fix the last cross-compilation fix
+
+Instead of trying to figure out which way to call echo in order to supress
+the newline and apparently getting it wrong on some platforms (on a Fedora
+build host compilation fails due to stray \c characters in the generated
+files) use the POSIX recommended portable way of calling printf.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ src/gen-lock-obj.sh | 16 ++++------------
+ 1 file changed, 4 insertions(+), 12 deletions(-)
+
+diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
+index a710f0ccee5a..aea9edb6095a 100755
+--- a/src/gen-lock-obj.sh
++++ b/src/gen-lock-obj.sh
+@@ -38,14 +38,6 @@
+ #     AWK=gawk ./gen-lock-obj.sh
+ #
+ 
+-if test -n `echo -n`; then
+-    ECHO_C='\c'
+-    ECHO_N=''
+-else
+-    ECHO_C=''
+-    ECHO_N='-n'
+-fi
+-
+ if test "$1" = --disable-threads; then
+     cat <<EOF
+ ## lock-obj-pub.$host.h - NO LOCK SUPPORT
+@@ -107,17 +99,17 @@ EOF
+ #     USE_LONG_DOUBLE_FOR_ALIGNMENT
+ #
+ 
+-echo ${ECHO_N} "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{${ECHO_C}"
++printf "%s" "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{"
+ 
+ i=0
+ while test "$i" -lt $ac_mtx_size; do
+     if test "$i" -ne 0 -a "$(( $i % 8 ))" -eq 0; then
+         echo ' \'
+-        echo ${ECHO_N} "                                    ${ECHO_C}"
++        printf "%s" "                                    "
+     fi
+-    echo ${ECHO_N} "0${ECHO_C}"
++    printf "%s" "0"
+     if test "$i" -lt $(($ac_mtx_size - 1)); then
+-        echo ${ECHO_N} ",${ECHO_C}"
++        printf "%s" ","
+     fi
+     i=$(( i + 1 ))
+ done
diff --git a/patches/libgpg-error-1.42/series b/patches/libgpg-error-1.42/series
new file mode 100644
index 000000000000..fc21a0922fdc
--- /dev/null
+++ b/patches/libgpg-error-1.42/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-fix-the-last-cross-compilation-fix.patch
+# a840af6993790b90121e652373747e0a  - git-ptx-patches magic
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-20  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01  8:10 [ptxdist] [PATCH] libgpg-error: fix echo behavior related build issue Lucas Stach
2021-10-20  9:39 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox