package/ogre: link with libatomic when needed
PATCH 1/1 package/ogre: 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:
/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
--- package/ogre/ogre.mk | 5 +++++ 1 file changed, 5 insertions(+)
package/ogre/ogre.mk +5 -0
@@ -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))
Signature · 1 line
2.24.1
PATCH 1/1 package/ogre: link with libatomic when needed
Quoted 10 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:
/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'
Quoted 6 lines
This is often for example the case on sparc v8 32 bits.
Fixes:
- http://autobuild.buildroot.org/results/3a09e2d1d26b19243244eb7f9235c85488a788d2Signed-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 package/ogre: link with libatomic when needed
In reply to Fabrice FontaineQuoted 10 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:
/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'
Quoted 6 lines
This is often for example the case on sparc v8 32 bits.
Fixes:
- http://autobuild.buildroot.org/results/3a09e2d1d26b19243244eb7f9235c85488a788d2Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2019.11.x, thanks (ogre not in 2019.02.x).
Signature · 1 line
Bye, Peter Korsgaard