Skip to contentSkip to conversation

sharutils: Fix build with -fno-common

PATCH New Khem Raj 1 participant 21 messages Aug 14, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/21 sharutils: Fix build with -fno-common

GCC 10 defaults to -fno-common that results into errors on multiple global variable definitions

---
 .../0001-Fix-building-with-GCC-10.patch       | 98 +++++++++++++++++++
 ...ot-include-lib-md5.c-into-src-shar.c.patch | 40 ++++++++
 .../sharutils/sharutils_4.15.2.bb             |  2 +
 3 files changed, 140 insertions(+)
 create mode 100644 meta-oe/recipes-support/sharutils/sharutils/0001-Fix-building-with-GCC-10.patch
 create mode 100644 meta-oe/recipes-support/sharutils/sharutils/0002-Do-not-include-lib-md5.c-into-src-shar.c.patch
meta-oe/recipes-support/sharutils/sharutils/0001-Fix-building-with-GCC-10.patch new file +98 -0
new file mode 100644
index 0000000000..9e2ebe7564
@@ -0,0 +1,98 @@
+From b7dd97708b9d0ed09d8d7ac435f8b25eadbf6487 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=83=C2=ADsa=C3=85=E2=84=A2?= <address@hidden>
+Date: Thu, 13 Aug 2020 11:20:38 -0700
+Subject: [PATCH 1/2] Fix building with GCC 10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 10 defaults to -fno-common that results into errors on multiple
+global variable definitions:
+
+/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld:
+shar-opts.o:(.data.rel.ro.local+0x0): multiple definition of
+`program_name'; shar.o:(.rodata+0x10): first defined here
+
+This patch fixes it by changing the definitions in header files into extern
+declarations.
+
+<https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html>
+
+Signed-off-by: Petr Písař <address@hidden>
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/shar-opts.h     | 2 +-
+ src/shar-std.def    | 2 +-
+ src/unshar-opts.h   | 2 +-
+ src/uudecode-opts.h | 2 +-
+ src/uuencode-opts.h | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/shar-opts.h b/src/shar-opts.h
+index 172676f..f6e4e79 100644
+--- a/src/shar-opts.h
++++ b/src/shar-opts.h
+@@ -352,7 +352,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ 
+ extern bool initialization_done;
+ extern int optidx;
+diff --git a/src/shar-std.def b/src/shar-std.def
+index ed06b77..a28f61c 100644
+--- a/src/shar-std.def
++++ b/src/shar-std.def
+@@ -41,7 +41,7 @@ no-misuse-usage;
+ usage-message;
+ die-code;
+ 
+-export  = '#include "local.h"'"\nchar const * const program_name;";
++export  = '#include "local.h"'"\nextern char const * const program_name;";
+ 
+ #shell
+ echo "include = 'char const * const program_name = \"${progname}\";';"
+diff --git a/src/unshar-opts.h b/src/unshar-opts.h
+index 568ffca..aa85833 100644
+--- a/src/unshar-opts.h
++++ b/src/unshar-opts.h
+@@ -192,7 +192,7 @@ extern "C" {
+ extern size_t       separator_str_len;
+ 
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ 
+ 
+ /* * * * * *
+diff --git a/src/uudecode-opts.h b/src/uudecode-opts.h
+index 5b74419..289a366 100644
+--- a/src/uudecode-opts.h
++++ b/src/uudecode-opts.h
+@@ -170,7 +170,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ 
+ 
+ /* * * * * *
+diff --git a/src/uuencode-opts.h b/src/uuencode-opts.h
+index 1a5b7bc..f2df0a8 100644
+--- a/src/uuencode-opts.h
++++ b/src/uuencode-opts.h
+@@ -166,7 +166,7 @@ extern "C" {
+  *  global exported definitions
+  */
+ #include "local.h"
+-char const * const program_name;
++extern char const * const program_name;
+ 
+ 
+ /* * * * * *
+-- 
+2.28.0
+
meta-oe/recipes-support/sharutils/sharutils/0002-Do-not-include-lib-md5.c-into-src-shar.c.patch new file +40 -0
new file mode 100644
index 0000000000..d4a8d6fbae
@@ -0,0 +1,40 @@
+From ab981e1a973e83edb6ea19e6e84102f43ded0dcb Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 11:22:40 -0700
+Subject: [PATCH 2/2] Do not include lib/md5.c into src/shar.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+ib/md5.o is part of libgnu.a that is linked to shar. There is no
+point in linking md5.o twice into shar executable. Moreover SuSE
+reports that this triggers a linking error with GCC 10:
+
+/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld:
+../lib/libgnu.a(md5.o): in function `md5_stream':
+[   30s] md5.c:(.text+0x15d): multiple definition of `md5_stream';
+shar.o:shar.c:(.text+0x28): first defined here
+
+<https://lists.gnu.org/archive/html/bug-gnu-utils/2020-01/msg00001.html>
+
+Signed-off-by: Petr Písař <address@hidden>
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/shar.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/shar.c b/src/shar.c
+index 11cbada..6d7ed1d 100644
+--- a/src/shar.c
++++ b/src/shar.c
+@@ -53,7 +53,6 @@ static const char cright_years_z[] =
+ 
+ #include "inttostr.h"
+ #include "liballoca.h"
+-#include "md5.c"
+ #include "md5.h"
+ #include "quotearg.h"
+ #include "xalloc.h"
+-- 
+2.28.0
+
meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +2 -0
index 930922ed48..48eb268939 100644
@@ -10,6 +10,8 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \
            file://0001-Fix-build-with-clang.patch \
            file://CVE-2018-1000097.patch \
            file://0001-Fix-build-with-recent-gettext.patch \
+           file://0001-Fix-building-with-GCC-10.patch \
+           file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \
            "
 SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800"
 SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637"
Signature · 1 line
2.28.0
author
#1 lore raw

PATCH 2/21 lprng: Fix build with -fno-common

---
 ...Do-not-define-Mail_fd-multiple-times.patch | 34 +++++++++++++++++++
 meta-oe/recipes-extended/lprng/lprng_3.8.C.bb |  4 ++-
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/lprng/lprng/0001-checkpc-Do-not-define-Mail_fd-multiple-times.patch
meta-oe/recipes-extended/lprng/lprng/0001-checkpc-Do-not-define-Mail_fd-multiple-times.patch new file +34 -0
new file mode 100644
index 0000000000..5748690445
@@ -0,0 +1,34 @@
+From 6358561d5bad34f0003ebd415142d504fe53045a Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 11:42:08 -0700
+Subject: [PATCH] checkpc: Do not define Mail_fd multiple times
+
+Its also defines in var.c via lp.h this is flagged when -fno-common is
+used
+
+Fixes
+TOPDIR/build/tmp/work/core2-32-yoe-linux/lprng/3.8.C-r0/recipe-sysroot-native/usr/bin/i686-yoe-linux/i686-yoe-linux-ld: vars.o:/usr/src/debug/lprng/3.8.C-r0/build/src/../../lprng-3.8.C/src/include/lp.h:72: multiple definition of `Mail_fd'; checkpc.o:/usr/src/debug/lprng/3.8.C-r0/build/src/../../lprng-3.8.C/src/common/checkpc.c:35: first defined here
+clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/common/checkpc.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/common/checkpc.c b/src/common/checkpc.c
+index aa03b08..7334094 100644
+--- a/src/common/checkpc.c
++++ b/src/common/checkpc.c
+@@ -32,8 +32,6 @@ static int Remove;
+ static char *User_specified_printer;
+ static time_t Current_time;
+ static int Check_path_list( char *plist, int allow_missing );
+-int Mail_fd;
+-
+ 
+ /* pathnames of the spool directory (sd) and control directory (cd) */
+ 
+-- 
+2.28.0
+
meta-oe/recipes-extended/lprng/lprng_3.8.C.bb +3 -1
index 963c6320f2..4432342366 100644
@@ -3,7 +3,9 @@ SECTION = "console/utils"
 LICENSE = "GPLv2 | Artistic-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=c6570d8d699af1883db9d0e733ac9bfb"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+           file://0001-checkpc-Do-not-define-Mail_fd-multiple-times.patch \
+          "
 SRC_URI[md5sum] = "5901bed95e61d2bea3ba3056056af432"
 SRC_URI[sha256sum] = "694a1747a96385b89e93f43343bf35cee5c8c73353a83814106911c99f09de10"
 
Signature · 1 line
2.28.0
author
#2 lore raw

PATCH 3/21 fluentbit: Use -fcommon to compile

In reply to Khem Raj

gcc10+ defaults to -fno-common and fluentbit does not compile with -fno-common

---
 meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/fluentbit/fluentbit_1.3.5.bb +2 -0
index 21d13ac935..411268815a 100644
@@ -54,5 +54,7 @@ EXTRA_OECMAKE_append_riscv64 = " -DFLB_DEPS='atomic'"
 
 inherit cmake systemd
 
+CFLAGS += "-fcommon"
+
 SYSTEMD_SERVICE_${PN} = "td-agent-bit.service"
 TARGET_CC_ARCH_append = " ${SELECTED_OPTIMIZATION}"
Signature · 1 line
2.28.0
author
#3 lore raw

PATCH 4/21 fbida: Upgrade to 2.14

In reply to Khem Raj

* Redo libjpeg detection to use cross cpp
* Add missing dependencies
* Use cairo only when it is compiled with EGL support which is not defaul in oe-core
* Fix build with gcc10

---
 .../fbida/{fbida_2.10.bb => fbida_2.14.bb}    | 16 ++---
 .../fbida/files/cairo-weak-detect.patch       | 17 ++++++
 .../fbida/files/fbida-gcc10.patch             | 61 +++++++++++++++++++
 .../fbida/files/fix-preprocessor.patch        | 20 ++----
 4 files changed, 93 insertions(+), 21 deletions(-)
 rename meta-oe/recipes-graphics/fbida/{fbida_2.10.bb => fbida_2.14.bb} (80%)
 create mode 100644 meta-oe/recipes-graphics/fbida/files/cairo-weak-detect.patch
 create mode 100644 meta-oe/recipes-graphics/fbida/files/fbida-gcc10.patch
meta-oe/recipes-graphics/fbida/fbida_2.14.bb renamed from meta-oe/recipes-graphics/fbida/fbida_2.10.bb +9 -7
similarity index 80%
rename from meta-oe/recipes-graphics/fbida/fbida_2.10.bb
rename to meta-oe/recipes-graphics/fbida/fbida_2.14.bb
index 0bf48ace6b..29d0f64ac2 100644
@@ -6,20 +6,18 @@ AUTHOR = "Gerd Hoffmann"
 SECTION = "utils"
 
 LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e8feb78a32950a909621bbb51f634b39"
 
-DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif"
+DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif libdrm pixman poppler libepoxy cairo"
 
 SRC_URI = "https://www.kraxel.org/releases/fbida/fbida-${PV}.tar.gz \
 	   file://0001-Avoid-using-host-path.patch \
 	   file://fix-preprocessor.patch \
            file://support-jpeg-turbo.patch \
-           file://use-jpeg-turbo.patch \
+           file://cairo-weak-detect.patch \
+           file://fbida-gcc10.patch \
 	   "
-SRC_URI[md5sum] = "09460b964b58c2e39b665498eca29018"
-SRC_URI[sha256sum] = "7a5a3aac61b40a6a2bbf716d270a46e2f8e8d5c97e314e927d41398a4d0b6cb6"
-
-B = "${WORKDIR}/build"
+SRC_URI[sha256sum] = "95b7c01556cb6ef9819f358b314ddfeb8a4cbe862b521a3ed62f03d163154438"
 
 inherit pkgconfig
 
@@ -33,6 +31,10 @@ PACKAGECONFIG[tiff] = ",,tiff"
 PACKAGECONFIG[motif] = ",,libx11 libxext libxpm libxt openmotif"
 PACKAGECONFIG[webp] = ",,libwebp"
 PACKAGECONFIG[lirc] = ",,lirc"
