Index: gtsam/wrap/cmake/PybindWrap.cmake
===================================================================
--- gtsam.orig/wrap/cmake/PybindWrap.cmake
+++ gtsam/wrap/cmake/PybindWrap.cmake
@@ -112,6 +112,29 @@ function(
   # https://lists.debian.org/debian-devel/2023/08/msg00156.html
   target_compile_options(${target} PRIVATE -O0 -g0)
 
+  # On mipsel I see linker errors when linking the Python bindings:
+  #
+  #   /usr/bin/c++ ... -o gtsam/gtsam.cpython-311-mips64el-linux-gnuabi64.so ...
+  #
+  #   CMakeFiles/gtsam_py.dir/gtsam.cpp.o: in function `PyObject_TypeCheck':
+  #   gtsam.cpp:(.text+0x13c): relocation truncated to fit: R_MIPS_CALL16 against `PyType_IsSubtype'
+  #   CMakeFiles/gtsam_py.dir/gtsam.cpp.o: in function `Py_DECREF':
+  #   gtsam.cpp:(.text+0x210): relocation truncated to fit: R_MIPS_CALL16 against `_Py_Dealloc'
+  #   CMakeFiles/gtsam_py.dir/gtsam.cpp.o: in function `gtsam::utilities::createKeyList(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&)':
+  #   gtsam.cpp:(.text+0x558): relocation truncated to fit: R_MIPS_GOT_DISP against `__stack_chk_guard@@GLIBC_2.4'
+  #   gtsam.cpp:(.text+0x664): relocation truncated to fit: R_MIPS_GOT_DISP against `__stack_chk_guard@@GLIBC_2.4'
+  #   gtsam.cpp:(.text+0x678): relocation truncated to fit: R_MIPS_CALL16 against `__stack_chk_fail@@GLIBC_2.4'
+  #   gtsam.cpp:(.text+0x688): relocation truncated to fit: R_MIPS_CALL16 against `_Unwind_Resume@@GCC_3.0'
+  #   ....
+  #
+  # A similar issue has been found and worked-around in a different Debian
+  # package. I do something similar here:
+  #
+  #   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827651
+  if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "mips64")
+     target_compile_options(${target} PRIVATE -mxgot)
+  endif()
+
   if(APPLE)
     # `type_info` objects will become "weak private external" if the templated
     # class is initialized implicitly even if we explicitly export them with
