From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100882 invoked by alias); 26 Nov 2019 21:06:24 -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 100818 invoked by uid 89); 26 Nov 2019 21:06:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 required=5.0 tests=AWL,BAYES_00,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_JMF_BL,SPF_PASS,USER_IN_DEF_SPF_WL autolearn=no version=3.3.1 spammy= X-HELO: mail-oi1-f193.google.com Received: from mail-oi1-f193.google.com (HELO mail-oi1-f193.google.com) (209.85.167.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Nov 2019 21:06:22 +0000 Received: by mail-oi1-f193.google.com with SMTP id s71so17982421oih.11 for ; Tue, 26 Nov 2019 13:06:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XW3FrwA+AJpaVbRDv2lNUddT4C7OWuPntmsI92S5D8I=; b=EETU8n7L4GUZAHppzz3r6EOStkVLMGe8cjD3r5ypLKTKyXtvAuManHqG9JUti+jQ1C h8DwBqcyFQkB/iRex3dU94wQTv37z+sctcgQxmAVsmA2y9IJiKLZGjhfpAvErZtRLTZv URPdZDvJVgvj6KYfZpMXiwqYX6RWdkKCI/xlPVnb20vH8tP0okKltqJD65fHNraUSfzT acBj6KkftEbtv/NlCcHsNJRj4DIiBUQ89mw9R88wVGGSTvssfa29Xso/LbSUDMXravUY tyGSFQs4ec6DpqFOkQRBYHAM+19r6nauFjbegemKjuXcsAU4wDch2zRepkBXuNxf1WWM /yvA== MIME-Version: 1.0 References: <20191126191029.10514-1-cbiesinger@google.com> <1fb3d076-99d4-c8f8-8d43-a4f2aff5072f@redhat.com> In-Reply-To: From: "Christian Biesinger via gdb-patches" Reply-To: Christian Biesinger Date: Tue, 26 Nov 2019 21:06:00 -0000 Message-ID: Subject: Re: [PATCH] Simplify the IPA parts of the gdbserver Makefile To: Pedro Alves Cc: gdb-patches Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00930.txt.bz2 On Tue, Nov 26, 2019 at 2:56 PM Pedro Alves wrote: > > On 11/26/19 8:32 PM, Christian Biesinger wrote: > >> Currently the IPA uses gnulib headers, but not the function > >> replacements. What's the end goal you're after? Why is this > >> an improvement? > > > > Right. The end goal is > > https://sourceware.org/ml/gdb-patches/2019-11/msg00922.html -- I want > > to be able to call safe_strerror from more places, which means the > > implementation of safe_strerror needs to be able to call glibc's > > strerror_r. I suppose I could try adding it to UNDO_GNULIB_CFLAGS, > > maybe, but it seemed less confusing to change it like this. > So currently strerror_r is replaced by gnulib and you get a link > error? Yes, exactly. > What bothers me is that this moves in the direction of having to > handle portability ourselves, effectively undoing the benefits > of gnulib. It seems to me to walk in the opposite direction of > the ideal, which would be for the IPA to also use gnulib. > It doesn't use gnulib today, because the IPA is a shared library, > so we'd need to link with a build of gnulib built with -fPIC. Oh, is that the only reason? That seems like it should be fixable reasonably easily, just build gdbserver's gnulib with -fPIC. And if we move to a single Gnulib build we can just build all of it with -fPIC, I would think, not much of a downside. I thought there may be codesize concerns. > The UNDO_GNULIB_CFLAGS stuff at least gives us normalized headers > between gdb / gdbserver / IPA, which for simple header portability > fixes and defines seems good enough, though not ideal, of course. OK, I'll update that other patch to use that. Do you think https://sourceware.org/ml/gdb-patches/2019-11/msg00908.html is still worth having or should I withdraw that too? Christian