diff --git a/math/Versions b/math/Versions
index 2611a6872f..e619f950f7 100644
--- a/math/Versions
+++ b/math/Versions
@@ -675,5 +675,6 @@ libm {
     # No SVID compatible error handling.
     log10f;
     lgammaf; lgammaf_r;
+    acosf;
   }
 }
diff --git a/math/w_acosf.c b/math/w_acosf.c
new file mode 100644
index 0000000000..aa59a35264
--- /dev/null
+++ b/math/w_acosf.c
@@ -0,0 +1,8 @@
+#include <math-type-macros-float.h>
+#undef __USE_WRAPPER_TEMPLATE
+#define __USE_WRAPPER_TEMPLATE 1
+#undef declare_mgen_alias
+#define declare_mgen_alias(a, b)
+#include <w_acos_template.c>
+versioned_symbol (libm, __acosf, acosf, GLIBC_2_42);
+libm_alias_float_other (__acosf, acosf)
diff --git a/math/w_acosf_compat.c b/math/w_acosf_compat.c
index e7037989f0..28754af265 100644
--- a/math/w_acosf_compat.c
+++ b/math/w_acosf_compat.c
@@ -22,10 +22,10 @@
 #include <libm-alias-float.h>
 
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_42)
 /* wrapper acosf */
 float
-__acosf (float x)
+__acos_compatf (float x)
 {
   if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0)
       && _LIB_VERSION != _IEEE_)
@@ -37,5 +37,9 @@ __acosf (float x)
 
   return __ieee754_acosf (x);
 }
-libm_alias_float (__acos, acos)
+# ifdef NO_COMPAT_NEEDED
+libm_alias_float (__acos_compat, acos)
+# else
+compat_symbol (libm, __acos_compatf, acosf, GLIBC_2_0);
+# endif
 #endif
diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c
index a5a4de4fc2..96e49f0c63 100644
--- a/sysdeps/ieee754/flt-32/e_acosf.c
+++ b/sysdeps/ieee754/flt-32/e_acosf.c
@@ -29,6 +29,8 @@ SOFTWARE.
 #include <math_private.h>
 #include <libm-alias-finite.h>
 #include <math-barriers.h>
+#include <libm-alias-float.h>
+#include <math-svid-compat.h>
 #include "math_config.h"
 
 static __attribute__ ((noinline)) float
@@ -65,7 +67,7 @@ poly12 (double z, const double *c)
 }
 
 float
-__ieee754_acosf (float x)
+__acosf (float x)
 {
   double pi2 = 0x1.921fb54442d18p+0;
   static const double o[] = { 0, 0x1.921fb54442d18p+1 };
@@ -140,4 +142,11 @@ __ieee754_acosf (float x)
     }
   return r;
 }
+strong_alias (__acosf, __ieee754_acosf)
+#if LIBM_SVID_COMPAT
+versioned_symbol (libm, __acosf, acosf, GLIBC_2_42);
+libm_alias_float_other (__acos, acos)
+#else
+libm_alias_float (__acos, acos)
+#endif
 libm_alias_finite (__ieee754_acosf, __acosf)
diff --git a/sysdeps/ieee754/flt-32/w_acosf.c b/sysdeps/ieee754/flt-32/w_acosf.c
new file mode 100644
index 0000000000..1cc8931700
--- /dev/null
+++ b/sysdeps/ieee754/flt-32/w_acosf.c
@@ -0,0 +1 @@
+/* Not needed.  */
diff --git a/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c b/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c
new file mode 100644
index 0000000000..c49aeb2e06
--- /dev/null
+++ b/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c
@@ -0,0 +1,8 @@
+/* m68k provides an optimized __ieee754_acosf.  */
+#ifdef SHARED
+# define NO_COMPAT_NEEDED 1
+# include <math/w_acosf_compat.c>
+#else
+# include <math-type-macros-float.h>
+# include <w_acos_template.c>
+#endif
diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist
index 050722cb73..069f6839af 100644
--- a/sysdeps/mach/hurd/i386/libm.abilist
+++ b/sysdeps/mach/hurd/i386/libm.abilist
@@ -1277,6 +1277,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist
index 41bd47abeb..608dc3af3a 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist
@@ -1245,6 +1245,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist
index 02a85f4998..9640285af3 100644
--- a/sysdeps/unix/sysv/linux/alpha/libm.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist
@@ -1404,6 +1404,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist
index 5b0eabbc7c..2d2927bfa3 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist
index 5b0eabbc7c..2d2927bfa3 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist
index 6efb2e5e83..0fc179462f 100644
--- a/sysdeps/unix/sysv/linux/hppa/libm.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist
index 4b277fa849..f226ddf60d 100644
--- a/sysdeps/unix/sysv/linux/i386/libm.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libm.abilist
@@ -1284,6 +1284,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
index 5b0eabbc7c..2d2927bfa3 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
index dad4910e3b..254d54c946 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
index dad4910e3b..254d54c946 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
index 2435460eef..67e5314104 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
index d1fe3c91ea..515a9446ea 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
@@ -1245,6 +1245,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
index d46ae7cef1..f6bc97d98b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
@@ -1067,6 +1067,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
index e90314df44..7a6854f8e2 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
@@ -1066,6 +1066,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
index 9e84016a29..923e079978 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
@@ -1060,6 +1060,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
index 685cad8e2c..8ec0f6dd8b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
@@ -1429,6 +1429,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
index 0c5b2d0aaf..400aac290c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
@@ -1348,6 +1348,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
index be929adce1..2c3f38d54b 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
@@ -1348,6 +1348,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist
index bb3dcaebf7..848ddfd475 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist
index bb3dcaebf7..848ddfd475 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist
@@ -920,6 +920,7 @@ GLIBC_2.41 tanpif32 F
 GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
index ff5f932ddf..d47b24a0da 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
@@ -1355,6 +1355,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
index 052a0012fe..4d0ce6d826 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
@@ -1245,6 +1245,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
index 0794c4ad52..887ee28cda 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
@@ -1278,6 +1278,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
index 19ffca6af2..69aa9901f7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist
@@ -1278,6 +1278,7 @@ GLIBC_2.41 tanpif32x F
 GLIBC_2.41 tanpif64 F
 GLIBC_2.41 tanpif64x F
 GLIBC_2.41 tanpil F
+GLIBC_2.42 acosf F
 GLIBC_2.42 lgammaf F
 GLIBC_2.42 lgammaf_r F
 GLIBC_2.42 log10f F
