From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 92470 invoked by alias); 26 Nov 2019 20:56:05 -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 92462 invoked by uid 89); 26 Nov 2019 20:56:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=bothers, H*r:sk:34.2019 X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-1.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (205.139.110.61) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Nov 2019 20:56:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574801762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WQ//qjaybaLe10OvkjUO/UZRpvAsptUuIGLkFBWf5MA=; b=HC/VvydUX5u0xLwh/X49cmK4h7v39Nh4gA8e9aIcK/dQFOgyRCzzfbbsNo97hk6b9mng5q UfJJIRbj3Er+I8AGB0HX853JBdQzUvMixZymjYJ0Xy/68FT7ipj861P7Sp8J0HfBD/z3Yf zqooiw0MXeBYq5T/+7MxgmqinxnSKPM= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-4or4wbj8OdqSfMAwjDRssw-1; Tue, 26 Nov 2019 15:56:01 -0500 Received: by mail-wr1-f72.google.com with SMTP id u14so11070901wrq.19 for ; Tue, 26 Nov 2019 12:56:00 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id 11sm4647042wmb.34.2019.11.26.12.55.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Nov 2019 12:55:59 -0800 (PST) Subject: Re: [PATCH] Simplify the IPA parts of the gdbserver Makefile To: Christian Biesinger References: <20191126191029.10514-1-cbiesinger@google.com> <1fb3d076-99d4-c8f8-8d43-a4f2aff5072f@redhat.com> Cc: gdb-patches From: Pedro Alves Message-ID: Date: Tue, 26 Nov 2019 20:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-11/txt/msg00929.txt.bz2 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? 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. 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. Thanks, Pedro Alves