diff --git a/math/Makefile b/math/Makefile
index 2735212..c1d7676 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -193,7 +193,8 @@ endif
 ifneq (no,$(PERL))
 libm-vec-tests = $(addprefix test-,$(libmvec-tests))
 
-libm-tests = $(foreach t,$(types),test-$(t) test-$(t)-finite test-i$(t)) \
+libm-tests = $(foreach t,$(types),test-$(t) test-$(t)-finite test-i$(t) \
+				  test-$(t)-ieee) \
 	     $(libm-vec-tests)
 
 libm-tests.o = $(addsuffix .o,$(libm-tests))
@@ -334,6 +335,10 @@ CFLAGS-test-flt-eval-method.c = -fexcess-precision=standard
 
 CFLAGS-test-fe-snans-always-signal.c = -fsignaling-nans
 
+LDLIBS-test-float-ieee = -lieee
+LDLIBS-test-double-ieee = -lieee
+LDLIBS-test-ldouble-ieee = -lieee
+
 # The -lieee module sets the _LIB_VERSION_ switch to IEEE mode
 # for error handling in the -lm functions.
 install-lib += libieee.a
diff --git a/math/libm-test-support.c b/math/libm-test-support.c
index d387f81..dabf6bc 100644
--- a/math/libm-test-support.c
+++ b/math/libm-test-support.c
@@ -619,7 +619,9 @@ check_float_internal (const char *test_name, FLOAT computed, FLOAT expected,
   int errno_value = errno;
 
   test_exceptions (test_name, exceptions);
-  test_errno (test_name, errno_value, exceptions);
+  /* IEEE error handling (via libieee) doesn't support errno.  */
+  if (_LIB_VERSION != _IEEE_)
+    test_errno (test_name, errno_value, exceptions);
   if (exceptions & IGNORE_RESULT)
     goto out;
   if (issignaling (computed) && issignaling (expected))
diff --git a/math/test-double-ieee.c b/math/test-double-ieee.c
new file mode 100644
index 0000000..f638c45
--- /dev/null
+++ b/math/test-double-ieee.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "test-double.c"
diff --git a/math/test-float-ieee.c b/math/test-float-ieee.c
new file mode 100644
index 0000000..88b68e1
--- /dev/null
+++ b/math/test-float-ieee.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "test-float.c"
diff --git a/math/test-ldouble-ieee.c b/math/test-ldouble-ieee.c
new file mode 100644
index 0000000..e8c3cc6
--- /dev/null
+++ b/math/test-ldouble-ieee.c
@@ -0,0 +1,18 @@
+/* Copyright (C) 2017 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include "test-ldouble.c"
