From patchwork Tue Apr 21 21:36:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 6374 Received: (qmail 126458 invoked by alias); 21 Apr 2015 21:36:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 126448 invoked by uid 89); 21 Apr 2015 21:36:47 -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:36:46 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3LLaiqn015583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 21 Apr 2015 17:36:44 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3LLahSW002374; Tue, 21 Apr 2015 17:36:43 -0400 Subject: [PATCH 2/4] compile: Use libcc1.so.0->libcc1.so.1 From: Jan Kratochvil To: gdb-patches@sourceware.org Cc: Phil Muldoon Date: Tue, 21 Apr 2015 23:36:42 +0200 Message-ID: <20150421213642.14147.93210.stgit@host1.jankratochvil.net> In-Reply-To: <20150421213635.14147.15653.stgit@host1.jankratochvil.net> References: <20150421213635.14147.15653.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-IsSubscribed: yes Hi, see [patch 1/4], 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. include/* changes are here only FYI, master repository of those files is GCC. Jan gdb/ChangeLog 2015-04-21 Jan Kratochvil * compile/compile-c-support.c (c_get_compile_context): Use GCC_FE_VERSION_1. 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. --- gdb/compile/compile-c-support.c | 2 +- include/gcc-c-interface.h | 2 +- include/gcc-interface.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gdb/compile/compile-c-support.c b/gdb/compile/compile-c-support.c index e3c01f2..b09e1bf 100644 --- a/gdb/compile/compile-c-support.c +++ b/gdb/compile/compile-c-support.c @@ -107,7 +107,7 @@ c_get_compile_context (void) gdb_assert (func != NULL); } - context = (*func) (GCC_FE_VERSION_0, GCC_C_FE_VERSION_0); + context = (*func) (GCC_FE_VERSION_1, GCC_C_FE_VERSION_0); if (context == NULL) error (_("The loaded version of GCC does not support the required version " "of the API.")); diff --git a/include/gcc-c-interface.h b/include/gcc-c-interface.h index 7108952..0eff259 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 df7db6e..1b33e7d 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