diff --git a/templates/gmp/template b/templates/gmp/template
index d8a89b8c61..25743529e5 100644
--- a/templates/gmp/template
+++ b/templates/gmp/template
@@ -4,6 +4,8 @@ version=4.3.1
 revision=1
 distfiles="ftp://ftp.gmplib.org/pub/gmp-$version/gmp-$version.tar.bz2"
 build_style=gnu_configure
+# Build with -fexceptions as suggested by ppl.
+CPPFLAGS="-fexceptions"
 if [ "$xbps_machine" != "x86_64" ]; then
 	configure_args="--build=${xbps_machine}-pc-linux-gnu"
 fi