From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 816F83857C53 for ; Tue, 14 Dec 2021 19:35:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 816F83857C53 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-454-FrCGmyLhMXmdww99XGGRDg-1; Tue, 14 Dec 2021 14:35:27 -0500 X-MC-Unique: FrCGmyLhMXmdww99XGGRDg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 185221853028; Tue, 14 Dec 2021 19:35:27 +0000 (UTC) Received: from greed.delorie.com (ovpn-112-7.rdu2.redhat.com [10.10.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0F81610F5; Tue, 14 Dec 2021 19:35:26 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.15.2/8.15.2) with ESMTP id 1BEJZPNq4128076; Tue, 14 Dec 2021 14:35:25 -0500 From: DJ Delorie To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v2] Use LFS and 64 bit time for installed programs (BZ #15333) In-Reply-To: <20210622172713.3504003-1-adhemerval.zanella@linaro.org> Date: Tue, 14 Dec 2021 14:35:25 -0500 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, 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: Tue, 14 Dec 2021 19:35:33 -0000 Note: I built this patch and wrote a perl script to extract out the relevent symbols from the symlists of all binaries, and verified (as best I could ;) that they're doing the right thing. Adhemerval Zanella via Libc-alpha writes: > diff --git a/Makeconfig b/Makeconfig > +# Use 64 bit time_t support for installed programs > +installed-modules = nonlib nscd lddlibc4 libresolv ldconfig locale_programs \ > + iconvprogs libnss_files libnss_compat libnss_db libnss_hesiod \ > + libutil libpcprofile libSegFault > ++extra-time-flags = $(if $(filter $(installed-modules),\ > + $(in-module)),-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64) > + If "in-module" is in the list of "installed-modules", we add two more -D's. Ok. Whitelist good :-) > - testsuite > + testsuite testsuite-internal Ok. > override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \ > $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \ > - $(+extra-math-flags) \ > + $(+extra-math-flags) $(+extra-time-flags) \ Globally use the new flags set above, if. Ok. > diff --git a/Makerules b/Makerules > -all-nonlib := $(strip $(tests-internal) $(test-internal-extras) \ > - $(others) $(others-extras)) > +all-nonlib := $(strip $(others) $(others-extras)) Removing internal tests from the "nonlib" module. > ifneq (,$(all-nonlib)) > cpp-srcs-left = $(all-nonlib) > lib := nonlib > include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left)) > endif > > +# All internal tests use testsuite-internal module since for 64 bit time > +# support is set as default for MODULE_NAME=nonlib (which include some > +# installed programs). > +all-testsuite-internal := $(strip $(tests-internal) $(test-internal-extras)) > +ifneq (,$(all-testsuite-internal)) > +cpp-srcs-left = $(all-testsuite-internal) > +lib := testsuite-internal > +include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left)) > +endif Hook up all the tests that the above (nonlib) case doesn't find, since they're internal/exceptions. Ok. > diff --git a/elf/sotruss-lib.c b/elf/sotruss-lib.c > - out_fd = open (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666); > + out_fd = open64 (fullname, O_RDWR | O_CREAT | O_TRUNC, 0666); Ok. > - out_fd = fcntl (STDERR_FILENO, F_DUPFD, 1000); > + out_fd = fcntl64 (STDERR_FILENO, F_DUPFD, 1000); Ok. LGTM Reviewed-by: DJ Delorie