+# This can only be enabled when cairo has egl enabled in its packageconfig support too
+PACKAGECONFIG[egl] = ",,"
+
+EXTRA_OEMAKE += ""${@bb.utils.contains('PACKAGECONFIG', 'egl', 'HAVE_CAIRO_GL=yes', 'HAVE_CAIRO_GL=no', d)}""
 
 do_compile() {
     sed -i -e 's# fbgs# \$(srcdir)/fbgs#; s#-Ijpeg#-I\$(srcdir)/jpeg#; s# jpeg/# \$(srcdir)/jpeg/#' ${S}/GNUmakefile
meta-oe/recipes-graphics/fbida/files/cairo-weak-detect.patch new file +17 -0
new file mode 100644
index 0000000000..c7c579cc41
@@ -0,0 +1,17 @@
+OE configures cairo to disable EGL support, however fbida expects cairo with egl support
+this patch therefore makes it possible to set HAVE_CAIRO_GL via recipe
+
+Upstream-Status: Inappropriate [OE-Specific]
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -67,7 +67,7 @@ define make-config
+ LIB		:= $(LIB)
+ RESDIR		:= $(call ac_resdir)
+ HAVE_LINUX_FB_H	:= $(call ac_header,linux/fb.h)
+-HAVE_CAIRO_GL	:= $(call ac_pkg_config,cairo-gl)
++HAVE_CAIRO_GL	?= $(call ac_pkg_config,cairo-gl)
+ HAVE_LIBPCD	:= $(call ac_lib,pcd_open,pcd)
+ HAVE_LIBGIF	:= $(call ac_lib,DGifOpenFileName,gif)
+ HAVE_LIBWEBP	:= $(call ac_pkg_config,libwebp)
meta-oe/recipes-graphics/fbida/files/fbida-gcc10.patch new file +61 -0

61 lines not on this page · raw message

meta-oe/recipes-graphics/fbida/files/fix-preprocessor.patch +6 -14
index 909a0a6c0f..cdeac996a1 100644
@@ -1,14 +1,6 @@
-Index: fbida-2.13/GNUmakefile
-===================================================================
---- fbida-2.13.orig/GNUmakefile
-+++ fbida-2.13/GNUmakefile
-@@ -53,8 +53,7 @@ include $(srcdir)/mk/Autoconf.mk
- 
- ac_jpeg_ver = $(shell \
- 	$(call ac_init,for libjpeg version);\
--	$(call ac_s_cmd,echo JPEG_LIB_VERSION \
--		| cpp -include jpeglib.h | tail -n 1);\
-+	$(call ac_s_cmd,cpp -include jpeglib.h -dM -E -x c /dev/null  | grep 'define JPEG_LIB_VERSION' | cut -f 3 -d' ');\
- 	$(call ac_fini))
- 
- define make-config
+--- a/scripts/jpeg-version.sh
++++ b/scripts/jpeg-version.sh
+@@ -1,2 +1,2 @@
+ #!/bin/sh
+-echo JPEG_LIB_VERSION | cpp $CFLAGS -include jpeglib.h | tail -1
++${CPP} -include jpeglib.h -dM -E -x c /dev/null | grep 'define JPEG_LIB_VERSION' | cut -f 3 -d' '
Signature · 1 line
2.28.0
author
#4 lore raw

PATCH 5/21 ipmitool: Fix build with -fno-common

In reply to Khem Raj
---
 ...-move-variable-definition-to-.c-file.patch | 41 +++++++++++++++++++
 .../ipmitool/ipmitool_1.8.18.bb               |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/ipmitool/ipmitool/0001-hpmfwupg-move-variable-definition-to-.c-file.patch
meta-oe/recipes-kernel/ipmitool/ipmitool/0001-hpmfwupg-move-variable-definition-to-.c-file.patch new file +41 -0
new file mode 100644
index 0000000000..a765c3ab2f
@@ -0,0 +1,41 @@
+From 3f7bb7218181745ca7762c1b4832cbb1c9e692f5 Mon Sep 17 00:00:00 2001
+From: Vaclav Dolezal <[email protected]>
+Date: Thu, 23 Jan 2020 11:26:32 +0100
+Subject: [PATCH] hpmfwupg: move variable definition to .c file
+
+Upstream-Status: Pending
+Signed-off-by: Vaclav Dolezal <[email protected]>
+---
+ include/ipmitool/ipmi_hpmfwupg.h | 2 +-
+ lib/ipmi_hpmfwupg.c              | 2 ++
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/ipmitool/ipmi_hpmfwupg.h b/include/ipmitool/ipmi_hpmfwupg.h
+index de65292..07f597b 100644
+--- a/include/ipmitool/ipmi_hpmfwupg.h
++++ b/include/ipmitool/ipmi_hpmfwupg.h
+@@ -800,7 +800,7 @@ typedef struct _VERSIONINFO {
+ 	char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
+ }VERSIONINFO, *PVERSIONINFO;
+ 
+-VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
++extern VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
+ 
+ #define TARGET_VER (0x01)
+ #define ROLLBACK_VER (0x02)
+diff --git a/lib/ipmi_hpmfwupg.c b/lib/ipmi_hpmfwupg.c
+index bbcffc0..d7cdcd6 100644
+--- a/lib/ipmi_hpmfwupg.c
++++ b/lib/ipmi_hpmfwupg.c
+@@ -58,6 +58,8 @@ ipmi_intf_get_max_request_data_size(struct ipmi_intf * intf);
+ 
+ extern int verbose;
+ 
++VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
++
+ int HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename,
+ 		int activate, int, int);
+ int HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx);
+-- 
+2.28.0
+
meta-oe/recipes-kernel/ipmitool/ipmitool_1.8.18.bb +1 -0
index 3de9a92a71..e3c74a5162 100644
@@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/ipmitool/ipmitool-${PV}.tar.bz2 \
            file://0003-channel-Fix-buffer-overflow.patch \
            file://0004-lanp-Fix-buffer-overflows-in-get_lan_param_select.patch \
            file://0005-fru-sdr-Fix-id_string-buffer-overflows.patch \
+           file://0001-hpmfwupg-move-variable-definition-to-.c-file.patch \
            "
 SRC_URI[md5sum] = "bab7ea104c7b85529c3ef65c54427aa3"
 SRC_URI[sha256sum] = "0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01"
Signature · 1 line
2.28.0
author
#5 lore raw

PATCH 6/21 smstools3: Fix build with -fno-common

In reply to Khem Raj
---
 ...arations-to-avoid-duplicate-var-defi.patch | 606 ++++++++++++++++++
 .../smstools3/smstools3_3.1.21.bb             |   4 +-
 2 files changed, 609 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch
