From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 24 Feb 2023 15:43:35 +0100 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pVZIN-0010x1-T2 for lore@lore.pengutronix.de; Fri, 24 Feb 2023 15:43:35 +0100 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pVZIM-0003mr-HW; Fri, 24 Feb 2023 15:43:34 +0100 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pVZHy-0003mi-5h; Fri, 24 Feb 2023 15:43:10 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1pVZHx-0004bS-QE; Fri, 24 Feb 2023 15:43:09 +0100 Date: Fri, 24 Feb 2023 15:43:09 +0100 From: Michael Olbrich To: Ian Abbott Message-ID: <20230224144309.GU11263@pengutronix.de> Mail-Followup-To: Ian Abbott , ptxdist@pengutronix.de References: <20230220134105.28904-1-abbotti@mev.co.uk> <3cbe455b-9922-87bc-aa8e-60588d3b8e3e@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3cbe455b-9922-87bc-aa8e-60588d3b8e3e@mev.co.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH] libtahu: Change CFLAGS to use 64-bit system time X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Feb 24, 2023 at 09:55:12AM +0000, Ian Abbott wrote: > On 23/02/2023 15:42, Michael Olbrich wrote: > > On Mon, Feb 20, 2023 at 01:41:05PM +0000, Ian Abbott wrote: > > > diff --git a/rules/libtahu.make b/rules/libtahu.make > > > index 26c064c6d..3e392216d 100644 > > > --- a/rules/libtahu.make > > > +++ b/rules/libtahu.make > > > @@ -37,11 +37,12 @@ LIBTAHU_CONF_TOOL := NO > > > # Compile > > > # ---------------------------------------------------------------------------- > > > -#LIBTAHU_MAKE_ENV := $(CROSS_ENV) > > > - > > > +LIBTAHU_CPPFLAGS := -Iinclude -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > > > +LIBTAHU_CFLAGS := -O2 -g -g3 -fPIC > > > > No need to mess with the existing CFLAGS. You can inject extra CFLAGS > > though the toolchain wrappers. And for correctness, make it conditional: > > > > ifdef PTXCONF_GLOBAL_LARGE_FILE > > LIBTAHU_CFLAGS := -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 > > endif > > > > nothing else is needed. > > libtahu does not actually use files, large or otherwise. It's the 64-bit > time support that I want, not the large file support. However glibc does > not support _TIME_BITS=64 unless _FILE_OFFSET_BITS=64, so that needs to come > along for the ride. I just read _FILE_OFFSET_BITS=64 and that matched with PTXCONF_GLOBAL_LARGE_FILE in my brain... :-) Anyways, making it conditionally like that is actually correct in some ways, because as you said, you need the large file stuff anyways before the 64bit time stuff can be enabled. But I'm not so sure any more, if that patch makes sense in general: This is not something that should be enabled for a single package and adding cflags to every package does not scale. Doing that for PTXdist as a whole is on my todo list but I've not had the time to implement this. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |