Hi,
the next [patch 3/5] will change the libcc1.so API. I am not sure if the API
change gets approved that way but for such case:
(1) We really need to change GCC_FE_VERSION_0 -> GCC_FE_VERSION_1, this
feature is there for this purpose. That is [patch 2/5].
(2) Currently GDB does only dlopen("libcc1.so") and then depending on which
libcc1.so version it would find first it would succeed/fail.
I guess it is more convenient to do dlopen("libcc1.so.1") instead
(where ".1"=".x" corresponds to GCC_FE_VERSION_x).
That is this patch (with x=0).
GCC_C_FE_LIBCC is used only by GDB.
(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 1/4] compile: Use libcc1.so->libcc1.so.0
https://sourceware.org/ml/gdb-patches/2015-04/msg00805.html
Message-ID: <20150421213635.14147.15653.st...@host1.jankratochvil.net>
Jan
include/ChangeLog
2015-04-21 Jan Kratochvil
* gcc-c-interface.h (GCC_C_FE_LIBCC): Quote it. Append
GCC_FE_VERSION_0.
---
include/gcc-c-interface.h |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/gcc-c-interface.h b/include/gcc-c-interface.h
index 25ef62f..1b73e32 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
+#define GCC_C_FE_LIBCC "libcc1.so." STRINGIFY (GCC_FE_VERSION_0)
/* The compiler exports a single initialization function. This macro
holds its name as a symbol. */