From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Phil Muldoon <pmuldoon@redhat.com>
Subject: [PATCH v2 1/4] libcc1: Introduce GCC_FE_VERSION_1
Date: Thu, 23 Apr 2015 20:38:00 -0000 [thread overview]
Message-ID: <20150423203827.23973.72954.stgit@host1.jankratochvil.net> (raw)
Hi,
in mail thread
https://sourceware.org/ml/gdb-patches/2015-04/msg00804.html
the idea of breaking libcc1.so compatibility was rejected.
Therefore this patch series implements full backward/forward GCC/GDB ABI
compatibility.
Jan
include/ChangeLog
2015-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* gcc-interface.h (enum gcc_base_api_version): Add GCC_FE_VERSION_1.
libcc1/ChangeLog
2015-04-23 Jan Kratochvil <jan.kratochvil@redhat.com>
* libcc1.cc (vtable): Update to GCC_FE_VERSION_1.
(gcc_c_fe_context): Accept also GCC_FE_VERSION_1.
---
include/gcc-interface.h | 3 ++-
libcc1/libcc1.cc | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/gcc-interface.h b/include/gcc-interface.h
index 34010f2..dcfa6ce 100644
--- a/include/gcc-interface.h
+++ b/include/gcc-interface.h
@@ -44,7 +44,8 @@ struct gcc_base_context;
enum gcc_base_api_version
{
- GCC_FE_VERSION_0 = 0
+ GCC_FE_VERSION_0 = 0,
+ GCC_FE_VERSION_1 = 1,
};
/* The operations defined by the GCC base API. This is the vtable for
diff --git a/libcc1/libcc1.cc b/libcc1/libcc1.cc
index 7d7d2c1..99a0fa1 100644
--- a/libcc1/libcc1.cc
+++ b/libcc1/libcc1.cc
@@ -504,7 +504,7 @@ libcc1_destroy (struct gcc_base_context *s)
static const struct gcc_base_vtable vtable =
{
- GCC_FE_VERSION_0,
+ GCC_FE_VERSION_1,
libcc1_set_arguments,
libcc1_set_source_file,
libcc1_set_print_callback,
@@ -523,7 +523,8 @@ struct gcc_c_context *
gcc_c_fe_context (enum gcc_base_api_version base_version,
enum gcc_c_api_version c_version)
{
- if (base_version != GCC_FE_VERSION_0 || c_version != GCC_C_FE_VERSION_0)
+ if ((base_version != GCC_FE_VERSION_0 && base_version != GCC_FE_VERSION_1)
+ || c_version != GCC_C_FE_VERSION_0)
return NULL;
return new libcc1 (&vtable, &c_vtable);
next reply other threads:[~2015-04-23 20:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-23 20:38 Jan Kratochvil [this message]
2015-04-23 20:38 ` [PATCH v2 3/4] libcc1: Add 'set compile-gcc' Jan Kratochvil
2015-04-23 21:57 ` Jeff Law
2015-04-27 15:23 ` Pedro Alves
2015-04-23 20:38 ` [PATCH v2 4/4] libcc1: 'set debug compile': Display absolute GCC driver filename Jan Kratochvil
2015-04-23 21:57 ` Jeff Law
2015-04-23 20:38 ` [PATCH v2 2/4] libcc1: set debug compile: Display " Jan Kratochvil
2015-04-23 20:42 ` Jan Kratochvil
2015-04-23 21:56 ` Jeff Law
2015-04-23 21:54 ` [PATCH v2 1/4] libcc1: Introduce GCC_FE_VERSION_1 Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150423203827.23973.72954.stgit@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).