Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] librtlsdr: disable shared library target
@ 2014-09-24 12:31 Yuvaraj Patil
  2014-09-24 13:33 ` Thomas Petazzoni
  2014-10-01 17:19 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Yuvaraj Patil @ 2014-09-24 12:31 UTC (permalink / raw)
  To: buildroot

Disable shared library target if BUILD_SHARES_LIBS is OFF.

Fixes:
http://autobuild.buildroot.net/results/d68/d68a23e2a57fd5430d74b8151931f36959d9578d//

Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
---
 ...01_disable_shared_library_target_in_build.patch |   80 ++++++++++++++++++++
 1 file changed, 80 insertions(+)
 create mode 100644 package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch

diff --git a/package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch b/package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch
new file mode 100644
index 0000000..b763c48
--- /dev/null
+++ b/package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch
@@ -0,0 +1,80 @@
+librtlsdr: disable shared library target in build
+
+Disable shared library target if BUILD_SHARED_LIBS if OFF.
+
+Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
+---
+diff -Nurp librtlsdr-v0.5.3_orig/src/CMakeLists.txt librtlsdr-v0.5.3/src/CMakeLists.txt
+--- librtlsdr-v0.5.3_orig/src/CMakeLists.txt	2014-09-24 17:31:40.610337074 +0530
++++ librtlsdr-v0.5.3/src/CMakeLists.txt	2014-09-24 17:32:38.838334632 +0530
+@@ -20,6 +20,7 @@
+ ########################################################################
+ # Setup library
+ ########################################################################
++if(BUILD_SHARED_LIBS)
+ add_library(rtlsdr_shared SHARED
+     librtlsdr.c
+     tuner_e4k.c
+@@ -37,6 +38,7 @@ set_target_properties(rtlsdr_shared PROP
+ set_target_properties(rtlsdr_shared PROPERTIES OUTPUT_NAME rtlsdr)
+ set_target_properties(rtlsdr_shared PROPERTIES SOVERSION ${MAJOR_VERSION})
+ set_target_properties(rtlsdr_shared PROPERTIES VERSION ${LIBVER})
++endif()
+ 
+ add_library(rtlsdr_static STATIC
+     librtlsdr.c
+@@ -71,6 +73,12 @@ if(NOT WIN32)
+ set_target_properties(rtlsdr_static PROPERTIES OUTPUT_NAME rtlsdr)
+ endif()
+ 
++if(BUILD_SHARED_LIBS)
++set(rtlsdr_lib rtlsdr_shared)
++else()
++set(rtlsdr_lib rtlsdr_static)
++endif()
++
+ ########################################################################
+ # Build utility
+ ########################################################################
+@@ -81,33 +89,33 @@ add_executable(rtl_fm rtl_fm.c)
+ add_executable(rtl_eeprom rtl_eeprom.c)
+ add_executable(rtl_adsb rtl_adsb.c)
+ add_executable(rtl_power rtl_power.c)
+-set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power)
++set(INSTALL_TARGETS ${rtlsdr_lib} rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power)
+ 
+-target_link_libraries(rtl_sdr rtlsdr_shared convenience_static
++target_link_libraries(rtl_sdr ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_tcp rtlsdr_shared convenience_static
++target_link_libraries(rtl_tcp ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_test rtlsdr_shared convenience_static
++target_link_libraries(rtl_test ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_fm rtlsdr_shared convenience_static
++target_link_libraries(rtl_fm ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_eeprom rtlsdr_shared convenience_static
++target_link_libraries(rtl_eeprom ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_adsb rtlsdr_shared convenience_static
++target_link_libraries(rtl_adsb ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
+-target_link_libraries(rtl_power rtlsdr_shared convenience_static
++target_link_libraries(rtl_power ${rtlsdr_lib} convenience_static
+     ${LIBUSB_LIBRARIES}
+     ${CMAKE_THREAD_LIBS_INIT}
+ )
-- 
1.7.9.5

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

* [Buildroot] [PATCH] librtlsdr: disable shared library target
  2014-09-24 12:31 [Buildroot] [PATCH] librtlsdr: disable shared library target Yuvaraj Patil
@ 2014-09-24 13:33 ` Thomas Petazzoni
  2014-09-28 11:51   ` Samuel Martin
  2014-10-01 17:19 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2014-09-24 13:33 UTC (permalink / raw)
  To: buildroot

Dear Yuvaraj Patil,

On Wed, 24 Sep 2014 18:01:55 +0530, Yuvaraj Patil wrote:
> Disable shared library target if BUILD_SHARES_LIBS is OFF.
> 
> Fixes:
> http://autobuild.buildroot.net/results/d68/d68a23e2a57fd5430d74b8151931f36959d9578d//
> 
> Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
> ---
>  ...01_disable_shared_library_target_in_build.patch |   80 ++++++++++++++++++++
>  1 file changed, 80 insertions(+)
>  create mode 100644 package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch

Thanks, but we already have a patch fixing the same issue in our patch
queue, see http://patchwork.ozlabs.org/patch/384567/. Apparently, the
patch is causing some issues.

Samuel, what is your plan regarding librtlsdr static link issue?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] librtlsdr: disable shared library target
  2014-09-24 13:33 ` Thomas Petazzoni
