Skip to contentSkip to conversation

package/gqrx: link with libatomic when needed

PATCH New Gwenhael Goavec-Merou 2 participants 2 messages Feb 22, 2019 – Mar 3, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gqrx: link with libatomic when needed

From: Gwenhael Goavec-Merou <[email protected]>

On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line

Fixes:
- http://autobuild.buildroot.net/results/a003ad5324a0c0f55cb8db5d3e5d69bd21999e16/
- http://autobuild.buildroot.net/results/464602175d026d135125e5baa00e0729aec7a931/

---
 package/gqrx/gqrx.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/gqrx/gqrx.mk +4 -0
index b51bb23eaf..4dbef47222 100644
@@ -12,4 +12,8 @@ GQRX_DEPENDENCIES = boost gnuradio gr-osmosdr qt5base qt5svg
 
 GQRX_CONF_OPTS = -DLINUX_AUDIO_BACKEND=Gr-audio
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GQRX_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
+endif
+
 $(eval $(cmake-package))
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/gqrx: link with libatomic when needed

Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gwenhael" == Gwenhael Goavec-Merou <[email protected]> writes:

From: Gwenhael Goavec-Merou <[email protected]> On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:

Quoted 7 lines

sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line

Fixes:
- http://autobuild.buildroot.net/results/a003ad5324a0c0f55cb8db5d3e5d69bd21999e16/
- http://autobuild.buildroot.net/results/464602175d026d135125e5baa00e0729aec7a931/

We also need to ensure gqrx can only be enabled on architectures where sync or libatomic is available, so I added that and a comment explaining why and committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard