From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 618D93858C27 for ; Wed, 13 Oct 2021 13:21:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 618D93858C27 Received: by mail-pf1-x436.google.com with SMTP id t184so1582969pfd.0 for ; Wed, 13 Oct 2021 06:21:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=2uANZhy+ecyaRZNYnbu/Z7v+vdbOGUszOK8+hNIXRsw=; b=a97nGQYO3bCRLgI/PRJ3L559/+J8nm2nKTe0e1CIEN1B0RFxvkc5diFnY6nxKdIfaX IyVgKd/zmmXgn8T9yiN8GTsfx9lFc5V92oQ9Qb+s6+xZ7NmZ+eW3k69ERhyFbEvz4NCW YxWaxFO0ggZL3Q/gmekGU/IyCXr9oeYXrHyuUTDHcG9KBZ0OGyqG/TDX9qD1Kj/9lbOA SOrtGdN5OT2AdKEHvHz9153UlLMcVKcNRftH6wriNKtm9F+eCpKix8S0Q5FF/rqdecBP WeYzkHDNTqPIjCGsinCrb5RbRrVXDcOOGsDvAKzIHwmtuQPgFPDpOi7r27pGkNi5QeLf vPxg== X-Gm-Message-State: AOAM531RpWyPvbwPjx6YgtrJDhi7m77vnM3ssFUBs1paGJJQPARr9tqB aHISXI9XxBdol4WfeoLG5VVxa59m9KQ= X-Google-Smtp-Source: ABdhPJyjSxAnZksPM0kJefFYc9s+wd8aHkZwodvaTmGzktzluxxW7Kj9VozjnivjOBPkFGfoHruuRA== X-Received: by 2002:a63:1406:: with SMTP id u6mr27700856pgl.106.1634131270214; Wed, 13 Oct 2021 06:21:10 -0700 (PDT) Received: from localhost ([2409:10:24a0:4700:e8ad:216a:2a9d:6d0c]) by smtp.gmail.com with ESMTPSA id j6sm9101593pfb.175.2021.10.13.06.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Oct 2021 06:21:09 -0700 (PDT) Date: Wed, 13 Oct 2021 22:21:07 +0900 From: Stafford Horne To: Florian Weimer Cc: Stafford Horne via Libc-alpha Subject: Re: [PATCH] login: Add back libutil as an empty library Message-ID: References: <20211013125042.2347805-1-shorne@gmail.com> <87tuhlf5h5.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tuhlf5h5.fsf@mid.deneb.enyo.de> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2021 13:21:14 -0000 On Wed, Oct 13, 2021 at 02:56:38PM +0200, Florian Weimer wrote: > * Stafford Horne via Libc-alpha: > > > There are several packages like sysvinit and buildroot that expect > > -lutil to work. Rather than impacting them with having to change > > the linker flags provide an empty libutil.a. > > This produces a libutil.so.1 as well, right? Ah, thats right, I thought I checked that, but the .so files are still there. > I think we should still prevent that. It's not clear to me what the > proper approach would be, though. We have a bunch of existing > examples: libmcheck.a, libg.a. But those do not use the usual library > mechanism AFAICS. > > Maybe this will work? > > libutil-inhibit-o = $(filter-out .o,$(object-suffixes)) Yes, it does seem to work, thanks. > And do not set libutil-routines and libutil-shared-only-routines for > new architectures. I think this I am skipping via the existing if statement. -Stafford So maybe something like this? -- --- a/login/Makefile +++ b/login/Makefile @@ -46,10 +46,10 @@ vpath %.c programs tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \ tst-pututxline-lockfail tst-pututxline-cache -ifeq ($(have-GLIBC_2.33),yes) # Empty compatibility library for old binaries. extra-libs := libutil extra-libs-others := $(extra-libs) +ifeq ($(have-GLIBC_2.33),yes) libutil-routines := libutil-compat libutil-shared-only-routines := libutil-compat @@ -57,6 +57,8 @@ libutil-shared-only-routines := libutil-compat # link is not installed. install-lib-ldscripts = libutil.so $(inst_libdir)/libutil.so: +else # not $(have-GLIBC_2.33) +libutil-inhibit-o = $(filter-out .o,$(object-suffixes)) endif # $(have-GLIBC_2.33) include ../Rules