diff mbox

[2/5] libcc1: Use libcc1.so.0->libcc1.so.1

Message ID 20150421214116.14972.25534.stgit@host1.jankratochvil.net
State New
Headers show

Commit Message

Jan Kratochvil April 21, 2015, 9:41 p.m. UTC
Hi,

see [patch 1/5], particularly:
(3) Currently there is no backward or forward compatibility although there
    could be one implemented.  Personally I think the 'compile' feature is
    still in experimental stage so that it is OK to require last releases.
    At least in Fedora we can keep GDB<->GCC in sync.

GDB counterpart:
	[PATCH 2/4] compile: Use libcc1.so.0->libcc1.so.1
	https://sourceware.org/ml/gdb-patches/2015-04/msg00806.html
	Message-ID: <20150421213642.14147.93210.stgit@host1.jankratochvil.net>


Jan


include/ChangeLog
2015-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* gcc-c-interface.h (GCC_C_FE_LIBCC): Update it to GCC_FE_VERSION_1.
	* gcc-interface.h (enum gcc_base_api_version): Add GCC_FE_VERSION_1.

libcc1/ChangeLog
2015-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* Makefile.am (libcc1_la_LDFLAGS): Add version-info 1.
	* Makefile.in: Regenerate.
	* libcc1.cc (vtable, gcc_c_fe_context): Update it to GCC_FE_VERSION_1.
---
 include/gcc-c-interface.h |    2 +-
 include/gcc-interface.h   |    3 ++-
 libcc1/Makefile.am        |    3 ++-
 libcc1/Makefile.in        |    4 +++-
 libcc1/libcc1.cc          |    4 ++--
 5 files changed, 10 insertions(+), 6 deletions(-)

Comments

Jeff Law April 22, 2015, 1:12 p.m. UTC | #1
On 04/21/2015 03:41 PM, Jan Kratochvil wrote:
> Hi,
>
> see [patch 1/5], particularly:
> (3) Currently there is no backward or forward compatibility although there
>      could be one implemented.  Personally I think the 'compile' feature is
>      still in experimental stage so that it is OK to require last releases.
>      At least in Fedora we can keep GDB<->GCC in sync.
>
> GDB counterpart:
> 	[PATCH 2/4] compile: Use libcc1.so.0->libcc1.so.1
> 	https://sourceware.org/ml/gdb-patches/2015-04/msg00806.html
> 	Message-ID: <20150421213642.14147.93210.stgit@host1.jankratochvil.net>
>
>
> Jan
>
>
> include/ChangeLog
> 2015-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
>
> 	* gcc-c-interface.h (GCC_C_FE_LIBCC): Update it to GCC_FE_VERSION_1.
> 	* gcc-interface.h (enum gcc_base_api_version): Add GCC_FE_VERSION_1.
>
> libcc1/ChangeLog
> 2015-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
>
> 	* Makefile.am (libcc1_la_LDFLAGS): Add version-info 1.
> 	* Makefile.in: Regenerate.
> 	* libcc1.cc (vtable, gcc_c_fe_context): Update it to GCC_FE_VERSION_1.
OK.  Please install on the trunk.

jeff
diff mbox

Patch

diff --git a/include/gcc-c-interface.h b/include/gcc-c-interface.h
index 1b73e32..285c9c7 100644
--- a/include/gcc-c-interface.h
+++ b/include/gcc-c-interface.h
@@ -197,7 +197,7 @@  struct gcc_c_context
 /* The name of the .so that the compiler builds.  We dlopen this
    later.  */
 
-#define GCC_C_FE_LIBCC "libcc1.so." STRINGIFY (GCC_FE_VERSION_0)
+#define GCC_C_FE_LIBCC "libcc1.so." STRINGIFY (GCC_FE_VERSION_1)
 
 /* The compiler exports a single initialization function.  This macro
    holds its name as a symbol.  */
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/Makefile.am b/libcc1/Makefile.am
index 7a274b3..e6a94e2 100644
--- a/libcc1/Makefile.am
+++ b/libcc1/Makefile.am
@@ -63,7 +63,8 @@  libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
-libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
+libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym \
+	-version-info 1:0:0
 libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source)
 libcc1_la_LIBADD = $(libiberty)
 libcc1_la_DEPENDENCIES = $(libiberty_dep)
diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
index 1916134..ebec54c 100644
--- a/libcc1/Makefile.in
+++ b/libcc1/Makefile.in
@@ -279,7 +279,9 @@  libcc1plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
 	$(CXXFLAGS) $(libcc1plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
 
 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
-libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym
+libcc1_la_LDFLAGS = -module -export-symbols $(srcdir)/libcc1.sym \
+	-version-info 1:0:0
+
 libcc1_la_SOURCES = findcomp.cc libcc1.cc names.cc names.hh $(shared_source)
 libcc1_la_LIBADD = $(libiberty)
 libcc1_la_DEPENDENCIES = $(libiberty_dep)
diff --git a/libcc1/libcc1.cc b/libcc1/libcc1.cc
index 7d7d2c1..afda023 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,7 @@  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_1 || c_version != GCC_C_FE_VERSION_0)
     return NULL;
 
   return new libcc1 (&vtable, &c_vtable);