diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index edb9b2f73a..99d7047b5f 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -144,7 +144,11 @@ HOST_GCC_FINAL_POST_INSTALL_HOOKS += TOOLCHAIN_WRAPPER_INSTALL # -cc symlink to the wrapper is not created. HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS -GCC_FINAL_LIBS = libatomic +GCC_FINAL_LIBS = + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +GCC_FINAL_LIBS += libatomic +endif ifeq ($(BR2_STATIC_LIBS),) GCC_FINAL_LIBS += libgcc_s