From patchwork Tue Apr 21 21:41:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 463495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4AC131400DE for ; Wed, 22 Apr 2015 07:41:37 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=F1vfjy5s; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=f3Ug6Zs4dztD54mfhBK8ut2ba1cT+c3oe8ZKS/N1+tblB9RbdTC8r nLL71bLUbCIv7pKy54Bj046ghs1rdiDTZAWtYSOOe/q5OKqjpnpem6YaCykZshzQ BvdCTI+biAEp7UKnXy3U+vYkp/o4HBnh5bGAr3OOSyDbOZ+P2AkLxc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:from:to:cc:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=default; bh=gWcWAaXAWwP91oxM/zH2/DY3hNo=; b=F1vfjy5s57qvw0qc6nEWBI7YiAUt tn1N+PCC19u6mL6FDz/CB96SsrtO8FJMNBqUAk4O9aMc2w1h8XuFMmBCVQypTuew U0YjA7y6lnOuCUkvfl3AwsJvCgeMT3/UodR7Qaso6IJ3zTbV/GnH5cVIeeAwql9g 6oNFo9d3W3+IuXk= Received: (qmail 10307 invoked by alias); 21 Apr 2015 21:41:22 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10247 invoked by uid 89); 21 Apr 2015 21:41:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 21 Apr 2015 21:41:20 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 1C9948E6FF for ; Tue, 21 Apr 2015 21:41:19 +0000 (UTC) Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3LLfHHv014723; Tue, 21 Apr 2015 17:41:17 -0400 Subject: [PATCH 2/5] libcc1: Use libcc1.so.0->libcc1.so.1 From: Jan Kratochvil To: gcc-patches@gcc.gnu.org Cc: Phil Muldoon Date: Tue, 21 Apr 2015 23:41:17 +0200 Message-ID: <20150421214116.14972.25534.stgit@host1.jankratochvil.net> In-Reply-To: <20150421214109.14972.34388.stgit@host1.jankratochvil.net> References: <20150421214109.14972.34388.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes 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 * 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 * 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(-) 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);