Fix -latomic for CMake packages

The poppler package failed to build for me with errors such as this one:

    host/aarch64-buildroot-linux-gnu/include/c++/10.3.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
       75 | #include_next <stdlib.h>
          |               ^~~~~~~~~~

Changing the CMake option to a link-specific one fixes the issue.

Also change other packages with the same issue: cutelyst, gerbera,
kf5-modemmanager-qt, kodi and wampcc.

Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Gleb Mazovetskiy 2021-04-13 07:26:14 +01:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent 862609b389
commit 7333207eaf
6 changed files with 6 additions and 7 deletions

View File

@ -18,7 +18,7 @@ CUTELYST_CONF_OPTS += \
# Qt 5.8 needs atomics, which on various architectures are in -latomic
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
CUTELYST_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
CUTELYST_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
ifeq ($(BR2_PACKAGE_LIBPWQUALITY),y)

View File

@ -20,7 +20,7 @@ GERBERA_CONF_OPTS = -DWITH_DEBUG=OFF
# Uses __atomic_fetch_add_4
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
GERBERA_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
GERBERA_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
ifeq ($(BR2_PACKAGE_DUKTAPE),y)

View File

@ -15,7 +15,7 @@ KF5_MODEMMANAGER_QT_INSTALL_STAGING = YES
# Uses __atomic_fetch_add_4
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
KF5_MODEMMANAGER_QT_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
KF5_MODEMMANAGER_QT_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
$(eval $(cmake-package))

View File

@ -60,7 +60,6 @@ KODI_EXTRA_DOWNLOADS += \
KODI_CONF_OPTS += \
-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(KODI_C_FLAGS)" \
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) $(KODI_CXX_FLAGS)" \
-DENABLE_APP_AUTONAME=OFF \
-DENABLE_CCACHE=OFF \
-DENABLE_DVDCSS=ON \
@ -184,7 +183,7 @@ endif
# mips: uses __atomic_load_8
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
KODI_CXX_FLAGS += -latomic
KODI_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),)

View File

@ -21,7 +21,7 @@ POPPLER_CONF_OPTS = \
-DENABLE_GTK_DOC=OFF
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
POPPLER_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
POPPLER_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
ifeq ($(BR2_PACKAGE_BOOST),y)

View File

@ -13,7 +13,7 @@ WAMPCC_LICENSE_FILES = LICENSE
# Uses __atomic_fetch_add_8
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
WAMPCC_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
WAMPCC_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
endif
$(eval $(cmake-package))