From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1879) id E7F003858C50; Mon, 2 May 2022 16:09:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7F003858C50 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Simon Marchi To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org Subject: [binutils-gdb] gnulib: update to bd11400942d6 X-Act-Checkin: binutils-gdb X-Git-Author: Simon Marchi X-Git-Refname: refs/heads/master X-Git-Oldrev: 73a7911e8e5f77145f93cfc5f6596aead79f6fee X-Git-Newrev: b318629fe742b2d9595eee1a2c35e81149ba33b2 Message-Id: <20220502160949.E7F003858C50@sourceware.org> Date: Mon, 2 May 2022 16:09:49 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2022 16:09:50 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db318629fe742= b2d9595eee1a2c35e81149ba33b2 commit b318629fe742b2d9595eee1a2c35e81149ba33b2 Author: Simon Marchi Date: Fri Apr 29 08:39:24 2022 -0400 gnulib: update to bd11400942d6 =20 Update the gnulib import to fixes these issues: =20 - GDB build with clang + glibc < 2.33. =20 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=3Dd6a07b4= dc21b3118727743142c678858df442853 https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00072.ht= ml =20 With glibc < 2.33, gnulib (since relatively recently) enables a replacement for free (see gnulib/import/m4/free.m4). In that path, clang shows this error: =20 make[2]: Entering directory '/home/smarchi/build/binutils-gdb-c= lang/gdbsupport' CXX agent.o In file included from /home/smarchi/src/binutils-gdb/gdbsupport= /agent.cc:20: In file included from /home/smarchi/src/binutils-gdb/gdbsupport= /common-defs.h:95: ../gnulib/import/string.h:636:19: error: exception specificatio= n in declaration does not match previous declaration _GL_EXTERN_C void free (void *) throw (); ^ ../gnulib/import/stdlib.h:737:17: note: expanded from macro 'fr= ee' # define free rpl_free ^ ../gnulib/import/stdlib.h:739:1: note: previous declaration is = here _GL_FUNCDECL_RPL (free, void, (void *ptr)); ^ ../gnulib/import/sys/select.h:251:23: note: expanded from macro= '_GL_FUNCDECL_RPL' _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attri= butes) ^ :139:1: note: expanded from here rpl_free ^ =20 The gnulib commit mentioned fixes the exception specification of `f= ree`. =20 - GDB build on RHEL 7: =20 CC libgnu_a-openat-proc.o In file included from /usr/include/string.h:633, from ./string.h:41, from ../../../binutils-gdb/gnulib/import/openat-pr= oc.c:30: ./string.h:1105:1: error: expected identifier or '(' before '__exte= nsion__' 1105 | _GL_FUNCDECL_SYS (strndup, char *, | ^~~~~~~~~~~~~~~~ =20 https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=3D84863a1c= 4dc8cca8fb0f6f670f67779cdd2d543b https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00075.html =20 Change-Id: Ibd51302feece6f385d0c53e0d08921b5d95e2776 Diff: --- gnulib/config.in | 4 ++++ gnulib/configure | 4 ++-- gnulib/import/glob.c | 3 ++- gnulib/import/m4/glob.m4 | 6 +++--- gnulib/import/m4/gnulib-common.m4 | 6 +++++- gnulib/import/stdlib.in.h | 4 ++++ gnulib/import/string.in.h | 4 ++-- gnulib/import/verify.h | 3 +++ gnulib/update-gnulib.sh | 2 +- 9 files changed, 26 insertions(+), 10 deletions(-) diff --git a/gnulib/config.in b/gnulib/config.in index f9cce7b6aa9..07efd1334fa 100644 --- a/gnulib/config.in +++ b/gnulib/config.in @@ -1613,6 +1613,10 @@ #endif =20 #ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <=3D 201710 \ + && _GL_GNUC_PREREQ (4, 6)) +# pragma GCC diagnostic ignored "-Wpedantic" +# endif # define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) #else # define _GL_HAS_C_ATTRIBUTE(attr) 0 diff --git a/gnulib/configure b/gnulib/configure index 26f24670b0d..cc7e8287d5a 100644 --- a/gnulib/configure +++ b/gnulib/configure @@ -27062,7 +27062,7 @@ if ${gl_cv_glob_omit_nondir_symlinks+:} false; then= : $as_echo_n "(cached) " >&6 else if test $cross_compiling !=3D yes; then - if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-fi= le + if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$= $-file then gl_cv_glob_omit_nondir_symlinks=3Dmaybe else @@ -27101,7 +27101,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out c= onftest$ac_exeext \ fi =20 fi - rm -f conf$$-globtest + rm -f conf$$-file conf$$-globtest else gl_cv_glob_omit_nondir_symlinks=3D"$gl_cross_guess_normal" fi diff --git a/gnulib/import/glob.c b/gnulib/import/glob.c index f6993a37064..57cb3bd1d1c 100644 --- a/gnulib/import/glob.c +++ b/gnulib/import/glob.c @@ -1357,7 +1357,8 @@ glob_in_dir (const char *pattern, const char *directo= ry, int flags, } else { - int dfd =3D dirfd (stream); + DIR *dirp =3D stream; + int dfd =3D dirfd (dirp); int fnm_flags =3D ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)); flags |=3D GLOB_MAGCHAR; diff --git a/gnulib/import/m4/glob.m4 b/gnulib/import/m4/glob.m4 index cf5f93930c1..f59b84ff057 100644 --- a/gnulib/import/m4/glob.m4 +++ b/gnulib/import/m4/glob.m4 @@ -1,4 +1,4 @@ -# glob.m4 serial 25 +# glob.m4 serial 26 dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -70,7 +70,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION =3D=3D 1 || _GNU_GLOB_= INTERFACE_VERSION =3D=3D 2 ? 1 AC_CACHE_CHECK([whether glob NOTDIR*/ omits symlink to nondir], [gl_cv_glob_omit_nondir_symlinks], [if test $cross_compiling !=3D yes; then - if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-fi= le + if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$= $-file then gl_cv_glob_omit_nondir_symlinks=3Dmaybe else @@ -94,7 +94,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION =3D=3D 1 || _GNU_GLOB_= INTERFACE_VERSION =3D=3D 2 ? 1 : ]) fi - rm -f conf$$-globtest + rm -f conf$$-file conf$$-globtest else gl_cv_glob_omit_nondir_symlinks=3D"$gl_cross_guess_normal" fi diff --git a/gnulib/import/m4/gnulib-common.m4 b/gnulib/import/m4/gnulib-co= mmon.m4 index c5ced04f181..30911d1581a 100644 --- a/gnulib/import/m4/gnulib-common.m4 +++ b/gnulib/import/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 72 +# gnulib-common.m4 serial 73 dnl Copyright (C) 2007-2022 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -106,6 +106,10 @@ AC_DEFUN([gl_COMMON_BODY], [ #endif =20 #ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <=3D 201710 \ + && _GL_GNUC_PREREQ (4, 6)) +# pragma GCC diagnostic ignored "-Wpedantic" +# endif # define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__) #else # define _GL_HAS_C_ATTRIBUTE(attr) 0 diff --git a/gnulib/import/stdlib.in.h b/gnulib/import/stdlib.in.h index d52c2f79638..a86643c3ca3 100644 --- a/gnulib/import/stdlib.in.h +++ b/gnulib/import/stdlib.in.h @@ -184,7 +184,11 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " # undef free # define free rpl_free # endif +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >=3D 14) > 2) +_GL_FUNCDECL_RPL (free, void, (void *ptr) throw ()); +# else _GL_FUNCDECL_RPL (free, void, (void *ptr)); +# endif _GL_CXXALIAS_RPL (free, void, (void *ptr)); # else _GL_CXXALIAS_SYS (free, void, (void *ptr)); diff --git a/gnulib/import/string.in.h b/gnulib/import/string.in.h index b6840fa9121..33160b25254 100644 --- a/gnulib/import/string.in.h +++ b/gnulib/import/string.in.h @@ -583,7 +583,7 @@ _GL_FUNCDECL_RPL (strndup, char *, _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); _GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); # else -# if !@HAVE_DECL_STRNDUP@ || __GNUC__ >=3D 11 +# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >=3D 11 && !defined strndup) _GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) _GL_ARG_NONNULL ((1)) @@ -593,7 +593,7 @@ _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, si= ze_t __n)); # endif _GL_CXXALIASWARN (strndup); #else -# if __GNUC__ >=3D 11 +# if __GNUC__ >=3D 11 && !defined strndup /* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */ _GL_FUNCDECL_SYS (strndup, char *, (char const *__s, size_t __n) diff --git a/gnulib/import/verify.h b/gnulib/import/verify.h index c2d2a566706..c5c63ae97c6 100644 --- a/gnulib/import/verify.h +++ b/gnulib/import/verify.h @@ -215,6 +215,9 @@ template # define _GL_VERIFY(R, DIAGNOSTIC, ...) \ extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +# if 4 < __GNUC__ + (6 <=3D __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif #endif =20 /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ diff --git a/gnulib/update-gnulib.sh b/gnulib/update-gnulib.sh index 2666fe7dbf9..80aa3fafbf8 100755 --- a/gnulib/update-gnulib.sh +++ b/gnulib/update-gnulib.sh @@ -84,7 +84,7 @@ IMPORTED_GNULIB_MODULES=3D"\ " =20 # The gnulib commit ID to use for the update. -GNULIB_COMMIT_SHA1=3D"0cda5beb7962f6567f0c4e377df870fa05c6d681" +GNULIB_COMMIT_SHA1=3D"bd11400942d63de12371988dca8144925de9e2c3" =20 # The expected version number for the various auto tools we will # use after the import.