All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed
@ 2020-02-10 17:41 Fabrice Fontaine
  2020-02-11 22:42 ` Peter Korsgaard
  2020-03-11  7:09 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-02-10 17:41 UTC (permalink / raw)
  To: buildroot

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

/home/test/autobuild/run/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld: ../../lib/libOgreMain.so.1.12.0: undefined reference to `__atomic_fetch_add_8'

This is often for example the case on sparc v8 32 bits.

Fixes:
 - http://autobuild.buildroot.org/results/3a09e2d1d26b19243244eb7f9235c85488a788d2

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/ogre/ogre.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/ogre/ogre.mk b/package/ogre/ogre.mk
index f7711e41f1..253e022a73 100644
--- a/package/ogre/ogre.mk
+++ b/package/ogre/ogre.mk
@@ -39,4 +39,9 @@ else
 OGRE_CONF_OPTS += -DOGRE_BUILD_COMPONENT_PYTHON=OFF
 endif
 
+# Uses __atomic_fetch_add_8
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+OGRE_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+endif
+
 $(eval $(cmake-package))
-- 
2.24.1

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

* [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed
  2020-02-10 17:41 [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed Fabrice Fontaine
@ 2020-02-11 22:42 ` Peter Korsgaard
  2020-03-11  7:09 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-02-11 22:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> 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:

 > /home/test/autobuild/run/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld:
 > ../../lib/libOgreMain.so.1.12.0: undefined reference to
 > `__atomic_fetch_add_8'

 > This is often for example the case on sparc v8 32 bits.

 > Fixes:
 >  - http://autobuild.buildroot.org/results/3a09e2d1d26b19243244eb7f9235c85488a788d2

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed
  2020-02-10 17:41 [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed Fabrice Fontaine
  2020-02-11 22:42 ` Peter Korsgaard
@ 2020-03-11  7:09 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-03-11  7:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> 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:

 > /home/test/autobuild/run/instance-1/output-1/host/lib/gcc/xtensa-buildroot-linux-uclibc/8.3.0/../../../../xtensa-buildroot-linux-uclibc/bin/ld:
 > ../../lib/libOgreMain.so.1.12.0: undefined reference to
 > `__atomic_fetch_add_8'

 > This is often for example the case on sparc v8 32 bits.

 > Fixes:
 >  - http://autobuild.buildroot.org/results/3a09e2d1d26b19243244eb7f9235c85488a788d2

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2019.11.x, thanks (ogre not in 2019.02.x).

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2020-03-11  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-10 17:41 [Buildroot] [PATCH 1/1] package/ogre: link with libatomic when needed Fabrice Fontaine
2020-02-11 22:42 ` Peter Korsgaard
2020-03-11  7:09 ` Peter Korsgaard

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.