Commit f284e555 authored by Christian Hergert's avatar Christian Hergert
Browse files

gdb: use static library for gdbwire with alternate cflags

If we build the gdbwire amalgamation as a separate static library then we
can alter the CFLAGS that are used to compile it. Given that it is an
amalgamation and is C89-based rather than C11, this allows us to squash
some warnings that are unhelpful.

We link the library with libgnome-builder-plugins.so so the end effect
should be identical to what we had before.
parent 38b3f0a3
......@@ -21,11 +21,6 @@
#include <dazzle.h>
#include <string.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include "gdbwire.h"
#pragma GCC diagnostic pop
#include "gbp-gdb-debugger.h"
#define READ_BUFFER_LEN 4096
......
......@@ -20,7 +20,10 @@
#include <ide.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include "gdbwire.h"
#pragma GCC diagnostic pop
G_BEGIN_DECLS
......
......@@ -10,11 +10,16 @@ gdb_sources = [
'gbp-gdb-debugger.c',
'gbp-gdb-debugger.h',
'gbp-gdb-plugin.c',
'gdbwire.c',
'gdbwire.h',
]
gdbwire = static_library('gdbwire', ['gdbwire.c'],
c_args: [ '-Wno-redundant-decls',
'-Wno-switch-default',
'-Wno-declaration-after-statement' ],
)
gnome_builder_plugins_sources += files(gdb_sources)
gnome_builder_plugins_sources += gdb_resources[0]
gnome_builder_plugins_link_with += gdbwire
endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment