Revert "Revert "add libgmp to safe deps""

This reverts commit 04e63aa96c71a6bba1cf7549f68f02c7c9cb0b1e.