Skip to content

Commit

Permalink
Merge pull request #4436 from jernejsk/gcc10
Browse files Browse the repository at this point in the history
gcc: update to 10.1.0
  • Loading branch information
CvH authored Jun 26, 2020
2 parents cc6e86c + 53a85c0 commit d1e3bf7
Show file tree
Hide file tree
Showing 51 changed files with 4,351 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="at-spi2-atk"
PKG_VERSION="2.26.2"
PKG_SHA256="61891f0abae1689f6617a963105a3f1dcdab5970c4a36ded9c79a7a544b16a6e"
PKG_VERSION="2.34.2"
PKG_SHA256="901323cee0eef05c01ec4dee06c701aeeca81a314a7d60216fa363005e27f4f0"
PKG_LICENSE="OSS"
PKG_SITE="http://www.gnome.org/"
PKG_URL="https://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/${PKG_VERSION:0:4}/at-spi2-atk-$PKG_VERSION.tar.xz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="at-spi2-core"
PKG_VERSION="2.28.0"
PKG_SHA256="42a2487ab11ce43c288e73b2668ef8b1ab40a0e2b4f94e80fca04ad27b6f1c87"
PKG_VERSION="2.36.0"
PKG_SHA256="88da57de0a7e3c60bc341a974a80fdba091612db3547c410d6deab039ca5c05a"
PKG_LICENSE="OSS"
PKG_SITE="http://www.gnome.org/"
PKG_URL="https://ftp.gnome.org/pub/gnome/sources/at-spi2-core/${PKG_VERSION:0:4}/at-spi2-core-$PKG_VERSION.tar.xz"
Expand Down
4 changes: 2 additions & 2 deletions packages/addons/addon-depends/chrome-depends/atk/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="atk"
PKG_VERSION="2.29.1"
PKG_SHA256="1aa7707c6297c1797fe4d79a22a57ede4d5586b0f7a3b30e886d7ca9d75f20da"
PKG_VERSION="2.36.0"
PKG_SHA256="fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788"
PKG_LICENSE="GPL"
PKG_SITE="http://library.gnome.org/devel/atk/"
PKG_URL="https://ftp.gnome.org/pub/gnome/sources/atk/${PKG_VERSION:0:4}/atk-$PKG_VERSION.tar.xz"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/mpeg2dec.c b/mpeg2dec.c
index 3013dc1..5b79227 100755
--- a/mpeg2dec.c
+++ b/mpeg2dec.c
@@ -161,7 +161,6 @@ int64_t pev_best_effort_timestamp = 0;

int video_stream_index = -1;
int audio_stream_index = -1;
-int width, height;
int have_frame_rate ;
int stream_index;

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From edbabcc7df6cd9e282991bd550d125d7f75bd738 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <[email protected]>
Date: Mon, 22 Jun 2020 19:42:17 +0200
Subject: [PATCH] Fix building with gcc10

---
si_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/si_types.h b/si_types.h
index 5fc7835d80c7..41ce2e1e6603 100644
--- a/si_types.h
+++ b/si_types.h
@@ -113,7 +113,7 @@ struct service {
uint32_t logical_channel_number;
uint8_t running;
void * priv;
-} service_t, * p_service_t;
+};

/*******************************************************************************
/* transponder type.
@@ -204,7 +204,7 @@ struct transponder {
char * signal_strength_unit;
double signal_quality;
char * signal_quality_unit;
-} __attribute__((packed)) transponder_t, * p_transponder_t;
+} __attribute__((packed));

/*******************************************************************************
/* satellite channel routing type.
--
2.27.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From edbabcc7df6cd9e282991bd550d125d7f75bd738 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <[email protected]>
Date: Mon, 22 Jun 2020 19:42:17 +0200
Subject: [PATCH] Fix building with gcc10

---
si_types.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/si_types.h b/si_types.h
index 5fc7835d80c7..41ce2e1e6603 100644
--- a/si_types.h
+++ b/si_types.h
@@ -114,7 +114,7 @@ struct service {
uint32_t logical_channel_number;
uint8_t running;
void * priv;
-} service_t, * p_service_t;
+};

/*******************************************************************************
/* transponder type.
@@ -201,7 +201,7 @@ struct transponder {
/*----------------------------*/
char * network_name;
network_change_t network_change;
-} __attribute__((packed)) transponder_t, * p_transponder_t;
+} __attribute__((packed));