@ 2014-09-28 11:51   ` Samuel Martin
  2014-10-01 17:20     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Samuel Martin @ 2014-09-28 11:51 UTC (permalink / raw)
  To: buildroot

Hi Yuvaraj, Thomas, all,

On Wed, Sep 24, 2014 at 3:33 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Yuvaraj Patil,
>
> On Wed, 24 Sep 2014 18:01:55 +0530, Yuvaraj Patil wrote:
>> Disable shared library target if BUILD_SHARES_LIBS is OFF.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/d68/d68a23e2a57fd5430d74b8151931f36959d9578d//
>>
>> Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
>> ---
>>  ...01_disable_shared_library_target_in_build.patch |   80 ++++++++++++++++++++
>>  1 file changed, 80 insertions(+)
>>  create mode 100644 package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch
>
> Thanks, but we already have a patch fixing the same issue in our patch
> queue, see http://patchwork.ozlabs.org/patch/384567/. Apparently, the
> patch is causing some issues.
>
> Samuel, what is your plan regarding librtlsdr static link issue?

The patch added with this pathc is similar to the 2nd patch added in
http://patchwork.ozlabs.org/patch/384567/.

In http://patchwork.ozlabs.org/patch/384567/, the first patch is
causing some issue.
After checking the libusb dependencies, this first patch is not needed
in the context of Buildroot because when BR2_PREFER_STATIC_LIBS=y,
libusb won't depend on any library.

IMO, this patch can be merged as is, and
http://patchwork.ozlabs.org/patch/384567/ can be marked as superseded.


Regards,


-- 
Samuel

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

* [Buildroot] [PATCH] librtlsdr: disable shared library target
  2014-09-24 12:31 [Buildroot] [PATCH] librtlsdr: disable shared library target Yuvaraj Patil
  2014-09-24 13:33 ` Thomas Petazzoni
@ 2014-10-01 17:19 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-01 17:19 UTC (permalink / raw)
  To: buildroot

Dear Yuvaraj Patil,

On Wed, 24 Sep 2014 18:01:55 +0530, Yuvaraj Patil wrote:
> Disable shared library target if BUILD_SHARES_LIBS is OFF.
> 
> Fixes:
> http://autobuild.buildroot.net/results/d68/d68a23e2a57fd5430d74b8151931f36959d9578d//
> 
> Signed-off-by: Yuvaraj Patil <yuvaraj.patil@wipro.com>
> ---
>  ...01_disable_shared_library_target_in_build.patch |   80 ++++++++++++++++++++
>  1 file changed, 80 insertions(+)
>  create mode 100644 package/librtlsdr/librtlsdr_001_disable_shared_library_target_in_build.patch

Thanks, patch applied.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] librtlsdr: disable shared library target
  2014-09-28 11:51   ` Samuel Martin
@ 2014-10-01 17:20     ` Thomas Petazzoni
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2014-10-01 17:20 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Sun, 28 Sep 2014 13:51:25 +0200, Samuel Martin wrote:

> > Thanks, but we already have a patch fixing the same issue in our patch
> > queue, see http://patchwork.ozlabs.org/patch/384567/. Apparently, the
> > patch is causing some issues.
> >
> > Samuel, what is your plan regarding librtlsdr static link issue?
> 
> The patch added with this pathc is similar to the 2nd patch added in
> http://patchwork.ozlabs.org/patch/384567/.
> 
> In http://patchwork.ozlabs.org/patch/384567/, the first patch is
> causing some issue.
> After checking the libusb dependencies, this first patch is not needed
> in the context of Buildroot because when BR2_PREFER_STATIC_LIBS=y,
> libusb won't depend on any library.
> 
> IMO, this patch can be merged as is, and
> http://patchwork.ozlabs.org/patch/384567/ can be marked as superseded.

Thanks for the explanation. Next time, could you add your
formal Reviewed-by, Acked-by or Tested-by?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2014-10-01 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 12:31 [Buildroot] [PATCH] librtlsdr: disable shared library target Yuvaraj Patil
2014-09-24 13:33 ` Thomas Petazzoni
2014-09-28 11:51   ` Samuel Martin
2014-10-01 17:20     ` Thomas Petazzoni
2014-10-01 17:19 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox