Skip to contentSkip to conversation

package/botan: link with libatomic when needed

PATCH New Fabrice Fontaine 3 participants 3 messages Feb 15, 2019 – Mar 15, 2019

lore
Share & tools
lore
#0 lore raw

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

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

This is often for example the case on sparcv8 32 bit.

Fixes:
- http://autobuild.buildroot.org/results/a442734c570e4a02854014d831ba3aab9f592430

---
 package/botan/botan.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/botan/botan.mk +7 -0
index e07b786c85..a96a12178b 100644
@@ -17,9 +17,16 @@ BOTAN_CONF_OPTS = \
 	--os=linux \
 	--cc=gcc \
 	--cc-bin="$(TARGET_CXX)" \
+	--ldflags="$(BOTAN_LDFLAGS)" \
 	--prefix=/usr \
 	--without-documentation
 
+BOTAN_LDFLAGS = $(TARGET_LDFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+BOTAN_LDFLAGS += -latomic
+endif
+
 ifeq ($(BR2_SHARED_LIBS),y)
 BOTAN_CONF_OPTS += \
 	--disable-static-library \
Signature · 1 line
2.14.1
#1 lore raw

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

Quoted 1 line · On Fri, 15 Feb 2019 23:01:10 +0100 Fabrice Fontaine…

On some architectures, atomic binutils are provided by the libatomic

built-ins, not "binutils" :-)

Quoted 11 lines

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

This is often for example the case on sparcv8 32 bit.

Fixes:
- http://autobuild.buildroot.org/results/a442734c570e4a02854014d831ba3aab9f592430

Applied to master. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

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

In reply to Fabrice Fontaine
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

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 8 lines

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

This is often for example the case on sparcv8 32 bit.

Fixes:
- http://autobuild.buildroot.org/results/a442734c570e4a02854014d831ba3aab9f592430

Committed to 2018.11.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard