mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] efax: New patch to fix build failure with gcc-10
Date: Tue, 16 Mar 2021 12:39:21 +0100	[thread overview]
Message-ID: <20210316113921.28962-1-u.kleine-koenig@pengutronix.de> (raw)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 .../0005-Fix-linker-error-with-gcc-10.patch   | 45 +++++++++++++++++++
 patches/efax-0.9/series                       |  3 +-
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 patches/efax-0.9/0005-Fix-linker-error-with-gcc-10.patch

diff --git a/patches/efax-0.9/0005-Fix-linker-error-with-gcc-10.patch b/patches/efax-0.9/0005-Fix-linker-error-with-gcc-10.patch
new file mode 100644
index 000000000000..08f1d0a1a97a
--- /dev/null
+++ b/patches/efax-0.9/0005-Fix-linker-error-with-gcc-10.patch
@@ -0,0 +1,45 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Tue, 16 Mar 2021 12:33:05 +0100
+Subject: [PATCH] Fix linker error with gcc-10
+
+This fixes:
+
+	ld: efaxlib.o:(.bss+0x0): multiple definition of `reversebits'; efix.o:(.bss+0x0): first defined here
+	ld: efaxlib.o:(.bss+0x100): multiple definition of `normalbits'; efix.o:(.bss+0x100): first defined here
+	ld: efaxlib.o:(.bss+0x0): multiple definition of `reversebits'; efax.o:(.bss+0x0): first defined here
+	ld: efaxlib.o:(.bss+0x100): multiple definition of `normalbits'; efax.o:(.bss+0x100): first defined here
+	ld: efaxio.o:(.bss+0x0): multiple definition of `reversebits'; efax.o:(.bss+0x0): first defined here
+	ld: efaxio.o:(.bss+0x100): multiple definition of `normalbits'; efax.o:(.bss+0x100): first defined here
+	ld: efaxos.o:(.bss+0x0): multiple definition of `reversebits'; efax.o:(.bss+0x0): first defined here
+	ld: efaxos.o:(.bss+0x100): multiple definition of `normalbits'; efax.o:(.bss+0x100): first defined here
+---
+ efaxlib.c | 2 ++
+ efaxlib.h | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/efaxlib.c b/efaxlib.c
+index 4887cd9e5d72..347e8bd326e2 100644
+--- a/efaxlib.c
++++ b/efaxlib.c
+@@ -20,6 +20,8 @@
+ #define DEFWIDTH  1728		/* 215x297 mm image at fax resolution */
+ #define DEFHEIGHT 2287
+ 
++uchar reversebits [ 256 ], normalbits [ 256 ] ;
++
+ extern t4tab wtab [ ( 64 + 27 + 13 ) + 1 ] ; /* T.4 coding tables */
+ extern t4tab btab [ ( 64 + 27 + 13 ) + 1 ] ;
+ 
+diff --git a/efaxlib.h b/efaxlib.h
+index 9c725ae9a934..88505694dc0e 100644
+--- a/efaxlib.h
++++ b/efaxlib.h
+@@ -207,7 +207,7 @@ int runor ( short *a, int na, short *b, int nb, short *c, int *pels ) ;
+ /* Bit reversal lookup tables (note that the `normalbits' array
+    is the one actually used for the bit reversal.  */
+ 
+-uchar reversebits [ 256 ], normalbits [ 256 ] ;
++extern uchar reversebits [ 256 ], normalbits [ 256 ] ;
+ 
+ void initbittab(void) ;
+ 
diff --git a/patches/efax-0.9/series b/patches/efax-0.9/series
index a67ca2181e0a..d4edeefb40ce 100644
--- a/patches/efax-0.9/series
+++ b/patches/efax-0.9/series
@@ -4,4 +4,5 @@
 0002-add-nullpointer-check.patch
 0003-fix-l-option-in-efix.patch
 0004-add-missing-include-file.patch
-# 8338636f38d9624eaaf8c3530518be3d  - git-ptx-patches magic
+0005-Fix-linker-error-with-gcc-10.patch
+# dc070db4a15b5fc5df6ab930fcf4bfdc  - git-ptx-patches magic
-- 
2.29.2


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

             reply	other threads:[~2021-03-16 11:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 11:39 Uwe Kleine-König [this message]
2021-03-30 18:07 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210316113921.28962-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox