diff mbox series

[committed] libiberty: Use libiberty snprintf and vsnprintf on hppa*-*-hpux*

Message ID 3b27f993-2df0-360b-37f6-09e1bb05ef78@bell.net
State New
Headers show
Series [committed] libiberty: Use libiberty snprintf and vsnprintf on hppa*-*-hpux* | expand

Commit Message

John David Anglin June 5, 2021, 4:03 p.m. UTC
A recent change to gcc/c-family/c-attribs.c uses a c99 feature not supported by most
system versions of snprintf on hppa*-*-hpux*.  This change fixes the build.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

Committed to trunk.

libiberty/ChangeLog:

            PR target/100734
            * configure.ac: Use libiberty snprintf and vsnprintf on
            hppa*-*-hpux*.
            * configure: Regenerate.
diff mbox series

Patch

diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 3c03f24d368..a85ff25501a 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -611,6 +611,12 @@  if test -z "${setobjs}"; then
     ac_cv_func_getpagesize=yes
     ;;

+  hppa*-*-hpux*)
+    # Replace system snprintf and vsnprintf with libiberty implementations.
+    AC_LIBOBJ([snprintf])
+    AC_LIBOBJ([vsnprintf])
+    ;;
+
   *-*-mingw32*)
     # Under mingw32, sys_nerr and sys_errlist exist, but they are
     # macros, so the test below won't find them.