All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libtracecmd: don't ignore LDFLAGS when linking the shared libs
@ 2021-11-11 18:03 Jerome Marchand
  2021-11-11 18:11 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Jerome Marchand @ 2021-11-11 18:03 UTC (permalink / raw)
  To: linux-trace-devel

do_compile_shared_library should't ignore LDFLAGS. That makes it
difficult for packager to follow their distribution packaging
guidelines.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
 scripts/utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/utils.mk b/scripts/utils.mk
index 6865a746..53b2b074 100644
--- a/scripts/utils.mk
+++ b/scripts/utils.mk
@@ -72,7 +72,7 @@ do_build_static_lib =				\
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
-	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
+	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
 
 do_compile_plugin_obj =				\
 	($(print_plugin_obj_compile)		\
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libtracecmd: don't ignore LDFLAGS when linking the shared libs
  2021-11-11 18:03 [PATCH] libtracecmd: don't ignore LDFLAGS when linking the shared libs Jerome Marchand
@ 2021-11-11 18:11 ` Steven Rostedt
  2021-11-11 18:24   ` Jerome Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2021-11-11 18:11 UTC (permalink / raw)
  To: Jerome Marchand; +Cc: linux-trace-devel

On Thu, 11 Nov 2021 19:03:18 +0100
"Jerome Marchand" <jmarchan@redhat.com> wrote:

> do_compile_shared_library should't ignore LDFLAGS. That makes it
> difficult for packager to follow their distribution packaging
> guidelines.
> 
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>

Thanks Jerome, I'll queue this up.

Looks like libtracefs may suffer from the same issue (and libtraceevent
looks fine).

  https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
  https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/

Did you want to submit a patch for libtracefs too?

-- Steve

> ---
>  scripts/utils.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/utils.mk b/scripts/utils.mk
> index 6865a746..53b2b074 100644
> --- a/scripts/utils.mk
> +++ b/scripts/utils.mk
> @@ -72,7 +72,7 @@ do_build_static_lib =				\
>  
>  do_compile_shared_library =			\
>  	($(print_shared_lib_compile)		\
> -	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
> +	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
>  
>  do_compile_plugin_obj =				\
>  	($(print_plugin_obj_compile)		\


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libtracecmd: don't ignore LDFLAGS when linking the shared libs
  2021-11-11 18:11 ` Steven Rostedt
@ 2021-11-11 18:24   ` Jerome Marchand
  0 siblings, 0 replies; 3+ messages in thread
From: Jerome Marchand @ 2021-11-11 18:24 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-devel

On 11/11/2021 19:11, Steven Rostedt wrote:
> On Thu, 11 Nov 2021 19:03:18 +0100
> "Jerome Marchand" <jmarchan@redhat.com> wrote:
> 
>> do_compile_shared_library should't ignore LDFLAGS. That makes it
>> difficult for packager to follow their distribution packaging
>> guidelines.
>>
>> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
> 
> Thanks Jerome, I'll queue this up.
> 
> Looks like libtracefs may suffer from the same issue (and libtraceevent
> looks fine).
> 
>    https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/
>    https://git.kernel.org/pub/scm/libs/libtrace/libtraceevent.git/
> 
> Did you want to submit a patch for libtracefs too?

No, it wasn't my intention since I haven't noticed that, but it looks 
like pretty much the same patch would apply.

Jerome

> 
> -- Steve
> 
>> ---
>>   scripts/utils.mk | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/utils.mk b/scripts/utils.mk
>> index 6865a746..53b2b074 100644
>> --- a/scripts/utils.mk
>> +++ b/scripts/utils.mk
>> @@ -72,7 +72,7 @@ do_build_static_lib =				\
>>   
>>   do_compile_shared_library =			\
>>   	($(print_shared_lib_compile)		\
>> -	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LIBS))
>> +	$(CC) --shared $^ '-Wl,-soname,$(@F),-rpath=$$ORIGIN' -o $@ $(LDFLAGS) $(LIBS))
>>   
>>   do_compile_plugin_obj =				\
>>   	($(print_plugin_obj_compile)		\
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-11 18:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 18:03 [PATCH] libtracecmd: don't ignore LDFLAGS when linking the shared libs Jerome Marchand
2021-11-11 18:11 ` Steven Rostedt
2021-11-11 18:24   ` Jerome Marchand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.