Signed-off-by: Uwe Kleine-König <u.kleine-koe...@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-koe...@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-requ...@pengutronix.de

Reply via email to