From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78424 invoked by alias); 10 Sep 2018 21:21:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 78410 invoked by uid 89); 10 Sep 2018 21:21:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=sk:thomas, sk:thomas., Well, HContent-Transfer-Encoding:8bit X-HELO: idris.smile.fr Received: from idris.smile.fr (HELO idris.smile.fr) (91.216.209.19) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Sep 2018 21:21:02 +0000 Received: from localhost (localhost [127.0.0.1]) by idris.smile.fr (Postfix) with ESMTP id 01F2F1EE2920; Mon, 10 Sep 2018 23:21:00 +0200 (CEST) Received: from idris.smile.fr ([127.0.0.1]) by localhost (bluemind-mta.prod.vitry.intranet [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zc7LwD2+VRlR; Mon, 10 Sep 2018 23:20:59 +0200 (CEST) Received: from [192.168.0.16] (gam75-1-81-57-22-125.fbx.proxad.net [81.57.22.125]) by idris.smile.fr (Postfix) with ESMTPSA id 66FE81EE24C0; Mon, 10 Sep 2018 23:20:59 +0200 (CEST) Subject: Re: [Buildroot] [PATCH 2/2] package/gdb: use stat() privided by the system To: Thomas Petazzoni , Romain Naour Cc: buildroot@buildroot.org, gdb-patches@sourceware.org, dalias@aerifal.cx References: <20180909163750.14196-1-romain.naour@gmail.com> <20180909163750.14196-2-romain.naour@gmail.com> <20180910174900.0b9f4133@windsurf> From: Romain Naour Message-ID: Date: Mon, 10 Sep 2018 21:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180910174900.0b9f4133@windsurf> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-09/txt/msg00304.txt.bz2 Hi Thomas, Adding the gdb-patches ml and Rich Felker in Cc. Le 10/09/2018 à 17:49, Thomas Petazzoni a écrit : > Hello, > > On Sun, 9 Sep 2018 18:37:50 +0200, Romain Naour wrote: >> Use the same workaround [1] as gnulib use to get the original >> definition of stat. Otherwise with musl toolchains, gnulib try to use >> rpl_stat which is not defined. >> >> Fixes: >> https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552308 >> >> [1] http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/stat.c?id=c9d72f69bd201a1ab31464d91f234ea1817fe0e1 >> >> Signed-off-by: Romain Naour >> Cc: Thomas Petazzoni > > I am confused by this patch. Why do we need that? The on > my system doesn't test __need_system_sys_stat_h. Is this a workaround > to force gnulib to not provide its own stat() replacement ? > > Why is gnulib misbehaving here ? We have tons of gnulib related hacks > in gdb.mk, and this start to pile up quite a bit. Why do we have all > those gnulib issues with gdb ? Why not with tons of other packages that > also use gnulib ? There are too many questions here, I can't answer. There are some (old) hack with coreutils like gl_cv_func_gettimeofday_clobber which is in Buildroot since a long time. I can't tell for every gnulib based packages... > >> +Use the same workaround [1] as gnulib use to get the original >> +definition of stat. Otherwise with musl toolchains, gnulib try to use >> +rpl_stat which is not defined. > > Well rpl_stat() is supposed to be implemented by gnulib. So basically > gnulib tells gdb: please don't use stat() but my rpl_stat() wrapper, > but then gnulib doesn't provide rpl_stat(). > > Any idea what's happening here ? As far I can tell, the regression has been introduced by this commit: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2441702a72f324e41a1624dc042b334f375e2d81 Best regards, Romain > > Thomas >