--- a/cmake/fc.cmake
+++ b/cmake/fc.cmake
@@ -48,7 +48,7 @@
     set(FCOMMON_OPT "${FCOMMON_OPT} -fno-optimize-sibling-calls")
     if (NOT NO_LAPACK)
       # Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
-      set(EXTRALIB "${EXTRALIB} -lgfortran")
+      set(EXTRALIB "${EXTRALIB} -lgfortran -lquadmath")
     endif ()
   endif ()
   if (NO_BINARY_MODE)
