76 lines
2.1 KiB
Diff
76 lines
2.1 KiB
Diff
From 543ea6d903a50c353d9e129d380240f277a670aa Mon Sep 17 00:00:00 2001
|
|
From: Sergei Trofimovich <slyfox@gentoo.org>
|
|
Date: Thu, 23 Jan 2020 08:24:52 +0000
|
|
Subject: [PATCH] src/options: fix build failure against gcc-10
|
|
|
|
On gcc-10 (and gcc-9 -fno-common) build fails as:
|
|
|
|
```
|
|
CXXLD geeqie
|
|
ld: ui_fileops.o:(.bss+0x0):
|
|
multiple definition of `options'; ui_bookmark.o:(.bss+0x0): first defined here
|
|
ld: ui_fileops.o:(.bss+0x8):
|
|
multiple definition of `command_line'; ui_bookmark.o:(.bss+0x8): first defined here
|
|
```
|
|
|
|
gcc-10 will change the default from -fcommon to fno-common:
|
|
https://gcc.gnu.org/PR85678.
|
|
|
|
The error also happens if CFLAGS=-fno-common passed explicitly.
|
|
|
|
Reported-by: Anthony Parsons
|
|
Bug: https://bugs.gentoo.org/706132
|
|
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
---
|
|
src/bar_exif.h | 3 ---
|
|
src/options.c | 3 +++
|
|
src/options.h | 4 ++--
|
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/bar_exif.h b/src/bar_exif.h
|
|
index 63c30d4b..1395e842 100644
|
|
--- a/src/bar_exif.h
|
|
+++ b/src/bar_exif.h
|
|
@@ -28,9 +28,6 @@ void bar_pane_exif_update_from_config(GtkWidget *pane, const gchar **attribute_n
|
|
void bar_pane_exif_entry_add_from_config(GtkWidget *pane, const gchar **attribute_names, const gchar **attribute_values);
|
|
|
|
/* these are exposed for when duplication of the exif bar's text is needed */
|
|
-
|
|
-const gchar **bar_exif_key_list;
|
|
-const gint bar_exif_key_count;
|
|
GList *bar_pane_exif_list();
|
|
|
|
#endif
|
|
diff --git a/src/options.c b/src/options.c
|
|
index 99459381..bab26acb 100644
|
|
--- a/src/options.c
|
|
+++ b/src/options.c
|
|
@@ -32,6 +32,9 @@
|
|
#include "ui_fileops.h"
|
|
#include "window.h"
|
|
|
|
+ConfOptions *options;
|
|
+CommandLine *command_line;
|
|
+
|
|
ConfOptions *init_options(ConfOptions *options)
|
|
{
|
|
gint i;
|
|
diff --git a/src/options.h b/src/options.h
|
|
index fcfe961a..02ff8fac 100644
|
|
--- a/src/options.h
|
|
+++ b/src/options.h
|
|
@@ -329,8 +329,8 @@ struct _ConfOptions
|
|
GList *disabled_plugins;
|
|
};
|
|
|
|
-ConfOptions *options;
|
|
-CommandLine *command_line;
|
|
+extern ConfOptions *options;
|
|
+extern CommandLine *command_line;
|
|
|
|
ConfOptions *init_options(ConfOptions *options);
|
|
void setup_default_options(ConfOptions *options);
|
|
--
|
|
2.25.0
|
|
|