From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id DF2363857825 for ; Fri, 27 Aug 2021 15:44:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DF2363857825 Received: by mail-ed1-x533.google.com with SMTP id q3so10491368edt.5 for ; Fri, 27 Aug 2021 08:44:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ohb8lO6yFYQdqGg/LOSkt3x9wDtyxqspGeiLEcX0brE=; b=A77KxF1sUyyyzimTZ4ffUfQcnMgRU+p1fAxtTd/oFN1Xh5hBjUj6utKrZ/XgIOwBXp EdWSnsdmfL41aMw7YbwLNiD5/P1ZoJX5bHwSf5n+H2mchzZsoDu4z5wECsKiBIzr1LrS I0L7rJQ6bNLnXmo/weitFyjjYrfGj0byqaNkg5UtV9Cwsv0s8BDOrTJ8z6rRXyFNDdHV ZIFHaDBWQBuG+QX+3Qb0USMBIrybzrPRCt1SXPpJIHR00ygV0AOiw+Ix1AgLqa9Vw34E d6+7tVGuZzoqIK8W/fE87A4qKbr0Rbf6A758z/OADMyNKgsj0y1oDQZ8LRpUmkICAcOq Ynkg== X-Gm-Message-State: AOAM533HMQTvzgqAjraVLwXi9mfD5HrLf+tIhWAQjkBq7eqHT8F6dsEB GrFvzRQ8AELxBg8JaQhdu+FSlUNfdagYaKlVqudqLg== X-Google-Smtp-Source: ABdhPJxUBkq0TjxjInlYY1329ADIIv69vnOPpuVKOWxlAMaanhGv0AmG3Sg1aDTcNnvh+Hyjbd5Qh6vCbnyil7zOSEM= X-Received: by 2002:aa7:c844:: with SMTP id g4mr10553944edt.37.1630079082171; Fri, 27 Aug 2021 08:44:42 -0700 (PDT) MIME-Version: 1.0 References: <20210820202823.2865202-1-abdulras@google.com> In-Reply-To: From: Saleem Abdulrasool Date: Fri, 27 Aug 2021 08:44:30 -0700 Message-ID: Subject: Re: [PATCH v2] handle libc implemntations which do not provide `error.h` To: Mark Wielaard Cc: elfutils-devel@sourceware.org X-Spam-Status: No, score=-21.1 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:44:54 -0000 We have two choices: - revert and use the updated patch I already sent - I can do a follow up change to migrate the code I don't particularly have a strong opinion on which approach we take, since the commit has already been done. Since glibc systems are completely untouched by the changes neither path should cause problems for bisection in the future for previously supported systems. I'd go with whatever is most commonly done in this project. On Fri, Aug 27, 2021 at 8:39 AM Mark Wielaard wrote: > Hi Saleem, > > On Fri, 2021-08-27 at 08:24 -0700, Saleem Abdulrasool via Elfutils-devel > wrote: > > 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 > new > > source file here. I can move the implementation around though. > > > > A second issue is that playing with this further, it doesn't fully > resolve > > 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` > > 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. > > This resolves bug #21008. > > 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 >