mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Ian Abbott <abbotti@mev.co.uk>
Cc: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] libtahu: Change CFLAGS to use 64-bit system time
Date: Fri, 24 Feb 2023 15:43:09 +0100	[thread overview]
Message-ID: <20230224144309.GU11263@pengutronix.de> (raw)
In-Reply-To: <3cbe455b-9922-87bc-aa8e-60588d3b8e3e@mev.co.uk>

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 |



  reply	other threads:[~2023-02-24 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 13:41 Ian Abbott
2023-02-23 15:42 ` Michael Olbrich
2023-02-24  9:55   ` Ian Abbott
2023-02-24 14:43     ` Michael Olbrich [this message]
2023-02-24 12:03   ` Ian Abbott
2023-02-24 14:45     ` Michael Olbrich
2023-02-24 16:10       ` Ian Abbott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230224144309.GU11263@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=abbotti@mev.co.uk \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox