From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 1CC343858C60 for ; Fri, 27 Aug 2021 15:39:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1CC343858C60 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 775353000ADC; Fri, 27 Aug 2021 17:39:23 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 0AAEC413CE32; Fri, 27 Aug 2021 17:39:23 +0200 (CEST) Message-ID: Subject: Re: [PATCH v2] handle libc implemntations which do not provide `error.h` From: Mark Wielaard To: Saleem Abdulrasool , elfutils-devel@sourceware.org Date: Fri, 27 Aug 2021 17:39:22 +0200 In-Reply-To: References: <20210820202823.2865202-1-abdulras@google.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2021 15:39:39 -0000 Hi Saleem, On Fri, 2021-08-27 at 08:24 -0700, Saleem Abdulrasool via Elfutils-devel wr= ote: > I think that this is not exactly ideal, as it will introduce a local > error_message_count in each translation unit, rather than giving it > vague linkage as I had hoped. I think it may be better to introduce a ne= w > source file here. I can move the implementation around though. >=20 > A second issue is that playing with this further, it doesn't fully resolv= e > the PR as this only fixes it for libelf (which I realized only recently). Oops. Our messages crossed and I just pushed: commit 76c84c137a82a7cacbc69b1696052491b3bb81cb Author: Saleem Abdulrasool Date: Fri Aug 20 20:28:23 2021 +0000 handle libc implementations which do not provide `error.h` =20 Introduce a configure time check for the presence of `error.h`. In the case that `error.h` is not available, we can fall back to `err.h`. Although `err.h` is not a C standard header (it is a BSD extension), many libc implementations provide. If there are targets which do not provide an implementation of `err.h`, it would be possible to further extend the implementation to be more portable. =20 This resolves bug #21008. =20 Signed-off-by: Saleem Abdulrasool It passes all local tests and it is currently going through the buildbot: https://builder.wildebeest.org/buildbot/#/changes/2530 But of course all those systems use normal glibc. Should I revert the commit? Thanks, Mark