* [patch] libcc1: dynamic load versioned library
@ 2015-03-24 16:07 Hector Oron
2015-03-24 16:33 ` Mark Kettenis
0 siblings, 1 reply; 4+ messages in thread
From: Hector Oron @ 2015-03-24 16:07 UTC (permalink / raw)
To: gdb-patches
Hello,
I believe libcc1 is versioned library therefore, it should dlopen on
libcc1.so.0 instead libcc1.so.
The patch should be applied to master and 7.9 branch.
Héctor Orón Martínez
* include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library
--- gdb-7.9.orig/include/gcc-c-interface.h
+++ gdb-7.9/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.0
/* The compiler exports a single initialization function. This macro
holds its name as a symbol. */
Regards,
--
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] libcc1: dynamic load versioned library
2015-03-24 16:07 [patch] libcc1: dynamic load versioned library Hector Oron
@ 2015-03-24 16:33 ` Mark Kettenis
2015-03-24 17:06 ` Hector Oron
2015-03-24 19:46 ` Mike Frysinger
0 siblings, 2 replies; 4+ messages in thread
From: Mark Kettenis @ 2015-03-24 16:33 UTC (permalink / raw)
To: hector.oron; +Cc: gdb-patches
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
> Date: Tue, 24 Mar 2015 17:07:00 +0100
> From: Hector Oron <hector.oron@gmail.com>
>
> Hello,
>
> I believe libcc1 is versioned library therefore, it should dlopen on
> libcc1.so.0 instead libcc1.so.
> The patch should be applied to master and 7.9 branch.
And what happens if the major version of the library is bumped?
> Héctor Orón MartÃnez
>
> * include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library
>
> --- gdb-7.9.orig/include/gcc-c-interface.h
> +++ gdb-7.9/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.0
>
> /* The compiler exports a single initialization function. This macro
> holds its name as a symbol. */
>
> Regards,
> --
> Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] libcc1: dynamic load versioned library
2015-03-24 16:33 ` Mark Kettenis
@ 2015-03-24 17:06 ` Hector Oron
2015-03-24 19:46 ` Mike Frysinger
1 sibling, 0 replies; 4+ messages in thread
From: Hector Oron @ 2015-03-24 17:06 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
Hello,
2015-03-24 17:33 GMT+01:00 Mark Kettenis <mark.kettenis@xs4all.nl>:
>> From: Hector Oron <hector.oron@gmail.com>
>>
>> Hello,
>>
>> I believe libcc1 is versioned library therefore, it should dlopen on
>> libcc1.so.0 instead libcc1.so.
>> The patch should be applied to master and 7.9 branch.
>
> And what happens if the major version of the library is bumped?
Does that mean that there is some ABI break which might imply or not
newer changes on GDB side?
>> Héctor Orón Martínez
>>
>> * include/gcc-c-interface.h (gcc_c_context): load libcc1 versioned library
>>
>> --- gdb-7.9.orig/include/gcc-c-interface.h
>> +++ gdb-7.9/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.0
>>
>> /* The compiler exports a single initialization function. This macro
>> holds its name as a symbol. */
>>
>> Regards,
>> --
>> Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
>>
>>
--
Héctor Orón -.. . -... .. .- -. -.. . ...- . .-.. --- .--. . .-.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] libcc1: dynamic load versioned library
2015-03-24 16:33 ` Mark Kettenis
2015-03-24 17:06 ` Hector Oron
@ 2015-03-24 19:46 ` Mike Frysinger
1 sibling, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2015-03-24 19:46 UTC (permalink / raw)
To: Mark Kettenis; +Cc: hector.oron, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 665 bytes --]
On 24 Mar 2015 17:33, Mark Kettenis wrote:
> From: Hector Oron <hector.oron@gmail.com>
> > I believe libcc1 is versioned library therefore, it should dlopen on
> > libcc1.so.0 instead libcc1.so.
> > The patch should be applied to master and 7.9 branch.
>
> And what happens if the major version of the library is bumped?
then we need to handle it ? there's no guarantee the ABI is compatible ...
if it was, then it probably wouldn't have changed SONAMEs.
usually the libxxx.so symlink isn't generated on runtime systems. you need
to install extra dev packages to get it. so loading the SONAME directly is
almost always the right thing.
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-24 19:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24 16:07 [patch] libcc1: dynamic load versioned library Hector Oron
2015-03-24 16:33 ` Mark Kettenis
2015-03-24 17:06 ` Hector Oron
2015-03-24 19:46 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox