From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id D6AD3389EC53 for ; Fri, 29 Apr 2022 12:39:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6AD3389EC53 X-ASG-Debug-ID: 1651235965-0c856e06add23210001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id ZIqewtnpD3CiBdkh (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 Apr 2022 08:39:25 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from smarchi-efficios.internal.efficios.com (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) by smtp.ebox.ca (Postfix) with ESMTP id 17365441B21; Fri, 29 Apr 2022 08:39:25 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.180.24 X-Barracuda-Effective-Source-IP: 192-222-180-24.qc.cable.ebox.net[192.222.180.24] X-Barracuda-Apparent-Source-IP: 192.222.180.24 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gnulib: update to d6a07b4dc2 Date: Fri, 29 Apr 2022 08:39:24 -0400 X-ASG-Orig-Subj: [PATCH] gnulib: update to d6a07b4dc2 Message-Id: <20220429123924.481812-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1651235965 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 7721 X-Barracuda-Spam-Score: 1.00 X-Barracuda-Spam-Status: No, SCORE=1.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M, WEIRD_PORT X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.97677 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.50 BSF_RULE7568M Custom Rule 7568M X-Spam-Status: No, score=-3498.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 12:39:44 -0000 Update the gnulib import in order to get this commit, which fixes the GDB build with clang + glibc < 2.33. https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6a07b4dc21b3118727743142c678858df442853 https://lists.gnu.org/archive/html/bug-gnulib/2022-04/msg00072.html 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: make[2]: Entering directory '/home/smarchi/build/binutils-gdb-clang/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 specification in declaration does not match previous declaration _GL_EXTERN_C void free (void *) throw (); ^ ../gnulib/import/stdlib.h:737:17: note: expanded from macro 'free' # 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_attributes) ^ :139:1: note: expanded from here rpl_free ^ The gnulib commit mentioned fixes the exception specification of `free`. Change-Id: Ibd51302feece6f385d0c53e0d08921b5d95e2776 --- 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/verify.h | 3 +++ gnulib/update-gnulib.sh | 2 +- 8 files changed, 24 insertions(+), 8 deletions(-) diff --git a/gnulib/config.in b/gnulib/config.in index f9cce7b6aa97..07efd1334faf 100644 --- a/gnulib/config.in +++ b/gnulib/config.in @@ -1613,6 +1613,10 @@ #endif #ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 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 26f24670b0d7..cc7e8287d5a0 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 != yes; then - if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-file + if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$$-file then gl_cv_glob_omit_nondir_symlinks=maybe else @@ -27101,7 +27101,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi - rm -f conf$$-globtest + rm -f conf$$-file conf$$-globtest else gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal" fi diff --git a/gnulib/import/glob.c b/gnulib/import/glob.c index f6993a370646..57cb3bd1d1c8 100644 --- a/gnulib/import/glob.c +++ b/gnulib/import/glob.c @@ -1357,7 +1357,8 @@ glob_in_dir (const char *pattern, const char *directory, int flags, } else { - int dfd = dirfd (stream); + DIR *dirp = stream; + int dfd = dirfd (dirp); int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)); flags |= GLOB_MAGCHAR; diff --git a/gnulib/import/m4/glob.m4 b/gnulib/import/m4/glob.m4 index cf5f93930c1f..f59b84ff0576 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 == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 AC_CACHE_CHECK([whether glob NOTDIR*/ omits symlink to nondir], [gl_cv_glob_omit_nondir_symlinks], [if test $cross_compiling != yes; then - if ln -s conf-file conf$$-globtest 2>/dev/null && touch conf-file + if ln -s conf$$-file conf$$-globtest 2>/dev/null && touch conf$$-file then gl_cv_glob_omit_nondir_symlinks=maybe else @@ -94,7 +94,7 @@ char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : ]) fi - rm -f conf$$-globtest + rm -f conf$$-file conf$$-globtest else gl_cv_glob_omit_nondir_symlinks="$gl_cross_guess_normal" fi diff --git a/gnulib/import/m4/gnulib-common.m4 b/gnulib/import/m4/gnulib-common.m4 index c5ced04f1818..30911d1581af 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 #ifdef __has_c_attribute +# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 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 d52c2f796382..a86643c3ca35 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__ >= 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/verify.h b/gnulib/import/verify.h index c2d2a5667065..c5c63ae97c6c 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 <= __GNUC_MINOR__) +# pragma GCC diagnostic ignored "-Wnested-externs" +# endif #endif /* _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 2666fe7dbf9c..534c129678d7 100755 --- a/gnulib/update-gnulib.sh +++ b/gnulib/update-gnulib.sh @@ -84,7 +84,7 @@ IMPORTED_GNULIB_MODULES="\ " # The gnulib commit ID to use for the update. -GNULIB_COMMIT_SHA1="0cda5beb7962f6567f0c4e377df870fa05c6d681" +GNULIB_COMMIT_SHA1="d6a07b4dc21b3118727743142c678858df442853" # The expected version number for the various auto tools we will # use after the import. -- 2.26.2