tags 797228 + patch thanks Hello,
I have attached patch created from upstream source: 2015-08-16 17:57 codesquid, revision 6931<http://svn.filezilla-project.org/filezilla?view=rev&revision=6931> * M /FileZilla3/trunk/configure.ac<http://svn.filezilla-project.org/filezilla/FileZilla3/trunk/configure.ac?r1=6931&r2=6930&pathrev=6931> * A /FileZilla3/trunk/m4/check_atomic.m4<http://svn.filezilla-project.org/filezilla/FileZilla3/trunk/m4/check_atomic.m4?revision=6931> Add check whether we need -latomic 2015-08-18 18:19 codesquid, revision 6938<http://svn.filezilla-project.org/filezilla?view=rev&revision=6938> * M /FileZilla3/trunk/m4/check_atomic.m4<http://svn.filezilla-project.org/filezilla/FileZilla3/trunk/m4/check_atomic.m4?r1=6938&r2=6937&pathrev=6938> Use LIBS instead of LDFLAGS in -latomic detection. With this patch package builds from source on mipsel successfully. Please consider including this patch to current package version. Thank you! Regards, Jurica
--- filezilla-3.12.0.2.orig/configure.ac +++ filezilla-3.12.0.2/configure.ac @@ -53,6 +53,9 @@ if ! test "$localesonly" = "yes"; then # No thread_local in GCC 4.7 and it for some reason isn't supported on OS X either CHECK_THREAD_LOCAL + # std::atomic on PPC seems to require -latomic + CHECK_ATOMIC + # Add build information to config.h # --------------------------------- --- /dev/null +++ filezilla-3.12.0.2/m4/check_atomic.m4 @@ -0,0 +1,39 @@ +# Some versions of gcc/libstdc++ require linking with -latomic if +# using the C++ atomic library. + +m4_define([_CHECK_ATOMIC_testbody], [[ + #include <atomic> + #include <cstdint> + + int main() { + std::atomic<int64_t> a{}; + + int64_t v = 5; + int64_t r = a.fetch_add(v); + return static_cast<int>(r); + } +]]) + +AC_DEFUN([CHECK_ATOMIC], [ + + AC_LANG_PUSH(C++) + + AC_MSG_CHECKING([whether std::atomic can be used without link library]) + + AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + LIBS="$LIBS -latomic" + AC_MSG_CHECKING([whether std::atomic needs -latomic]) + AC_LINK_IFELSE([AC_LANG_SOURCE([_CHECK_ATOMIC_testbody])],[ + AC_MSG_RESULT([yes]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_FAILURE([cannot figure our how to use std::atomic]) + ]) + ]) + + AC_LANG_POP +]) +