/*******************************************************************************
/* satellite channel routing type.
--
2.27.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From d9402e29486f60ea4a9b8da530c60e6c8404127b Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <[email protected]>
Date: Mon, 22 Jun 2020 20:18:59 +0200
Subject: [PATCH] Fix building with gcc10

---
ui_common.c | 6 ++++++
ui_common.h | 12 +++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/ui_common.c b/ui_common.c
index dcf66466fda4..b1027ec16da7 100644
--- a/ui_common.c
+++ b/ui_common.c
@@ -17,6 +17,12 @@

#include "ui_common.h"

+sorted_list_type screen_list;
+host_pair_line totals;
+int peaksent, peakrecv, peaktotal;
+hash_type* screen_hash;
+hash_type* service_hash;
+
/* 2, 10 and 40 seconds */
int history_divs[HISTORY_DIVISIONS] = {1, 5, 20};

diff --git a/ui_common.h b/ui_common.h
index 63ae5bb69886..1403d11c310c 100644
--- a/ui_common.h
+++ b/ui_common.h
@@ -33,12 +33,14 @@ typedef struct host_pair_line_tag {

extern options_t options;

-sorted_list_type screen_list;
-host_pair_line totals;
-int peaksent, peakrecv, peaktotal;
+extern sorted_list_type screen_list;
+extern host_pair_line totals;
+extern int peaksent;
+extern int peakrecv;
+extern int peaktotal;
extern history_type history_totals;
-hash_type* screen_hash;
-hash_type* service_hash;
+extern hash_type* screen_hash;
+extern hash_type* service_hash;

void analyse_data(void);
void screen_list_init(void);
--
2.27.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff -Nur a/sh_util/gpshare.c b/sh_util/gpshare.c
--- a/sh_util/gpshare.c 2016-11-13 00:53:39.000000000 +0100
+++ b/sh_util/gpshare.c 2020-06-22 20:24:08.160203885 +0200
@@ -28,7 +28,7 @@

static int gIsAtty1 = 1, gIsAtty2 = 1;
extern int gLoadedBm, gBookmarkMatchMode;
-Bookmark gBm;
+extern Bookmark gBm;

double
FileSize(double size, const char **uStr0, double *uMult0)
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="shairport-sync"
PKG_VERSION="3.2"
PKG_SHA256="18e9343d4bd8ff70674ff3ecdaf7312dd90e716cac2826a4266c95e08ca305bc"
PKG_VERSION="3.3.6"
PKG_SHA256="a8382affd25c473fa38ead5690148c6c3902098f359f9c881eefe139e1f49f49"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/mikebrady/shairport-sync"
PKG_URL="https://github.com/mikebrady/shairport-sync/archive/$PKG_VERSION.tar.gz"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ make_host() {
make -C src/ include/efivar/efivar-guids.h
}

pre_make_target() {
sed -e 's/-Werror//' -i gcc.specs
}

make_target() {
make -C src/ libefivar.a libefiboot.a efivar.h efivar
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From ee711740d2809e7aa3ebd57d58bfc02b1e9b034b Mon Sep 17 00:00:00 2001
From: David Seifert <[email protected]>
Date: Thu, 23 Jan 2020 17:27:10 +0100
Subject: [PATCH] Fix GCC 10 switch to `-fno-common` default

---
CRT.h | 6 +++---
linux/LinuxProcess.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CRT.h b/CRT.h
index 933fe068..65998ac6 100644
--- a/CRT.h
+++ b/CRT.h
@@ -140,7 +140,7 @@ extern const char **CRT_treeStr;

extern int CRT_delay;

-int* CRT_colors;
+extern int* CRT_colors;

extern int CRT_colorSchemes[LAST_COLORSCHEME][LAST_COLORELEMENT];

@@ -150,13 +150,13 @@ extern int CRT_scrollHAmount;

extern int CRT_scrollWheelVAmount;

-char* CRT_termType;
+extern char* CRT_termType;

// TODO move color scheme to Settings, perhaps?

extern int CRT_colorScheme;

-void *backtraceArray[128];
+extern void *backtraceArray[128];

#if HAVE_SETUID_ENABLED

diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 6ce3037d..cbd77be9 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -144,7 +144,7 @@ typedef struct LinuxProcess_ {
#endif


-long long btime; /* semi-global */
+extern long long btime; /* semi-global */

extern ProcessFieldData Process_fields[];

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile b/Makefile
index 15c9e6cc828c..3b68824ce727 100644
--- a/Makefile
+++ b/Makefile
@@ -376,7 +376,7 @@ stress-ng: $(OBJS)

makeconfig:
@if [ ! -e config ]; then \
- STATIC=$(STATIC) $(MAKE) -f Makefile.config; \
+ STATIC=$(STATIC) $(MAKE) -j1 -f Makefile.config; \
fi

#
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
From 084126b03f29b33ab3e657c66e8c6a439f27f8e1 Mon Sep 17 00:00:00 2001
From: Harald Geyer <[email protected]>
Date: Mon, 10 Feb 2020 13:15:10 +0100
Subject: [PATCH] Fix compilation with GCC >= 10.x

Starting with GCC >= 10.x, -fno-common is used as default
instead of -fcommon. This patch fixes the compilation.

Closes: #148

Suggested-by: Conrad Kostecki <[email protected]>
Signed-off-by: Harald Geyer <[email protected]>
---
clients/lcdproc/iface.c | 1 +
clients/lcdproc/iface.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/clients/lcdproc/iface.c b/clients/lcdproc/iface.c
index 40e50cb7..1ac355bd 100644
--- a/clients/lcdproc/iface.c
+++ b/clients/lcdproc/iface.c
@@ -32,6 +32,7 @@
#define UNSET_INT -1
#define UNSET_STR "\01"

+IfaceInfo iface[MAX_INTERFACES];

static int iface_count = 0; /* number of interfaces */
static char unit_label[10] = "B"; /* default unit label is Bytes */
diff --git a/clients/lcdproc/iface.h b/clients/lcdproc/iface.h
index cc6dbaaf..c1bd6b5b 100644
--- a/clients/lcdproc/iface.h
+++ b/clients/lcdproc/iface.h
@@ -18,7 +18,7 @@
/** max number of interfaces in multi-interface mode */
#define MAX_INTERFACES 3

-IfaceInfo iface[MAX_INTERFACES]; /* interface info */
+extern IfaceInfo iface[MAX_INTERFACES]; /* interface info */

/** Update screen content */
int iface_screen(int rep, int display, int *flags_ptr);
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 55d5d57a1d5a10ee2d120fad0b4c23553054b586 Mon Sep 17 00:00:00 2001
From: Jernej Skrabec <[email protected]>
Date: Mon, 22 Jun 2020 20:12:13 +0200
Subject: [PATCH] Fix building with gcc10

---
image_utils.c | 2 +-
metadata.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/image_utils.c b/image_utils.c
index 24cfd0841954..e8d9635dc6e0 100644
--- a/image_utils.c
+++ b/image_utils.c
@@ -190,7 +190,7 @@ jpeg_memory_src(j_decompress_ptr cinfo, const unsigned char * buffer, size_t buf
src->pub.bytes_in_buffer = bufsize;
}

-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
/* Don't exit on error like libjpeg likes to do */
static void
libjpeg_error_handler(j_common_ptr cinfo)
diff --git a/metadata.c b/metadata.c
index 9cd86dc64779..4781db716d1a 100644
--- a/metadata.c
+++ b/metadata.c
@@ -502,7 +502,7 @@ GetAudioMetadata(const char *path, const char *name)
}

/* For libjpeg error handling */
-jmp_buf setjmp_buffer;
+static jmp_buf setjmp_buffer;
static void
libjpeg_error_handler(j_common_ptr cinfo)
{
--
2.27.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From b7a9982022ea54d87d310a041c38c6c69b6e49da Mon Sep 17 00:00:00 2001
From: Klaas de Waal <[email protected]>
Date: Sun, 17 May 2020 23:00:09 +0200
Subject: [PATCH] Fix declaration and definition of global variables

Definition of global variable httpc now in utils.c with declaration in utils.h.
Definition of global variable source_map now in adapter.c with declaration in adapter.h.
This fixes multiple defined symbol linking errors with linking issue with multiple defined symbols
in Fedora 32 with gcc version 10.1.1 20200507 (Red Hat 10.1.1-1) (GCC)
---
src/adapter.c | 1 +
src/adapter.h | 2 +-
src/utils.c | 2 ++
src/utils.h | 3 ++-
4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/utils.c b/src/utils.c
index 8c27954..5be35fd 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -63,6 +63,8 @@
int MAX_SINFO;
char pn[256];

+Shttp_client *httpc[MAX_HTTPC];
+
typedef struct tmpinfo
{
unsigned char enabled;
diff --git a/src/utils.h b/src/utils.h
index 6ef1831..efcccfa 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -88,7 +88,8 @@ typedef struct struct_http_client

#define get_httpc(i) ((i >= 0 && i < MAX_HTTPC && httpc[i] && httpc[i]->enabled) ? httpc[i] : NULL)

-Shttp_client *httpc[MAX_HTTPC];
+extern Shttp_client *httpc[MAX_HTTPC];
+
int http_client(char *url, char *request, void *callback, void *opaque);

unsigned char *getItem(uint32_t key);
Loading

0 comments on commit d1e3bf7

Please sign in to comment.