meta-oe/recipes-connectivity/smstools3/smstools3/0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch new file +606 -0
new file mode 100644
index 0000000000..c714f74916
@@ -0,0 +1,606 @@
+From 77532d2e99252e3e07afa0f918bb8c9d73798f39 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 16:56:22 -0700
+Subject: [PATCH] Make extern declarations to avoid duplicate var definitions
+
+gcc-10+ defaults to -fno-common which flags these errors about mulitple
+definitions since the variables are defined in header files which are
+included from multiple sources, this patch ensures that extern
+declaration is added appropriately
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/blacklist.c |   2 +-
+ src/blacklist.h |   2 +-
+ src/charset.c   |   2 +-
+ src/charshift.c |   2 +-
+ src/logging.c   |   2 +-
+ src/logging.h   |   4 +-
+ src/modeminit.c |   6 +-
+ src/smsd_cfg.c  |   2 +
+ src/smsd_cfg.h  | 274 ++++++++++++++++++++++++------------------------
+ src/stats.h     |  22 ++--
+ src/whitelist.c |   2 +-
+ src/whitelist.h |   2 +-
+ 12 files changed, 164 insertions(+), 158 deletions(-)
+
+diff --git a/src/blacklist.c b/src/blacklist.c
+index 7440cca..0c00dd9 100755
+--- a/src/blacklist.c
++++ b/src/blacklist.c
+@@ -17,11 +17,11 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include "smsd_cfg.h"
+ #include "blacklist.h"
+ #include "extras.h"
+ #include "logging.h"
+ #include "alarm.h"
+-#include "smsd_cfg.h"
+ 
+ int inblacklist(char* msisdn)
+ {
+diff --git a/src/blacklist.h b/src/blacklist.h
+index 4f99050..61fd294 100755
+--- a/src/blacklist.h
++++ b/src/blacklist.h
+@@ -15,7 +15,7 @@ Either version 2 of the License, or (at your option) any later version.
+ #ifndef BLACK_H
+ #define BLACK_H
+ 
+-char blacklist[256];	// Filename of the black-list
++EXTERN char blacklist[256];	// Filename of the black-list
+ 
+ int inblacklist(char* msisdn);
+ 
+diff --git a/src/charset.c b/src/charset.c
+index cd7c997..1716d70 100755
+--- a/src/charset.c
++++ b/src/charset.c
+@@ -19,9 +19,9 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <syslog.h>
+ #include <ctype.h>
+ 
++#include "smsd_cfg.h"
+ #include "charset.h"
+ #include "logging.h"
+-#include "smsd_cfg.h"
+ #include "pdu.h"
+ #include "extras.h"
+ #include "charshift.h"
+diff --git a/src/charshift.c b/src/charshift.c
+index 48ba340..2d7b26c 100755
+--- a/src/charshift.c
++++ b/src/charshift.c
+@@ -25,8 +25,8 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <stdio.h>
+ #include <stdarg.h>
+ 
+-#include "logging.h"
+ #include "smsd_cfg.h"
++#include "logging.h"
+ #include "pdu.h"
+ #include "charset.h"
+ #include "extras.h"
+diff --git a/src/logging.c b/src/logging.c
+index 6ee2c4e..4af341f 100755
+--- a/src/logging.c
++++ b/src/logging.c
+@@ -12,6 +12,7 @@ the GNU General Public License as published by the Free Software Foundation.
+ Either version 2 of the License, or (at your option) any later version.
+ */
+ 
++#include "smsd_cfg.h"
+ #include "logging.h"
+ #include "extras.h"
+ #include <stdio.h>
+@@ -22,7 +23,6 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <time.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+-#include "smsd_cfg.h"
+ #include "stats.h"
+ 
+ int Filehandle = -1;
+diff --git a/src/logging.h b/src/logging.h
+index 4f27906..4550234 100755
+--- a/src/logging.h
++++ b/src/logging.h
+@@ -18,7 +18,7 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <time.h>
+ 
+ // 3.1.16beta2: Moved logch() and prch() from charset.c to logging.c:
+-char logch_buffer[8192];
++EXTERN char logch_buffer[8192];
+ 
+ #ifdef __GNUC__
+ void logch(char* format, ...) __attribute__ ((format(printf, 1, 2)));
+@@ -30,7 +30,7 @@ char prch(char ch);
+ 
+ // 3.1.16beta: changed type:
+ //int trouble_logging_started;
+-time_t trouble_logging_started;
++EXTERN time_t trouble_logging_started;
+ 
+ int change_loglevel(int new_level);
+ void restore_loglevel();
+diff --git a/src/modeminit.c b/src/modeminit.c
+index 42ff6b4..0d05fe9 100755
+--- a/src/modeminit.c
++++ b/src/modeminit.c
+@@ -19,8 +19,6 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <regex.h>
+ #include <ctype.h>
+ #include <time.h>
+-#include "logging.h"
+-#include "alarm.h"
+ 
+ #ifdef SOLARIS
+ #include <sys/filio.h>
+@@ -42,9 +40,11 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <netdb.h>
+ #endif
+ 
++#include "smsd_cfg.h"
++#include "logging.h"
++#include "alarm.h"
+ #include "extras.h"
+ #include "modeminit.h"
+-#include "smsd_cfg.h"
+ #include "version.h"
+ #include "pdu.h"
+ #include "stats.h"
+diff --git a/src/smsd_cfg.c b/src/smsd_cfg.c
+index 35c1198..32472b4 100755
+--- a/src/smsd_cfg.c
++++ b/src/smsd_cfg.c
+@@ -26,6 +26,8 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <ctype.h>
+ #include <grp.h>
+ 
++#define EXTERN
++
+ #include "extras.h"
+ #include "cfgfile.h"
+ #include "smsd_cfg.h"
+diff --git a/src/smsd_cfg.h b/src/smsd_cfg.h
+index 8ae208d..d6ece37 100755
+--- a/src/smsd_cfg.h
++++ b/src/smsd_cfg.h
+@@ -15,6 +15,10 @@ Either version 2 of the License, or (at your option) any later version.
+ #ifndef SMSD_CFG_H
+ #define SMSD_CFG_H
+ 
++#ifndef EXTERN
++#define EXTERN extern
++#endif
++
+ #include <limits.h>
+ #include <sys/types.h>
+ #include <time.h>
+@@ -126,17 +130,17 @@ Either version 2 of the License, or (at your option) any later version.
+ #define ALPHABET_UNKNOWN        4
+ #define ALPHABET_DEFAULT        0
+ 
+-char process_title[32];         // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
+-int process_id;                 // -1 for main task, all modems have numbers starting with 0.
++EXTERN char process_title[32];         // smsd for main task, NOTIFIER or CHILD, name of a modem for other tasks.
++EXTERN int process_id;                 // -1 for main task, all modems have numbers starting with 0.
+                                 // This is the same as device, can be used like devices[process_id] if IS_MODEM_PROCESS.
+ 
+-time_t process_start_time;
++EXTERN time_t process_start_time;
+ 
+-int modem_handle;               // Handle for modem.
++EXTERN int modem_handle;               // Handle for modem.
+ 
+-int put_command_timeouts;
+-unsigned long long put_command_sent; // 3.1.16beta.
+-char tmpdir[PATH_MAX];          // 3.1.16beta.
++EXTERN int put_command_timeouts;
++EXTERN unsigned long long put_command_sent; // 3.1.16beta.
++EXTERN char tmpdir[PATH_MAX];          // 3.1.16beta.
+ 
+ typedef struct
+ {
+@@ -284,204 +288,204 @@ typedef struct
+ 
+ // NOTE for regular run intervals: effective value is at least delaytime.
+ 
+-char configfile[PATH_MAX];	// Path to config file
+-char d_spool[PATH_MAX];		// Spool directory
+-char d_failed[PATH_MAX];	// Failed spool directory
+-char d_failed_copy[PATH_MAX];	// 3.1.17.
+-char d_incoming[PATH_MAX];	// Incoming spool directory
+-char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
+-char d_report[PATH_MAX];	// Incoming report spool directory
+-char d_report_copy[PATH_MAX];	// 3.1.17.
+-char d_phonecalls[PATH_MAX];    // Incoming phonecalls data directory
+-char d_saved[PATH_MAX];         // Directory for smsd's internal use, concatenation storage files etc.
+-char d_sent[PATH_MAX];		// Sent spool directory
+-char d_sent_copy[PATH_MAX];	// 3.1.17.
+-char d_checked[PATH_MAX];	// Spool directory for checked messages (only used when no provider queues used)
+-char eventhandler[PATH_MAX];	// Global event handler program or script
+-char alarmhandler[PATH_MAX];	// Global alarm handler program or script
+-char checkhandler[PATH_MAX];    // Handler that checks if the sms file is valid.
+-int alarmlevel;			// Alarm Level (9=highest). Verbosity of alarm handler.
+-char logfile[PATH_MAX];		// Name or Handle of Log File
+-int  loglevel;			// Log Level (9=highest). Verbosity of log file.
+-_queue queues[NUMBER_OF_MODEMS]; // Queues
+-_device devices[NUMBER_OF_MODEMS]; // Modem devices
+-int delaytime;			// sleep-time after workless
+-int delaytime_mainprocess;      // sleep-time after workless, main process. If -1, delaytime is used.
+-int blocktime;			// sleep-time after multiple errors
+-int blockafter;                 // Block modem after n errors
+-int errorsleeptime;		// sleep-time after each error
+-int autosplit;			// Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
+-int receive_before_send;	// if 1 smsd tries to receive one message before sending
+-int store_received_pdu;         // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
+-int store_sent_pdu;             // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
+-int validity_period;            // Validity period for messages.
+-int decode_unicode_text;        // 1 if unicode text is decoded internally.
+-int internal_combine;           // 1 if multipart message is combined internally.
+-int internal_combine_binary;    // 1 if multipart binary message is combined internally. Defaults to internal_combine.
+-int keep_filename;              // 0 if unique filename is created to each directory when a message file is moved.
+-int store_original_filename;    // 1 if an original filename is saved to message file when it's moved from
++EXTERN char configfile[PATH_MAX];	// Path to config file
++EXTERN char d_spool[PATH_MAX];		// Spool directory
++EXTERN char d_failed[PATH_MAX];	// Failed spool directory
++EXTERN char d_failed_copy[PATH_MAX];	// 3.1.17.
++EXTERN char d_incoming[PATH_MAX];	// Incoming spool directory
++EXTERN char d_incoming_copy[PATH_MAX]; // 3.1.16beta2.
++EXTERN char d_report[PATH_MAX];	// Incoming report spool directory
++EXTERN char d_report_copy[PATH_MAX];	// 3.1.17.
++EXTERN char d_phonecalls[PATH_MAX];    // Incoming phonecalls data directory
++EXTERN char d_saved[PATH_MAX];         // Directory for smsd's internal use, concatenation storage files etc.
++EXTERN char d_sent[PATH_MAX];		// Sent spool directory
++EXTERN char d_sent_copy[PATH_MAX];	// 3.1.17.
++EXTERN char d_checked[PATH_MAX];	// Spool directory for checked messages (only used when no provider queues used)
++EXTERN char eventhandler[PATH_MAX];	// Global event handler program or script
++EXTERN char alarmhandler[PATH_MAX];	// Global alarm handler program or script
++EXTERN char checkhandler[PATH_MAX];    // Handler that checks if the sms file is valid.
++EXTERN int alarmlevel;			// Alarm Level (9=highest). Verbosity of alarm handler.
++EXTERN char logfile[PATH_MAX];		// Name or Handle of Log File
++EXTERN int  loglevel;			// Log Level (9=highest). Verbosity of log file.
++EXTERN _queue queues[NUMBER_OF_MODEMS]; // Queues
++EXTERN _device devices[NUMBER_OF_MODEMS]; // Modem devices
++EXTERN int delaytime;			// sleep-time after workless
++EXTERN int delaytime_mainprocess;      // sleep-time after workless, main process. If -1, delaytime is used.
++EXTERN int blocktime;			// sleep-time after multiple errors
++EXTERN int blockafter;                 // Block modem after n errors
++EXTERN int errorsleeptime;		// sleep-time after each error
++EXTERN int autosplit;			// Splitting of large text messages 0=no, 1=yes 2=number with text, 3=number with UDH
++EXTERN int receive_before_send;	// if 1 smsd tries to receive one message before sending
++EXTERN int store_received_pdu;         // 0=no, 1=unsupported pdu's only, 2=unsupported and 8bit/unicode, 3=all
++EXTERN int store_sent_pdu;             // 0=no, 1=failed pdu's only, 2=failed and 8bit/unicode, 3=all
++EXTERN int validity_period;            // Validity period for messages.
++EXTERN int decode_unicode_text;        // 1 if unicode text is decoded internally.
++EXTERN int internal_combine;           // 1 if multipart message is combined internally.
++EXTERN int internal_combine_binary;    // 1 if multipart binary message is combined internally. Defaults to internal_combine.
++EXTERN int keep_filename;              // 0 if unique filename is created to each directory when a message file is moved.
++EXTERN int store_original_filename;    // 1 if an original filename is saved to message file when it's moved from
+                                 // outgoing directory to spooler. Works together with keep_filename.
+-int date_filename;              // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
+-char regular_run[PATH_MAX];     // Script/program which is run regularly.
+-int regular_run_interval;       // Number of seconds between running a regular_run script/progdam.
+-char admin_to[SIZE_TO];         // Destination number for administrative messages.
+-int filename_preview;           // Number of chars of message text to concatenate to filename.
+-int incoming_utf8;              // 1 if incoming files are saved using UTF-8 character set.
+-int outgoing_utf8;              // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
+-int log_charconv;               // 1 if character set conversion is logged.
+-int log_single_lines;           // 1 if linefeeds are removed from the modem response to be logged.
+-int executable_check;           // 0 if eventhandler and other executables are NOT checked during the startup checking.
+-int keep_messages;              // For testing purposes: messages are not deleted and smsd stops after first run.
+-char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
+-int ic_purge_hours;             // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
+-int ic_purge_minutes;           // and if there is message parts older than defined, they are handled or deleted.
+-int ic_purge_read;              // 1 = message parts are stored as single messages. 0 = parts are just deleted.
+-int ic_purge_interval;          // 
+-char shell[PATH_MAX];           // Shell used to run eventhandler, defaults to /bin/sh
+-char adminmessage_device[32];   // Name of device used to send administrative messages of mainspooler.
+-int smart_logging;              // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
+-int status_signal_quality;      // 1 = signal quality is written to status file.
+-int status_include_counters;    // 1 = succeeded, failed and received counters are included in the status line.
+-int status_include_uptime;      // 3.1.16beta: 1 = include started & uptime line in the status file.
+-int hangup_incoming_call;       // 1 = if detected unexpected input contains RING and we want to end call.
+-int max_continuous_sending;     // Defines when sending is breaked to do check/do other tasks. Time in minutes.
+-int voicecall_hangup_ath;       // If ATH is used instead of AT+CHUP.
++EXTERN int date_filename;              // 1 or 2 if YYYYMMDD is included to the filename of incoming message.
++EXTERN char regular_run[PATH_MAX];     // Script/program which is run regularly.
++EXTERN int regular_run_interval;       // Number of seconds between running a regular_run script/progdam.
++EXTERN char admin_to[SIZE_TO];         // Destination number for administrative messages.
++EXTERN int filename_preview;           // Number of chars of message text to concatenate to filename.
++EXTERN int incoming_utf8;              // 1 if incoming files are saved using UTF-8 character set.
++EXTERN int outgoing_utf8;              // 1 if outgoing files are automatically converted from UTF-8 to ISO and GSM.
++EXTERN int log_charconv;               // 1 if character set conversion is logged.
++EXTERN int log_single_lines;           // 1 if linefeeds are removed from the modem response to be logged.
++EXTERN int executable_check;           // 0 if eventhandler and other executables are NOT checked during the startup checking.
++EXTERN int keep_messages;              // For testing purposes: messages are not deleted and smsd stops after first run.
++EXTERN char priviledged_numbers[SIZE_PRIVILEDGED_NUMBERS]; // Priviledged numbers in incoming messages.
++EXTERN int ic_purge_hours;             // If internal_combine is used, concatenation storage is checked every ic_purge_interval minutes
++EXTERN int ic_purge_minutes;           // and if there is message parts older than defined, they are handled or deleted.
++EXTERN int ic_purge_read;              // 1 = message parts are stored as single messages. 0 = parts are just deleted.
++EXTERN int ic_purge_interval;          // 
++EXTERN char shell[PATH_MAX];           // Shell used to run eventhandler, defaults to /bin/sh
++EXTERN char adminmessage_device[32];   // Name of device used to send administrative messages of mainspooler.
++EXTERN int smart_logging;              // 1 = if loglevel is less than 7, degug log is written is there has been any errors.
++EXTERN int status_signal_quality;      // 1 = signal quality is written to status file.
++EXTERN int status_include_counters;    // 1 = succeeded, failed and received counters are included in the status line.
++EXTERN int status_include_uptime;      // 3.1.16beta: 1 = include started & uptime line in the status file.
++EXTERN int hangup_incoming_call;       // 1 = if detected unexpected input contains RING and we want to end call.
++EXTERN int max_continuous_sending;     // Defines when sending is breaked to do check/do other tasks. Time in minutes.
++EXTERN int voicecall_hangup_ath;       // If ATH is used instead of AT+CHUP.
+ 
+ // 3.1.5:
+-int trust_outgoing;             // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
++EXTERN int trust_outgoing;             // 1 = it's _sure_ that files are created by rename AND permissions are correct. Speeds up spooling.
+ 
+ // 3.1.5:
+-int ignore_outgoing_priority;   // 1 = Priority: high header is not checked. Speeds up spooling.
++EXTERN int ignore_outgoing_priority;   // 1 = Priority: high header is not checked. Speeds up spooling.
+ 
+ // 3.1.7:
+-int ignore_exec_output;         // 1 = stdout and stderr of eventhandlers is _not_ checked.
++EXTERN int ignore_exec_output;         // 1 = stdout and stderr of eventhandlers is _not_ checked.
+ 
+ // 3.1.7:
+-mode_t conf_umask;              // File mode creation mask for smsd and modem processes.
++EXTERN mode_t conf_umask;              // File mode creation mask for smsd and modem processes.
+ 
+ // 3.1.7:
+-int trim_text;                  // 1 = trailing whitespaces are removed from text:
++EXTERN int trim_text;                  // 1 = trailing whitespaces are removed from text:
+ 
+ // 3.1.7:
+-int use_linux_ps_trick;         // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
++EXTERN int use_linux_ps_trick;         // 1 = change argv[0] to "smsd: MAINPROCESS", "smsd: GSM1" etc.
+ 
+ // 3.1.7:
+-int log_unmodified;
++EXTERN int log_unmodified;
+ 
+ // 3.1.7:
+-char suspend_filename[PATH_MAX];
++EXTERN char suspend_filename[PATH_MAX];
+ 
+ // 3.1.9:
+-int spool_directory_order;
++EXTERN int spool_directory_order;
+ 
+ // 3.1.9: 1 if read_from_modem is logged.
+-int log_read_from_modem;
++EXTERN int log_read_from_modem;
+ 
+ // 3.1.16beta2: log_read_timing for performance tuning.
+-int log_read_timing;
++EXTERN int log_read_timing;
+ 
+ // 3.1.16beta:
+-int log_response_time;
++EXTERN int log_response_time;
+ 
+ // 3.1.16beta2:
+-int default_alphabet;
++EXTERN int default_alphabet;
+ 
+ // 3.1.17: Child process for the mainprocess:
+-char mainprocess_child[PATH_MAX];
+-char mainprocess_child_args[PATH_MAX];
++EXTERN char mainprocess_child[PATH_MAX];
++EXTERN char mainprocess_child_args[PATH_MAX];
+ 
+ // 3.1.17: Notifier for the mainprocess:
+-int mainprocess_notifier;
++EXTERN int mainprocess_notifier;
+ 
+ // 3.1.17: If *_copy was made, evenhandler can use it instead of original file:
+-int eventhandler_use_copy;
++EXTERN int eventhandler_use_copy;
+ 
+ // 3.1.17: This defines how long to sleep while looping:
+-int sleeptime_mainprocess;
++EXTERN int sleeptime_mainprocess;
+ 
+ // 3.1.17: Defines how often PID is checked to detect if another smsd is running:
+-int check_pid_interval;
++EXTERN int check_pid_interval;
+ 
+ // 3.1.18: start script/program for mainprocess:
+-char mainprocess_start[PATH_MAX];
+-char mainprocess_start_args[PATH_MAX];
++EXTERN char mainprocess_start[PATH_MAX];
++EXTERN char mainprocess_start_args[PATH_MAX];
+ 
+-int message_count;              // Counter for sent messages. Multipart message is one message.
++EXTERN int message_count;              // Counter for sent messages. Multipart message is one message.
+ 
+-volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
+-volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
++EXTERN volatile sig_atomic_t break_workless_delay; // To break the delay when SIGCONT is received.
++EXTERN volatile sig_atomic_t terminate; // To terminate when SIGTERM is received.
+ 
+-char username[65];              // user and group name which are used to run.
+-char groupname[65];             // (max length is just a guess)
++EXTERN char username[65];              // user and group name which are used to run.
++EXTERN char groupname[65];             // (max length is just a guess)
+ 
+-char infofile[PATH_MAX];        // Hepler file for stopping the smsd smoothly.
+-char pidfile[PATH_MAX];         // File where a process id is stored.
++EXTERN char infofile[PATH_MAX];        // Hepler file for stopping the smsd smoothly.
++EXTERN char pidfile[PATH_MAX];         // File where a process id is stored.
+ 
+ // Command line arguments:
+-char arg_username[65];
+-char arg_groupname[65];
+-char arg_infofile[PATH_MAX];
+-char arg_pidfile[PATH_MAX];
+-char arg_logfile[PATH_MAX];
+-int arg_terminal;
++EXTERN char arg_username[65];
++EXTERN char arg_groupname[65];
++EXTERN char arg_infofile[PATH_MAX];
++EXTERN char arg_pidfile[PATH_MAX];
++EXTERN char arg_logfile[PATH_MAX];
++EXTERN int arg_terminal;
+ // 3.1.7:
+-char arg_7bit_packed[512];
+-int do_encode_decode_arg_7bit_packed;
++EXTERN char arg_7bit_packed[512];
++EXTERN int do_encode_decode_arg_7bit_packed;
+ 
+-int terminal;                   // 1 if smsd is communicating with terminal.
+-pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
+-char run_info[PATH_MAX];        // Information about external script/program execution.
++EXTERN int terminal;                   // 1 if smsd is communicating with terminal.
++EXTERN pid_t device_pids[NUMBER_OF_MODEMS]; // Pid's of modem processes.
++EXTERN char run_info[PATH_MAX];        // Information about external script/program execution.
+ 
+-char communicate[32];           // Device name for terminal communication mode.
++EXTERN char communicate[32];           // Device name for terminal communication mode.
+ 
+-char international_prefixes[PATH_MAX +1];
+-char national_prefixes[PATH_MAX +1];
++EXTERN char international_prefixes[PATH_MAX +1];
++EXTERN char national_prefixes[PATH_MAX +1];
+ 
+ // Storage for startup errors:
+-char *startup_err_str;
+-int startup_err_count;
++EXTERN char *startup_err_str;
++EXTERN int startup_err_count;
+ 
+ // Storage for PDU's:
+-char *incoming_pdu_store;
+-char *outgoing_pdu_store;
+-char *routed_pdu_store;
++EXTERN char *incoming_pdu_store;
++EXTERN char *outgoing_pdu_store;
++EXTERN char *routed_pdu_store;
+ 
+ // Storage for getfile errors:
+-char *getfile_err_store;
++EXTERN char *getfile_err_store;
+ 
+ // Text buffer for error messages:
+-char tb[SIZE_TB];
++EXTERN char tb[SIZE_TB];
+ 
+ // Buffer for SIM memory checking:
+-char *check_memory_buffer;
+-size_t check_memory_buffer_size;
++EXTERN char *check_memory_buffer;
++EXTERN size_t check_memory_buffer_size;
+ 
+-int os_cygwin;                  // 1 if we are on Cygwin.
++EXTERN int os_cygwin;                  // 1 if we are on Cygwin.
+ 
+-char language_file[PATH_MAX];   // File name of translated headers.
+-char yes_chars[SIZE_HEADER];    // Characters which mean "yes" in the yesno() question.
+-char no_chars[SIZE_HEADER];     // See details inside read_translation() function.
+-char yes_word[SIZE_HEADER];     // "yes" printed as an output.
+-char no_word[SIZE_HEADER];      // "no"
+-char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
+-char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
+-char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
+-int translate_incoming;         // 0 if incoming message headers are NOT transtaled.
++EXTERN char language_file[PATH_MAX];   // File name of translated headers.
++EXTERN char yes_chars[SIZE_HEADER];    // Characters which mean "yes" in the yesno() question.
++EXTERN char no_chars[SIZE_HEADER];     // See details inside read_translation() function.
++EXTERN char yes_word[SIZE_HEADER];     // "yes" printed as an output.
++EXTERN char no_word[SIZE_HEADER];      // "no"
++EXTERN char datetime_format[SIZE_HEADER]; // strftime format string for time stamps (not inside status reports).
++EXTERN char logtime_format[SIZE_HEADER]; // 3.1.7: strftime format string for logging time stamps
++EXTERN char date_filename_format[SIZE_HEADER]; // 3.1.7: strftime format string for date_filename
++EXTERN int translate_incoming;         // 0 if incoming message headers are NOT transtaled.
+ 
+ // 3.1.14:
+-int logtime_us;
+-int logtime_ms;
++EXTERN int logtime_us;
++EXTERN int logtime_ms;
+ 
+ // 3.1.14:
+-int shell_test;
++EXTERN int shell_test;
+ 
+ // Next two are for debugging purposes:
+-int enable_smsd_debug;
+-char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
++EXTERN int enable_smsd_debug;
++EXTERN char smsd_debug[SIZE_SMSD_DEBUG]; // Header of an outgoing message file.
+ 
+ // 3.1.20: Alt keys in communication mode:
+ #define COMMUNICATE_A_KEY_COUNT 10
+-char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
++EXTERN char communicate_a_keys[COMMUNICATE_A_KEY_COUNT][256];
+ 
+ /* initialize all variable with default values */
+ 
+diff --git a/src/stats.h b/src/stats.h
+index bd5cdc9..a614af1 100755
+--- a/src/stats.h
++++ b/src/stats.h
+@@ -33,17 +33,17 @@ typedef struct
+   int ber;
+ } _stats;
+ 
+-_stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
+-int rejected_counter;		// Statistic counter, rejected SM, number does not fit into any queue
+-time_t start_time;		// Start time of smsd, allows statistic functions
+-int printstatus;		// if 1 smsd outputs status on stdout
+-time_t last_stats;		// time when the last stats file was created
+-char d_stats[PATH_MAX];		// path to statistic files
+-int stats_interval;		// time between statistic files in seconds.
+-int stats_no_zeroes;		// Suppress files that contain only zeroes
+-int status_interval;            // time between updating status file in seconds
+-
+-char *shared_buffer;
++EXTERN _stats* statistics[NUMBER_OF_MODEMS]; // Statistic data (shared memory!)
++EXTERN int rejected_counter;		// Statistic counter, rejected SM, number does not fit into any queue
++EXTERN time_t start_time;		// Start time of smsd, allows statistic functions
++EXTERN int printstatus;		// if 1 smsd outputs status on stdout
++EXTERN time_t last_stats;		// time when the last stats file was created
++EXTERN char d_stats[PATH_MAX];		// path to statistic files
++EXTERN int stats_interval;		// time between statistic files in seconds.
++EXTERN int stats_no_zeroes;		// Suppress files that contain only zeroes
++EXTERN int status_interval;            // time between updating status file in seconds
++
++EXTERN char *shared_buffer;
+ 
+ /* Creates shared memory variables for statistic data */
+ 
+diff --git a/src/whitelist.c b/src/whitelist.c
+index 4ee7a69..3d90bf4 100755
+--- a/src/whitelist.c
++++ b/src/whitelist.c
+@@ -17,11 +17,11 @@ Either version 2 of the License, or (at your option) any later version.
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include "smsd_cfg.h"
+ #include "whitelist.h"
+ #include "extras.h"
+ #include "logging.h"
+ #include "alarm.h"
+-#include "smsd_cfg.h"
+ 
+ /* Used with >= 3.1x */
+ int inwhitelist_q(char* msisdn, char *queuename)
+diff --git a/src/whitelist.h b/src/whitelist.h
+index 88aea86..3f904f4 100755
+--- a/src/whitelist.h
++++ b/src/whitelist.h
+@@ -15,7 +15,7 @@ Either version 2 of the License, or (at your option) any later version.
+ #ifndef WHITE_H
+ #define WHITE_H
+ 
+-char whitelist[256];	// Filename of the white-list
++EXTERN char whitelist[256];	// Filename of the white-list
+ 
+ /* Used with >= 3.1x */
+ int inwhitelist_q(char* msisdn, char *queuename);
+-- 
+2.28.0
+
meta-oe/recipes-connectivity/smstools3/smstools3_3.1.21.bb +3 -1
index 6e6413b4bc..ca40957531 100644
@@ -7,7 +7,9 @@ HOMEPAGE = "http://smstools3.kekekasvi.com"
 
 SRC_URI = "http://smstools3.kekekasvi.com/packages/${BP}.tar.gz \
            file://sms_binpath.patch \
-           file://scripts_no_bash.patch"
+           file://scripts_no_bash.patch \
+           file://0001-Make-extern-declarations-to-avoid-duplicate-var-defi.patch \
+           "
 
 SRC_URI[md5sum] = "6a9f038fb38a49cc3a4f8f14a88fb8af"
 SRC_URI[sha256sum] = "a26ba4c02b16f6cf13177bffca6c9230dc5fefaeba8e3030cd4e4905f6a92084"
Signature · 1 line
2.28.0
author
#6 lore raw

PATCH 7/21 sblim-sfcb: Fix build with -fno-common

In reply to Khem Raj
---
 ...-variable-definition-in-header-files.patch | 100 ++++++++++++++++++
 ...d-for-error.h-when-it-does-not-exist.patch |   0
 ...tdint.h-system-header-for-UINT16_MAX.patch |   0
 ...m-sfcb-1.3.15-fix-provider-debugging.patch |   0
 .../sblim-sfcb-1.3.16-maxMsgLen.patch         |   0
 .../sblim-sfcb-1.3.16-multilib-man-cfg.patch  |   0
 ...sfcb-1.3.9-sfcbrepos-schema-location.patch |   0
 .../sblim-sfcb-1.4.5-service.patch            |   0
 ...m-sfcb-1.4.8-default-ecdh-curve-name.patch |   0
 .../sblim-sfcb-1.4.9-fix-ftbfs.patch          |   0
 .../sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch   |   0
 .../{files => sblim-sfcb}/sfcb.service        |   0
 .../sblim-sfcb/sblim-sfcb_1.4.9.bb            |   1 +
 13 files changed, 101 insertions(+)
 create mode 100644 meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-Avoid-variable-definition-in-header-files.patch
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/0001-Replace-need-for-error.h-when-it-does-not-exist.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/0001-include-stdint.h-system-header-for-UINT16_MAX.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.3.15-fix-provider-debugging.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.3.16-maxMsgLen.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.3.16-multilib-man-cfg.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.4.5-service.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.4.9-fix-ftbfs.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{sblim-sfcb-1.4.9 => sblim-sfcb}/sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch (100%)
 rename meta-oe/recipes-extended/sblim-sfcb/{files => sblim-sfcb}/sfcb.service (100%)
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-Avoid-variable-definition-in-header-files.patch new file +100 -0
new file mode 100644
index 0000000000..b0b43f357c
@@ -0,0 +1,100 @@
+From fccbb85beb89b9ca35cac87fb553ef124a6c516b Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 17:26:14 -0700
+Subject: [PATCH] Avoid variable definition in header files
+
+This can cause multiple definitions to be emitted into objects and link
+fail as a result with gcc-10+ since it defaults to -fno-common, patch
+moves the definitions to source files
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ control.h     | 2 +-
+ providerMgr.c | 1 +
+ providerMgr.h | 2 +-
+ sfcBroker.c   | 2 +-
+ trace.c       | 1 +
+ trace.h       | 2 +-
+ 6 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/control.h b/control.h
+index e41e4b9..5e15363 100644
+--- a/control.h
++++ b/control.h
+@@ -28,7 +28,7 @@ int             getControlUNum(char *id, unsigned int *val);
+ int             getControlULong(char *id, unsigned long *val);
+ int             getControlNum(char *id, long *val);
+ int             getControlBool(char *id, int *val);
+-const char      * sfcBrokerStart;
++extern const char * sfcBrokerStart;
+ 
+ #endif
+ /* MODELINES */
+diff --git a/providerMgr.c b/providerMgr.c
+index c38a7d3..ff6d38d 100644
+--- a/providerMgr.c
++++ b/providerMgr.c
+@@ -53,6 +53,7 @@
+ #define SFCB_ASM(x)
+ #endif
+ 
++sigset_t mask, old_mask;
+ static pthread_mutex_t resultsocketMutex = PTHREAD_MUTEX_INITIALIZER;
+ 
+ extern CMPIBroker *Broker;
+diff --git a/providerMgr.h b/providerMgr.h
+index 3cc7745..fbbfecd 100644
+--- a/providerMgr.h
++++ b/providerMgr.h
+@@ -398,7 +398,7 @@ BinResponseHdr **invokeProviders(BinRequestContext * binCtx, int *err,
+ BinResponseHdr *invokeProvider(BinRequestContext * ctx);
+ void            freeResponseHeaders(BinResponseHdr ** resp,
+                                     BinRequestContext * ctx);
+-sigset_t mask, old_mask;
++extern sigset_t mask, old_mask;
+ 
+ #endif
+ /* MODELINES */
+diff --git a/sfcBroker.c b/sfcBroker.c
+index ca043c9..85581f5 100644
+--- a/sfcBroker.c
++++ b/sfcBroker.c
+@@ -53,7 +53,7 @@
+ #endif
+ 
+ int             sfcBrokerPid = 0;
+-
++const char     *sfcBrokerStart;
+ extern int      sfcbUseSyslog;
+ 
+ extern void     setExFlag(unsigned long f);
+diff --git a/trace.c b/trace.c
+index 438af46..23597e1 100644
+--- a/trace.c
++++ b/trace.c
+@@ -52,6 +52,7 @@ char           *processName = NULL;
+ int             providerProcess = 0;
+ int             idleThreadId = 0;
+ int             terminating = 0;
++int             colorTrace;
+ 
+ int             _sfcb_debug = 0;
+ unsigned long   _sfcb_trace_mask = 0;
+diff --git a/trace.h b/trace.h
+index 2c6d8be..ea39850 100644
+--- a/trace.h
++++ b/trace.h
+@@ -130,7 +130,7 @@ typedef struct traceId {
+ #define CYAN            6
+ #define WHITE           7
+ void            changeTextColor(int reset);
+-int             colorTrace;
++extern int      colorTrace;
+ 
+ #define MAX_MSG_SIZE 1024       /* max length of trace message */
+ 
+-- 
+2.28.0
+
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-Replace-need-for-error.h-when-it-does-not-exist.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-Replace-need-for-error.h-when-it-does-not-exist.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-Replace-need-for-error.h-when-it-does-not-exist.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-Replace-need-for-error.h-when-it-does-not-exist.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-include-stdint.h-system-header-for-UINT16_MAX.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-include-stdint.h-system-header-for-UINT16_MAX.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/0001-include-stdint.h-system-header-for-UINT16_MAX.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/0001-include-stdint.h-system-header-for-UINT16_MAX.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.15-fix-provider-debugging.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.15-fix-provider-debugging.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.15-fix-provider-debugging.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.15-fix-provider-debugging.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.16-maxMsgLen.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.16-maxMsgLen.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.16-maxMsgLen.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.16-maxMsgLen.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.16-multilib-man-cfg.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.16-multilib-man-cfg.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.16-multilib-man-cfg.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.16-multilib-man-cfg.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.5-service.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.5-service.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.5-service.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.5-service.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.9-fix-ftbfs.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.9-fix-ftbfs.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.9-fix-ftbfs.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.9-fix-ftbfs.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch renamed from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb-1.4.9/sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sfcb.service renamed from meta-oe/recipes-extended/sblim-sfcb/files/sfcb.service +0 -0
similarity index 100%
rename from meta-oe/recipes-extended/sblim-sfcb/files/sfcb.service
rename to meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb/sfcb.service
meta-oe/recipes-extended/sblim-sfcb/sblim-sfcb_1.4.9.bb +1 -0
index a527f773a6..3e4ed7c03c 100644
@@ -26,6 +26,7 @@ SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
            file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
            file://0001-Replace-need-for-error.h-when-it-does-not-exist.patch \
            file://sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch \
+           file://0001-Avoid-variable-definition-in-header-files.patch \
 "
 
 SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
Signature · 1 line
2.28.0
author
#7 lore raw

PATCH 8/21 cdrkit: Fix build with -fno-common

In reply to Khem Raj
---
 .../cdrkit/cdrkit_1.1.11.bb                   |  1 +
 ...oimage-Add-missing-extern-definition.patch | 29 +++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 meta-oe/recipes-multimedia/cdrkit/files/0001-genisoimage-Add-missing-extern-definition.patch
meta-oe/recipes-multimedia/cdrkit/cdrkit_1.1.11.bb +1 -0
index 3b10e978ef..ebb95cf782 100644
@@ -10,6 +10,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/c/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://0001-genisoimage-Fix-fprintf-format-errors.patch \
            file://0001-define-__THROW-to-avoid-build-issue-with-musl.patch \
            file://0002-Do-not-use-rcmd-on-build-with-musl.patch \
+           file://0001-genisoimage-Add-missing-extern-definition.patch \
            "
 SRC_URI[md5sum] = "efe08e2f3ca478486037b053acd512e9"
 SRC_URI[sha256sum] = "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da"
meta-oe/recipes-multimedia/cdrkit/files/0001-genisoimage-Add-missing-extern-definition.patch new file +29 -0
new file mode 100644
index 0000000000..809d3afd76
@@ -0,0 +1,29 @@
+From fd5251cc8b82ce7a5f907c5129969097d75609fe Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 17:38:59 -0700
+Subject: [PATCH] genisoimage: Add missing extern definition
+
+Fixed build with gcc10
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ genisoimage/genisoimage.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/genisoimage/genisoimage.h b/genisoimage/genisoimage.h
+index bbedfb0..82c859b 100644
+--- a/genisoimage/genisoimage.h
++++ b/genisoimage/genisoimage.h
+@@ -376,7 +376,7 @@ extern int	use_fileversion;
+ extern int	split_SL_component;
+ extern int	split_SL_field;
+ extern char	*trans_tbl;
+-char		*outfile;
++extern char	*outfile;
+ 
+ #define	JMAX		64	/* maximum Joliet file name length (spec) */
+ #define	JLONGMAX	103	/* out of spec Joliet file name length */
+-- 
+2.28.0
+
Signature · 1 line
2.28.0
author
#8 lore raw

PATCH 9/21 openocd: Fix build with gcc10/-fno-common

In reply to Khem Raj
---
 ...g-Make-bitbang_swd-extern-definition.patch | 42 +++++++++++++++++++
 .../recipes-devtools/openocd/openocd_git.bb   |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch
meta-oe/recipes-devtools/openocd/openocd/0001-bitbang-Make-bitbang_swd-extern-definition.patch new file +42 -0
new file mode 100644
index 0000000000..d42b628dae
@@ -0,0 +1,42 @@
+From 428f9f3c4a5be973e4c7fc1325ae9dbe41040df2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 17:47:35 -0700
+Subject: [PATCH] bitbang: Make bitbang_swd extern definition
+
+Fixes build with gcc10+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/jtag/drivers/bitbang.c | 1 +
+ src/jtag/drivers/bitbang.h | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/jtag/drivers/bitbang.c b/src/jtag/drivers/bitbang.c
+index b5078c080..f8612aade 100644
+--- a/src/jtag/drivers/bitbang.c
++++ b/src/jtag/drivers/bitbang.c
+@@ -43,6 +43,7 @@ static int bitbang_stableclocks(int num_cycles);
+ static void bitbang_swd_write_reg(uint8_t cmd, uint32_t value, uint32_t ap_delay_clk);
+ 
+ struct bitbang_interface *bitbang_interface;
++const struct swd_driver bitbang_swd;
+ 
+ /* DANGER!!!! clock absolutely *MUST* be 0 in idle or reset won't work!
+  *
+diff --git a/src/jtag/drivers/bitbang.h b/src/jtag/drivers/bitbang.h
+index 577717ebd..0faf5d9ae 100644
+--- a/src/jtag/drivers/bitbang.h
++++ b/src/jtag/drivers/bitbang.h
+@@ -57,7 +57,7 @@ struct bitbang_interface {
+ 	void (*swdio_drive)(bool on);
+ };
+ 
+-const struct swd_driver bitbang_swd;
++extern const struct swd_driver bitbang_swd;
+ 
+ extern bool swd_mode;
+ 
+-- 
+2.28.0
+
meta-oe/recipes-devtools/openocd/openocd_git.bb +1 -0
index f01b224fac..c7d754fdba 100644
@@ -10,6 +10,7 @@ SRC_URI = " \
     git://repo.or.cz/r/jimtcl.git;protocol=http;destsuffix=git/jimtcl;name=jimtcl \
     git://repo.or.cz/r/libjaylink.git;protocol=http;destsuffix=git/src/jtag/drivers/libjaylink;name=libjaylink \
     file://0001-Do-not-include-syscrtl.h-with-glibc.patch \
+    file://0001-bitbang-Make-bitbang_swd-extern-definition.patch \
 "
 
 SRCREV_FORMAT = "openocd"
Signature · 1 line
2.28.0
author
#9 lore raw

PATCH 10/21 liblbxutil: Fix build with gcc10/-fno-common

In reply to Khem Raj
---
 ...lbx_zlib-Mark-declration-with-extern.patch | 36 +++++++++++++++++++
 .../xorg-lib/liblbxutil_1.1.0.bb              |  4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-graphics/xorg-lib/liblbxutil-1.1.0/0001-lbx_zlib-Mark-declration-with-extern.patch
meta-oe/recipes-graphics/xorg-lib/liblbxutil-1.1.0/0001-lbx_zlib-Mark-declration-with-extern.patch new file +36 -0
new file mode 100644
index 0000000000..32a24b4be1
@@ -0,0 +1,36 @@
+From 95ed4b743f197e20f1884a326d5a7128187a7ba6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 17:56:30 -0700
+Subject: [PATCH] lbx_zlib: Mark declration with extern
+
+Fixes build with gcc10/-fno-common
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lbx_zlib/lbx_zlib.h | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/lbx_zlib/lbx_zlib.h b/src/lbx_zlib/lbx_zlib.h
+index 8ae8956..bec3b96 100644
+--- a/src/lbx_zlib/lbx_zlib.h
++++ b/src/lbx_zlib/lbx_zlib.h
+@@ -136,9 +136,9 @@ extern void Xfree(pointer /*ptr*/);
+ #endif
+ 
+ /* lbx_zlib.c */
+-unsigned long stream_out_compressed;
+-unsigned long stream_out_uncompressed;
+-unsigned long stream_out_plain;
+-unsigned long stream_in_compressed;
+-unsigned long stream_in_uncompressed;
+-unsigned long stream_in_plain;
++extern unsigned long stream_out_compressed;
++extern unsigned long stream_out_uncompressed;
++extern unsigned long stream_out_plain;
++extern unsigned long stream_in_compressed;
++extern unsigned long stream_in_uncompressed;
++extern unsigned long stream_in_plain;
+-- 
+2.28.0
+
meta-oe/recipes-graphics/xorg-lib/liblbxutil_1.1.0.bb +3 -1
index 3e5c31a05d..58b4f31b17 100644
@@ -7,7 +7,9 @@ DEPENDS += " xorgproto zlib"
 PE = "1"
 PR = "r11"
 
-SRC_URI += "file://mkg3states-1.1.patch"
+SRC_URI += "file://mkg3states-1.1.patch \
+            file://0001-lbx_zlib-Mark-declration-with-extern.patch \
+           "
 SRC_URI[md5sum] = "273329a78c2e9ea189ac416c7fde94a1"
 SRC_URI[sha256sum] = "c6b6ff7858ec619cafa8205debca6bf78c5610a2844a782ed643c7fd017cf8ae"
 
Signature · 1 line
2.28.0
author
#10 lore raw

PATCH 11/21 mg: Upgrade to 20200723 tag

In reply to Khem Raj

Fixes build with gcc10

---
 ...ndefine-REGEX-for-musl-based-systems.patch | 19 ++++++-------------
 ...io-Include-sys-param.h-for-MAXNAMLEN.patch |  5 -----
 ...e-DEFFILEMODE-if-platform-is-missing.patch | 11 +++--------
 .../mg/{mg_20170401.bb => mg_20200723.bb}     |  7 ++++---
 4 files changed, 13 insertions(+), 29 deletions(-)
 rename meta-oe/recipes-support/mg/{mg_20170401.bb => mg_20200723.bb} (82%)
meta-oe/recipes-support/mg/mg/0001-Undefine-REGEX-for-musl-based-systems.patch +6 -13
index 1302679315..9c154a1734 100644
@@ -9,31 +9,24 @@ Signed-off-by: Khem Raj <[email protected]>
  Makefile    | 2 +-
  2 files changed, 1 insertion(+), 2 deletions(-)
 
-diff --git a/GNUmakefile b/GNUmakefile
-index 7bf7dca..0e10030 100644
 --- a/GNUmakefile
 +++ b/GNUmakefile
-@@ -41,7 +41,6 @@ endif
+@@ -45,7 +45,6 @@ endif
  CC?=		gcc
  CFLAGS?=	-O2 -pipe
  CFLAGS+=	-g -Wall
 -CPPFLAGS=	-DREGEX
  CPPFLAGS+=	-D_GNU_SOURCE
- CPPFLAGS+=	$(BSD_CPPFLAGS) -D__dead=__dead2
+ CPPFLAGS+=	$(BSD_CPPFLAGS)
  LIBS=		$(CURSES_LIBS) $(BSD_LIBS)
-diff --git a/Makefile b/Makefile
-index 94ce340..d516bbc 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -10,7 +10,7 @@ DPADD+=	${LIBCURSES} ${LIBUTIL}
- #	REGEX		-- create regular expression functions.
+@@ -11,7 +11,7 @@ DPADD+=	${LIBUTIL}
  #	STARTUPFILE	-- look for and handle initialization file.
+ #	MGLOG		-- debug mg internals to a log file.
  #
--CFLAGS+=-Wall -DREGEX
-+CFLAGS+=-Wall
+-CFLAGS+=-Wall -DREGEX `pkg-config --cflags-only-I ncurses`
++CFLAGS+=-Wall `pkg-config --cflags-only-I ncurses`
  
  SRCS=	autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \
  	echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \
--- 
-2.12.2
-
meta-oe/recipes-support/mg/mg/0001-fileio-Include-sys-param.h-for-MAXNAMLEN.patch +0 -5
index 551f1df163..8e8c2b9025 100644
@@ -8,8 +8,6 @@ Signed-off-by: Khem Raj <[email protected]>
  fileio.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/fileio.c b/fileio.c
-index 48a67a2..9b69665 100644
 --- a/fileio.c
 +++ b/fileio.c
 @@ -12,6 +12,7 @@
@@ -20,6 +18,3 @@ index 48a67a2..9b69665 100644
  #include <dirent.h>
  #include <errno.h>
  #include <fcntl.h>
--- 
-2.12.2
-
meta-oe/recipes-support/mg/mg/0002-fileio-Define-DEFFILEMODE-if-platform-is-missing.patch +3 -8
index 907d67064a..bdd7632be6 100644
@@ -8,13 +8,11 @@ Signed-off-by: Khem Raj <[email protected]>
  fileio.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/fileio.c b/fileio.c
-index 9b69665..a852fd2 100644
 --- a/fileio.c
 +++ b/fileio.c
-@@ -28,6 +28,10 @@
- #include "kbd.h"
- #include "pathnames.h"
+@@ -36,6 +36,10 @@
+ #define DEFFILEMODE 0666
+ #endif
  
 +#if !defined(DEFFILEMODE)
 +# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
@@ -23,6 +21,3 @@ index 9b69665..a852fd2 100644
  static char *bkuplocation(const char *);
  static int   bkupleavetmp(const char *);
  
--- 
-2.12.2
-
meta-oe/recipes-support/mg/mg_20200723.bb renamed from meta-oe/recipes-support/mg/mg_20170401.bb +4 -3
similarity index 82%
rename from meta-oe/recipes-support/mg/mg_20170401.bb
rename to meta-oe/recipes-support/mg/mg_20200723.bb
index dad1d008bf..b73f937565 100644
@@ -5,15 +5,16 @@ LIC_FILES_CHKSUM = "file://version.c;md5=1895eb37bf6bd79cdc5c89d8166fabfb"
 DEPENDS = "ncurses libbsd"
 SECTION = "console/editors"
 
-SRC_URI = "http://homepage.boetes.org/software/mg/mg-${PV}.tar.gz \
+SRCREV = "60fa3582f5f735b9d43825f5bdcc4ea5f0740f91"
+SRC_URI = "git://github.com/hboetes/mg \
            file://0001-fileio-Include-sys-param.h-for-MAXNAMLEN.patch \
            file://0002-fileio-Define-DEFFILEMODE-if-platform-is-missing.patch \
            "
 SRC_URI_append_libc-musl = "\
            file://0001-Undefine-REGEX-for-musl-based-systems.patch \
            "
-SRC_URI[md5sum] = "884388589fb38c2109ad9fed328be20a"
-SRC_URI[sha256sum] = "0a3608b17c153960cb1d954ca3b62445a77c0c1a18aa5c8c58aba9f6b8d62aab"
+
+S = "${WORKDIR}/git"
 
 # CFLAGS isn't in EXTRA_OEMAKE, as the makefile picks it up via ?=
 EXTRA_OEMAKE = "\
Signature · 1 line
2.28.0
author
#11 lore raw

PATCH 12/21 libforms: Fix build with -fno-common

In reply to Khem Raj
---
 ...e-extern-declarations-in-header-file.patch | 46 +++++++++++++++++++
 .../libforms/libforms_1.2.3.bb                |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/libforms/files/0001-Make-extern-declarations-in-header-file.patch
meta-oe/recipes-graphics/libforms/files/0001-Make-extern-declarations-in-header-file.patch new file +46 -0
new file mode 100644
index 0000000000..619bad6d02
@@ -0,0 +1,46 @@
+From a57c498f6c25aa297e49533c242525f2b9da7048 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 18:20:42 -0700
+Subject: [PATCH] Make extern declarations in header file
+
+curobj is a static object in other places as well.
+Fixes build with gcc10/-fno-common
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ fdesign/sp_spinner.c | 2 +-
+ lib/flinternal.h     | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/fdesign/sp_spinner.c b/fdesign/sp_spinner.c
+index 04f2c19..6206daa 100644
+--- a/fdesign/sp_spinner.c
++++ b/fdesign/sp_spinner.c
+@@ -29,7 +29,7 @@
+ #include "spec/spinner_spec.h"
+ 
+ static FD_spinnerattrib * spn_attrib;
+-FL_OBJECT *curobj;
++static FL_OBJECT *curobj;
+ 
+ 
+ /***************************************
+diff --git a/lib/flinternal.h b/lib/flinternal.h
+index 06d847e..577bd10 100644
+--- a/lib/flinternal.h
++++ b/lib/flinternal.h
+@@ -138,8 +138,8 @@ enum {
+ 
+ /* events.c or event related */
+ 
+-FL_OBJECT * fli_handled_obj;
+-FL_OBJECT * fli_handled_parent;
++extern FL_OBJECT * fli_handled_obj;
++extern FL_OBJECT * fli_handled_parent;
+ 
+ void fli_obj_queue_delete( void );
+ 
+-- 
+2.28.0
+
meta-oe/recipes-graphics/libforms/libforms_1.2.3.bb +1 -0
index 999d53d4a9..35029f5176 100644
@@ -9,6 +9,7 @@ SRC_URI = "http://download.savannah.nongnu.org/releases/xforms/xforms-${PV}.tar.
            file://fix-link-to-xforms-man.patch \
            file://add-absolute-path-for-include-dir.patch \
            file://fix-path-fdesign_LDADD.patch \
+           file://0001-Make-extern-declarations-in-header-file.patch \
           "
 
 SRC_URI[md5sum] = "235720a758a8b8d9e6e452dc67190e9b"
Signature · 1 line
2.28.0
author
#12 lore raw

PATCH 13/21 wifi-test-suite: Update to latest tip

In reply to Khem Raj

Fix build with gcc10/-fno-common

---
 .../wifi-test-suite/files/fno-common.patch    | 29 +++++++++++++++++++
 .../wifi-test-suite/wifi-test-suite_git.bb    |  3 +-
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch
meta-oe/recipes-connectivity/wifi-test-suite/files/fno-common.patch new file +29 -0
new file mode 100644
index 0000000000..fc5e2e99c5
@@ -0,0 +1,29 @@
+Mark extern variables with 'extern' keyword
+
+This ensures that compilers with -fno-common does not generate multiple definitions
+
+Upstream-Status: Pending
+Signedd-off-by: Khem Raj <[email protected]>
+
+--- a/lib/wfa_cs.c
++++ b/lib/wfa_cs.c
+@@ -71,7 +71,7 @@ int wfaExecuteCLI(char *CLI);
+ 
+ /* Since the two definitions are used all over the CA function */
+ char gCmdStr[WFA_CMD_STR_SZ];
+-dutCmdResponse_t gGenericResp;
++extern dutCmdResponse_t gGenericResp;
+ int wfaTGSetPrio(int sockfd, int tgClass);
+ void create_apts_msg(int msg, unsigned int txbuf[],int id);
+ 
+--- a/lib/wfa_thr.c
++++ b/lib/wfa_thr.c
+@@ -41,7 +41,7 @@
+ /*
+  * external global thread sync variables
+  */
+-tgWMM_t wmm_thr[WFA_THREADS_NUM];
++extern tgWMM_t wmm_thr[WFA_THREADS_NUM];
+ extern int resetsnd;
+ extern int resetrcv;
+ extern int newCmdOn;
meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb +2 -1
index 99cfb32051..cb39f5a0e1 100644
@@ -8,12 +8,13 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=0542427ed5c315ca34aa09ae7a85ed32"
 SECTION = "test"
 
 S = "${WORKDIR}/git"
-SRCREV = "f7a8d7ef7d1a831c1bb47de21fa083536ea2f3a9"
+SRCREV = "2da947374c8324f88a0e2155aeba4cf75464b0d8"
 SRC_URI = "git://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT.git \
 	file://0001-Use-toolchain-from-environment-variables.patch \
 	file://0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch \
 	file://0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch \
 	file://0004-run-ranlib-per-library-and-use-AR.patch \
+        file://fno-common.patch \
 "
 
 # to avoid host path QA error
Signature · 1 line
2.28.0
author
#13 lore raw

PATCH 14/21 xf86-video-ati: Fix link failure with gcc 10

In reply to Khem Raj
---
 .../0001-Fix-link-failure-with-gcc-10.patch   | 34 +++++++++++++++++++
 .../xorg-driver/xf86-video-ati_19.0.1.bb      |  2 ++
 2 files changed, 36 insertions(+)
 create mode 100644 meta-oe/recipes-graphics/xorg-driver/xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch
meta-oe/recipes-graphics/xorg-driver/xf86-video-ati/0001-Fix-link-failure-with-gcc-10.patch new file +34 -0
new file mode 100644
index 0000000000..7dfa233423
@@ -0,0 +1,34 @@
+From cebbeaa9d0bdc18377faef27ea9ffd38e509d180 Mon Sep 17 00:00:00 2001
+From: Adam Jackson <[email protected]>
+Date: Tue, 4 Feb 2020 16:38:06 -0500
+Subject: [PATCH] Fix link failure with gcc 10
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Without the 'extern' this looks like a definition not just a
+declaration, in every file that includes the header. gcc 10 is stricter
+about this kind of multiple definition.
+
+Upstream-Status: Backport [https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=f223035f4ffcff2a9296d1e907a5193f8e8845a3]
+Reviewed-by: Michel Dänzer <[email protected]>
+---
+ src/drmmode_display.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/drmmode_display.h b/src/drmmode_display.h
+index 96eaef0..8cd8a0a 100644
+--- a/src/drmmode_display.h
++++ b/src/drmmode_display.h
+@@ -262,7 +262,7 @@ Bool drmmode_wait_vblank(xf86CrtcPtr crtc, drmVBlankSeqType type,
+ 			 uint64_t *ust, uint32_t *result_seq);
+ 
+ 
+-miPointerSpriteFuncRec drmmode_sprite_funcs;
++extern miPointerSpriteFuncRec drmmode_sprite_funcs;
+ 
+ 
+ #endif
+-- 
+2.28.0
+
meta-oe/recipes-graphics/xorg-driver/xf86-video-ati_19.0.1.bb +2 -0
index 4042150b1a..d3395496af 100644
@@ -12,6 +12,8 @@ DEPENDS += "virtual/libx11 libxvmc drm \
 inherit features_check
 REQUIRED_DISTRO_FEATURES += "opengl"
 
+SRC_URI += "file://0001-Fix-link-failure-with-gcc-10.patch"
+
 SRC_URI[md5sum] = "47eccf71823206ade9629cba69de7ef6"
 SRC_URI[sha256sum] = "5cb6015d8664546ad1311bc9c363d7bc41ebf60e7046ceb44dd38e5b707961b0"
 
Signature · 1 line
2.28.0
author
#14 lore raw

PATCH 15/21 ifplugd: Fix build with gcc10/-fno-common

In reply to Khem Raj
---
 ...erface.h-Make-declarations-as-extern.patch | 31 +++++++++++++++++++
 .../ifplugd/ifplugd_0.28.bb                   |  4 ++-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-connectivity/ifplugd/ifplugd/0001-src-interface.h-Make-declarations-as-extern.patch
meta-oe/recipes-connectivity/ifplugd/ifplugd/0001-src-interface.h-Make-declarations-as-extern.patch new file +31 -0
new file mode 100644
index 0000000000..77de9e6c52
@@ -0,0 +1,31 @@
+From b990146a149e1729c12e4541a67e32ed1dd6e578 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 19:41:08 -0700
+Subject: [PATCH] src/interface.h: Make declarations as extern
+
+Fixed build with -fno-common
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/interface.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/interface.h b/src/interface.h
+index d223b1f..fd4a5f4 100644
+--- a/src/interface.h
++++ b/src/interface.h
+@@ -21,8 +21,8 @@
+  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+  */
+ 
+-int interface_auto_up;
+-int interface_do_message;
++extern int interface_auto_up;
++extern int interface_do_message;
+ 
+ typedef enum { IFSTATUS_UP, IFSTATUS_DOWN, IFSTATUS_ERR } interface_status_t;
+ 
+-- 
+2.28.0
+
meta-oe/recipes-connectivity/ifplugd/ifplugd_0.28.bb +3 -1
index 0b5c5a6ce8..7dc83e85f7 100644
@@ -6,7 +6,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=94d55d512a9ba36caa9b7df079bae19f"
 
 DEPENDS = "libdaemon"
 
-SRC_URI = "http://0pointer.de/lennart/projects/ifplugd/ifplugd-${PV}.tar.gz"
+SRC_URI = "http://0pointer.de/lennart/projects/ifplugd/ifplugd-${PV}.tar.gz \
+           file://0001-src-interface.h-Make-declarations-as-extern.patch \
+          "
 
 SRC_URI_append_libc-musl = " file://Fix-build-with-musl.patch"
 
Signature · 1 line
2.28.0
author
#15 lore raw

PATCH 16/21 tcsh: Fix build with -fno-common

In reply to Khem Raj
---
 ...move-defining-handle_interrupt-twice.patch | 28 +++++++++++++++++++
 meta-oe/recipes-shells/tcsh/tcsh_6.22.02.bb   |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-shells/tcsh/tcsh/0001-Remove-defining-handle_interrupt-twice.patch
meta-oe/recipes-shells/tcsh/tcsh/0001-Remove-defining-handle_interrupt-twice.patch new file +28 -0
new file mode 100644
index 0000000000..d6d6ae06de
@@ -0,0 +1,28 @@
+From 2c77b61506aa867a873e3691214983b3eb7f652d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 13 Aug 2020 19:49:35 -0700
+Subject: [PATCH] Remove defining handle_interrupt twice
+
+Fixes build with -fno-common
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tc.sig.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/tc.sig.c b/tc.sig.c
+index 77659ca..576605a 100644
+--- a/tc.sig.c
++++ b/tc.sig.c
+@@ -56,7 +56,6 @@ int alrmcatch_disabled; /* = 0; */
+ int phup_disabled; /* = 0; */
+ int pchild_disabled; /* = 0; */
+ int pintr_disabled; /* = 0; */
+-int handle_interrupt; /* = 0; */
+ 
+ int
+ handle_pending_signals(void)
+-- 
+2.28.0
+
meta-oe/recipes-shells/tcsh/tcsh_6.22.02.bb +1 -0
index b30c3434e4..541f5505f3 100644
@@ -12,6 +12,7 @@ SRC_URI = " \
     https://astron.com/pub/${BPN}/${BP}.tar.gz \
     file://0001-Enable-system-malloc-on-all-linux.patch \
     file://0002-Add-debian-csh-scripts.patch \
+    file://0001-Remove-defining-handle_interrupt-twice.patch \
 "
 SRC_URI[md5sum] = "f34909eab33733aecc05d27adc82277b"
 SRC_URI[sha256sum] = "ed287158ca1b00ba477e8ea57bac53609838ebcfd05fcb05ca95021b7ebe885b"
Signature · 1 line
2.28.0
author
#16 lore raw

PATCH 17/21 makedumpfile: Fix build with -fno-common

In reply to Khem Raj
---
 ...move-duplicated-variable-definitions.patch | 104 ++++++++++++++++++
 .../makedumpfile/makedumpfile_1.6.7.bb        |   1 +
 2 files changed, 105 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch
meta-oe/recipes-kernel/makedumpfile/makedumpfile/0001-PATCH-Remove-duplicated-variable-definitions.patch new file +104 -0
new file mode 100644
index 0000000000..49777bcee9
@@ -0,0 +1,104 @@
+From 399f2c9a3acd5bd913e50a4dde52dee6527b297e Mon Sep 17 00:00:00 2001
+From: Kairui Song <[email protected]>
+Date: Wed, 29 Jan 2020 13:37:13 +0800
+Subject: [PATCH] [PATCH] Remove duplicated variable definitions
+
+When building on Fedora 32 (with GCC 10), following error is observed:
+
+/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2010: multiple definition of
+ `crash_reserved_mem_nr'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2010: first defined here
+/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:2009: multiple definition of
+ `crash_reserved_mem'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:2009: first defined here
+/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1278: multiple definition of
+ `parallel_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1278: first defined here
+/usr/bin/ld: erase_info.o:/tmp/makedumpfile/makedumpfile.h:1265: multiple definition of
+ `splitting_info_t'; elf_info.o:/tmp/makedumpfile/makedumpfile.h:1265: first defined here
+...
+collect2: error: ld returned 1 exit status
+make: *** [Makefile:97: makedumpfile] Error 1
+
+These variables are wrongly defined multiple times. So remove the
+duplicated definitions.
+
+Upstream-Status: Backport [https://github.com/kraj/makedumpfile/commit/399f2c9a3acd5bd913e50a4dde52dee6527b297e]
+Signed-off-by: Kairui Song <[email protected]>
+Signed-off-by: Kazuhito Hagio <[email protected]>
+---
+ makedumpfile.c | 8 ++++----
+ makedumpfile.h | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/makedumpfile.c b/makedumpfile.c
+index e290fbd..ae7336a 100644
+--- a/makedumpfile.c
++++ b/makedumpfile.c
+@@ -10954,7 +10954,7 @@ check_param_for_reassembling_dumpfile(int argc, char *argv[])
+ 		return FALSE;
+ 
+ 	if ((info->splitting_info
+-	    = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
++	    = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
+ 	    == NULL) {
+ 		MSG("Can't allocate memory for splitting_info.\n");
+ 		return FALSE;
+@@ -11042,7 +11042,7 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
+ 			return FALSE;
+ 		}
+ 		if ((info->splitting_info
+-		    = malloc(sizeof(splitting_info_t) * info->num_dumpfile))
++		    = malloc(sizeof(struct splitting_info) * info->num_dumpfile))
+ 		    == NULL) {
+ 			MSG("Can't allocate memory for splitting_info.\n");
+ 			return FALSE;
+@@ -11077,13 +11077,13 @@ check_param_for_creating_dumpfile(int argc, char *argv[])
+ 
+ 	if (info->num_threads) {
+ 		if ((info->parallel_info =
+-		     malloc(sizeof(parallel_info_t) * info->num_threads))
++		     malloc(sizeof(struct parallel_info) * info->num_threads))
+ 		    == NULL) {
+ 			MSG("Can't allocate memory for parallel_info.\n");
+ 			return FALSE;
+ 		}
+ 
+-		memset(info->parallel_info, 0, sizeof(parallel_info_t)
++		memset(info->parallel_info, 0, sizeof(struct parallel_info)
+ 							* info->num_threads);
+ 	}
+ 
+diff --git a/makedumpfile.h b/makedumpfile.h
+index 68d9691..7217407 100644
+--- a/makedumpfile.h
++++ b/makedumpfile.h
+@@ -1262,7 +1262,7 @@ struct splitting_info {
+ 	mdf_pfn_t		end_pfn;
+ 	off_t			offset_eraseinfo;
+ 	unsigned long		size_eraseinfo;
+-} splitting_info_t;
++};
+ 
+ struct parallel_info {
+ 	int			fd_memory;
+@@ -1275,7 +1275,7 @@ struct parallel_info {
+ #ifdef USELZO
+ 	lzo_bytep		wrkmem;
+ #endif
+-} parallel_info_t;
++};
+ 
+ struct ppc64_vmemmap {
+ 	unsigned long		phys;
+@@ -2006,8 +2006,8 @@ struct memory_range {
+ };
+ 
+ #define CRASH_RESERVED_MEM_NR   8
+-struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
+-int crash_reserved_mem_nr;
++extern struct memory_range crash_reserved_mem[CRASH_RESERVED_MEM_NR];
++extern int crash_reserved_mem_nr;
+ 
+ unsigned long read_vmcoreinfo_symbol(char *str_symbol);
+ int readmem(int type_addr, unsigned long long addr, void *bufptr, size_t size);
+-- 
+2.28.0
+
meta-oe/recipes-kernel/makedumpfile/makedumpfile_1.6.7.bb +1 -0
index 8d1676a4c6..165e192cb1 100644
@@ -24,6 +24,7 @@ SRC_URI = "\
     ${SOURCEFORGE_MIRROR}/makedumpfile/${BPN}-${PV}.tar.gz \
     file://0001-makedumpfile-replace-hardcode-CFLAGS.patch \
     file://0002-mem_section-Support-only-46-bit-for-MAX_PHYSMEM_BITS.patch \
+    file://0001-PATCH-Remove-duplicated-variable-definitions.patch \
 "
 SRC_URI[md5sum] = "808ef840ca49ca6bfde77c097cf429f5"
 SRC_URI[sha256sum] = "e702fbdf62b4cd829a76e46f3e24eb3fc7501918b85ebdcd8baef4f53d6ee2c8"
Signature · 1 line
2.28.0
author
#17 lore raw

PATCH 18/21 nodejs: Upgrade to 12.18.3

In reply to Khem Raj

Drop already upstreamed patches
use builtin uv, it does not build without it

---
 ...-passing-multiple-libs-to-pkg_config.patch |  41 ----
 .../0001-deps-V8-backport-3f8dc4b2e5ba.patch  | 194 ------------------
 ...allow-use-of-system-installed-brotli.patch |  66 ------
 ...Install-both-binaries-and-use-libdir.patch |  28 +--
 .../{nodejs_12.14.1.bb => nodejs_12.18.3.bb}  |  12 +-
 5 files changed, 14 insertions(+), 327 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch
 delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-V8-backport-3f8dc4b2e5ba.patch
 delete mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch
 rename meta-oe/recipes-devtools/nodejs/{nodejs_12.14.1.bb => nodejs_12.18.3.bb} (93%)
meta-oe/recipes-devtools/nodejs/nodejs/0001-build-allow-passing-multiple-libs-to-pkg_config.patch deleted +0 -41
deleted file mode 100644
index 13edf229b3..0000000000
@@ -1,41 +0,0 @@
-From fdaa0e3bef93c5c72a7258b5f1e30718e7d81f9b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <[email protected]>
-Date: Mon, 2 Mar 2020 12:17:09 +0000
-Subject: [PATCH 1/2] build: allow passing multiple libs to pkg_config
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Sometimes it's necessary to pass multiple library names to pkg-config,
-e.g. the brotli shared libraries can be pulled in with
-    pkg-config libbrotlienc libbrotlidec
-
-Update the code to handle both, strings (as used so far), and lists
-of strings.
-
-Signed-off-by: André Draszik <[email protected]>
----
-Upstream-Status: Submitted [https://github.com/nodejs/node/pull/32046]
- configure.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/configure.py b/configure.py
-index beb08df088..e3f78f2fed 100755
---- a/configure.py
-+++ b/configure.py
-@@ -680,7 +680,11 @@ def pkg_config(pkg):
-   retval = ()
-   for flag in ['--libs-only-l', '--cflags-only-I',
-                '--libs-only-L', '--modversion']:
--    args += [flag, pkg]
-+    args += [flag]
-+    if isinstance(pkg, list):
-+      args += pkg
-+    else:
-+      args += [pkg]
-     try:
-       proc = subprocess.Popen(shlex.split(pkg_config) + args,
-                               stdout=subprocess.PIPE)
--- 
-2.25.0
-
meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-V8-backport-3f8dc4b2e5ba.patch deleted +0 -194

194 lines not on this page · raw message

meta-oe/recipes-devtools/nodejs/nodejs/0002-build-allow-use-of-system-installed-brotli.patch deleted +0 -66

66 lines not on this page · raw message

meta-oe/recipes-devtools/nodejs/nodejs/0003-Install-both-binaries-and-use-libdir.patch +10 -18
index 599f742b2f..92386fa779 100644
@@ -20,11 +20,9 @@ Signed-off-by: Andreas Müller <[email protected]>
  tools/install.py | 31 ++++++++++++++-----------------
  2 files changed, 21 insertions(+), 17 deletions(-)
 
-diff --git a/configure.py b/configure.py
-index 20cce214db..e2d78a2a51 100755
 --- a/configure.py
 +++ b/configure.py
-@@ -559,6 +559,12 @@ parser.add_option('--shared',
+@@ -602,6 +602,12 @@ parser.add_option('--shared',
      help='compile shared library for embedding node in another project. ' +
           '(This mode is not officially supported for regular applications)')
  
@@ -37,16 +35,14 @@ index 20cce214db..e2d78a2a51 100755
  parser.add_option('--without-v8-platform',
      action='store_true',
      dest='without_v8_platform',
-@@ -1103,6 +1109,7 @@ def configure_node(o):
-   if o['variables']['want_separate_host_toolset'] == 0:
-     o['variables']['node_code_cache'] = 'yes' # For testing
+@@ -1168,6 +1174,7 @@ def configure_node(o):
+   o['variables']['node_no_browser_globals'] = b(options.no_browser_globals)
+ 
    o['variables']['node_shared'] = b(options.shared)
 +  o['variables']['libdir'] = options.libdir
    node_module_version = getmoduleversion.get_version()
  
-   if sys.platform == 'darwin':
-diff --git a/tools/install.py b/tools/install.py
-index 655802980a..fe4723bf15 100755
+   if options.dest_os == 'android':
 --- a/tools/install.py
 +++ b/tools/install.py
 @@ -121,26 +121,23 @@ def subdir_files(path, dest, action):
@@ -72,24 +68,20 @@ index 655802980a..fe4723bf15 100755
 -      # in its source - see the _InstallableTargetInstallPath function.
 -      if sys.platform != 'darwin':
 -        output_prefix += 'lib.target/'
--
--  if 'false' == variables.get('node_shared'):
--    action([output_prefix + output_file], 'bin/' + output_file)
--  else:
--    action([output_prefix + output_file], 'lib/' + output_file)
 +    output_bin = 'node'
 +    output_lib = 'libnode.' + variables.get('shlib_suffix')
 +    # GYP will output to lib.target except on OS X, this is hardcoded
 +    # in its source - see the _InstallableTargetInstallPath function.
 +    if sys.platform != 'darwin':
 +      output_libprefix += 'lib.target/'
-+
+ 
+-  if 'false' == variables.get('node_shared'):
+-    action([output_prefix + output_file], 'bin/' + output_file)
+-  else:
+-    action([output_prefix + output_file], 'lib/' + output_file)
 +  action([output_prefix + output_bin], 'bin/' + output_bin)
 +  if 'true' == variables.get('node_shared'):
 +    action([output_libprefix + output_lib], variables.get('libdir') + '/' + output_lib)
  
    if 'true' == variables.get('node_use_dtrace'):
      action(['out/Release/node.d'], 'lib/dtrace/node.d')
--- 
-2.20.1
-
meta-oe/recipes-devtools/nodejs/nodejs_12.18.3.bb renamed from meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb +4 -8
similarity index 93%
rename from meta-oe/recipes-devtools/nodejs/nodejs_12.14.1.bb
rename to meta-oe/recipes-devtools/nodejs/nodejs_12.18.3.bb
index 9f9f320aa7..8a9f32bce2 100644
@@ -1,7 +1,7 @@
 DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
 HOMEPAGE = "http://nodejs.org"
 LICENSE = "MIT & BSD & Artistic-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=be4d5107c64dc3d7c57e3797e1a0674b"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=30e27bd6830002d9415e4a5da7901f03"
 
 DEPENDS = "openssl"
 DEPENDS_append_class-target = " nodejs-native"
@@ -20,17 +20,12 @@ SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
            file://0003-Install-both-binaries-and-use-libdir.patch \
            file://0004-v8-don-t-override-ARM-CFLAGS.patch \
            file://big-endian.patch \
-           file://0001-build-allow-passing-multiple-libs-to-pkg_config.patch \
-           file://0002-build-allow-use-of-system-installed-brotli.patch \
            file://mips-warnings.patch \
-           file://0001-deps-V8-backport-3f8dc4b2e5ba.patch \
            "
 SRC_URI_append_class-target = " \
            file://0002-Using-native-binaries.patch \
            "
-
-SRC_URI[md5sum] = "1c78a75f5c95321f533ecccca695e814"
-SRC_URI[sha256sum] = "877b4b842318b0e09bc754faf7343f2f097f0fc4f88ab9ae57cf9944e88e7adb"
+SRC_URI[sha256sum] = "71158026579487422fd13cc2553b34cddb76519098aa6030faab52f88c6e0d0e"
 
 S = "${WORKDIR}/node-v${PV}"
 
@@ -55,7 +50,8 @@ ARCHFLAGS_arm = "${@bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', '-
 GYP_DEFINES_append_mipsel = " mips_arch_variant='r1' "
 ARCHFLAGS ?= ""
 
-PACKAGECONFIG ??= "ares brotli icu libuv zlib"
+PACKAGECONFIG ??= "ares brotli icu zlib"
+
 PACKAGECONFIG[ares] = "--shared-cares,,c-ares"
 PACKAGECONFIG[brotli] = "--shared-brotli,,brotli"
 PACKAGECONFIG[icu] = "--with-intl=system-icu,--without-intl,icu"
Signature · 1 line
2.28.0
author
#18 lore raw

PATCH 19/21 opencl-headers: Upgrade to v2020.06.16

In reply to Khem Raj

License-Update: Switched to Apache-2.0 [1]

[1] https://github.com/KhronosGroup/OpenCL-Headers/commit/35deb7576b83fd1244a3e0a89f896b787ed53818#diff-9879d6db96fd29134fc802214163b95a

---
 meta-oe/recipes-core/opencl/opencl-headers_git.bb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
meta-oe/recipes-core/opencl/opencl-headers_git.bb +4 -3
index dec1bea566..d262dd1479 100644
@@ -1,11 +1,12 @@
 SUMMARY  = "OpenCL API Headers"
 DESCRIPTION = "OpenCL compute API headers from Khronos Group"
-LICENSE  = "Khronos"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dcefc90f4c3c689ec0c2489064e7273b"
+LICENSE  = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 SECTION = "base"
 
 S = "${WORKDIR}/git"
-SRCREV = "40c5d226c7c0706f0176884e9b94b3886679c983"
+# v2020.06.16
+SRCREV = "b04034a17e214322772c19e7ccd2adf0cd306920"
 SRC_URI = "git://github.com/KhronosGroup/OpenCL-Headers.git"
 
 do_configure[noexec] = "1"
Signature · 1 line
2.28.0
author
#19 lore raw

PATCH v3 20/21 ocl-icd: Upgrade to latest

In reply to Khem Raj

License-Update: Update copyrights [1]

[1] https://github.com/OCL-dev/ocl-icd/commit/3920205736afbb67729e9c73c7b4c6fdb3fcb327#diff-7116ef0705885343c9e1b2171a06be0e

---
v2: Fix library conflicts and license checksums
v3: Drop installing CL/cl_icd.h its provided by opencl-headers

 meta-oe/recipes-core/opencl/ocl-icd_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-core/opencl/ocl-icd_git.bb +2 -2
index d14ec53e3d..937b3500c6 100644
@@ -3,12 +3,12 @@ DESCRIPTION = "Open Source alternative to vendor specific OpenCL ICD loaders."
 
 # The LICENSE is BSD 2-Clause "Simplified" License
 LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=232257bbf7320320725ca9529d3782ab"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1238d5bccbb6bda30654e48dcc0a554b"
 
 SRC_URI = "git://github.com/OCL-dev/ocl-icd.git;protocol=https"
 
 PV = "2.2.12+git${SRCPV}"
-SRCREV = "af79aebe4649f30dbd711c1bf6fc661eac6e5f01"
+SRCREV = "a9e57b199ff1e8d03fa3e5c53c5544de3dc72fe6"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.28.0
author
#20 lore raw

PATCH v2 21/21 opencl-icd-loader: Update beyond 2020.06.16

In reply to Khem Raj

License-Update: License is now apache-2.0 as per [1]

Fixes build wih gcc10
Gather install artifacts from new locations

[1] https://github.com/KhronosGroup/OpenCL-ICD-Loader/commit/44f384ae624675d6b0b92ce39a97cb7f4899d92a

---
v2: Drop dep on ocl-icd

 .../opencl/opencl-icd-loader_git.bb            | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
meta-oe/recipes-core/opencl/opencl-icd-loader_git.bb +10 -8
index 7c49c8d552..ed27b26164 100644
@@ -1,24 +1,27 @@
 SUMMARY  = "OpenCL ICD Loader"
 DESCRIPTION = "OpenCL compute ICD Loader from Khronos Group"
-LICENSE  = "Khronos"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ec724732ce73269486574c718ef0c79b"
+LICENSE  = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 SECTION = "base"
 
+DEPENDS += "opencl-headers"
+
 inherit pkgconfig cmake
 
 S = "${WORKDIR}/git"
-SRCREV = "b342ff7b7f70a4b3f2cfc53215af8fa20adc3d86"
+PV = "2020.06.16+git${SRCPV}"
+SRCREV = "862eebe7ca733c398334a8db8481172a7d3a3c47"
 SRC_URI = "git://github.com/KhronosGroup/OpenCL-ICD-Loader.git"
 
 do_install () {
 	install -d ${D}${bindir}
-	install -m 0755 ${B}/bin/icd_loader_test ${D}${bindir}/
+	install -m 0755 ${B}/test/loader_test/icd_loader_test ${D}${bindir}/
 	chrpath -d ${D}${bindir}/icd_loader_test
 	install -d ${D}${libdir}
-	install -m 0644 ${B}/lib/libIcdLog.so ${D}${libdir}/
-	install -m 0644 ${B}/lib/libOpenCLDriverStub.so ${D}${libdir}/
+	install -m 0644 ${B}/test/log/libIcdLog.so ${D}${libdir}/
+	install -m 0644 ${B}/test/driver_stub/libOpenCLDriverStub.so ${D}${libdir}/
 	chrpath -d ${D}${libdir}/libOpenCLDriverStub.so
-	install -m 0644 ${B}/lib/libOpenCL.so.1.2 ${D}${libdir}/
+	install -m 0644 ${B}/libOpenCL.so.1.2 ${D}${libdir}/
 	cd ${D}${libdir}
 	ln -s libOpenCL.so.1.2 libOpenCL.so.1
 	ln -s libOpenCL.so.1 libOpenCL.so
@@ -41,5 +44,4 @@ FILES_${PN}-dev = " \
 FILES_libicdlog = "${libdir}/libIcdLog.so"
 FILES_libicdlog-dbg = "${libdir}/.debug/libIcdLog.so"
 
-DEPENDS = "opencl-headers"
 RDEPENDS_${PN} = "libicdlog"
Signature · 1 line
2.28.0