kumquat-buildroot/package/ogre/ogre.mk
Fabrice Fontaine bc88757481 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

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-11 23:42:27 +01:00

48 lines
1.3 KiB
Makefile

################################################################################
#
# ogre
#
################################################################################
OGRE_VERSION = 1.12.0
OGRE_SITE = $(call github,OGRECave,ogre,v$(OGRE_VERSION))
OGRE_LICENSE = MIT (main library, DeferredShadingMedia samples), Public Domain (samples and plugins), Zlib (tinyxml)
OGRE_LICENSE_FILES = LICENSE
OGRE_INSTALL_STAGING = YES
# Ogre use a bundled version of tinyxml
OGRE_DEPENDENCIES = host-pkgconf \
freetype \
libfreeimage \
libgl \
libglu \
sdl2 \
xlib_libX11 \
xlib_libXaw \
xlib_libXext \
xlib_libXrandr \
zziplib
# Unbundle freetype and zziplib.
# Disable java and nvidia cg support.
OGRE_CONF_OPTS = -DOGRE_BUILD_DEPENDENCIES=OFF \
-DOGRE_BUILD_COMPONENT_JAVA=OFF \
-DOGRE_BUILD_PLUGIN_CG=OFF \
-DOGRE_INSTALL_DOCS=OFF
# Enable optional python component if python interpreter is present on the target.
ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
OGRE_DEPENDENCIES += host-swig \
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
OGRE_CONF_OPTS += -DOGRE_BUILD_COMPONENT_PYTHON=ON
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))