diff mbox series

[6/6] pseudo: Disable LFS on 32bit arches

Message ID 20221201190248.175753-6-raj.khem@gmail.com
State Accepted, archived
Commit 9e5ec22183a8b0f16817fd3dd2e3b45b292a3a09
Headers show
Series [1/6] mdadm: Use _FILE_OFFSET_BITS to use largefile support | expand

Commit Message

Khem Raj Dec. 1, 2022, 7:02 p.m. UTC
pseudo overrides certain libc functions which are aliases when LFS64 is
enabled. In anycase pseudo may not be much used on 32bit systems anyway

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Purdie Dec. 1, 2022, 7:12 p.m. UTC | #1
On Thu, 2022-12-01 at 11:02 -0800, Khem Raj wrote:
> pseudo overrides certain libc functions which are aliases when LFS64 is
> enabled. In anycase pseudo may not be much used on 32bit systems anyway
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> index c34580b4ff..c3f0a987fc 100644
> --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> @@ -17,5 +17,7 @@ SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
>  S = "${WORKDIR}/git"
>  PV = "1.9.0+git${SRCPV}"
>  
> +TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> +
> 

We need to put some comments in here about what this is doing and why.

Cheers,

Richard
Alexandre Belloni Dec. 1, 2022, 11:05 p.m. UTC | #2
On 01/12/2022 19:12:50+0000, Richard Purdie wrote:
> On Thu, 2022-12-01 at 11:02 -0800, Khem Raj wrote:
> > pseudo overrides certain libc functions which are aliases when LFS64 is
> > enabled. In anycase pseudo may not be much used on 32bit systems anyway
> > 
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > index c34580b4ff..c3f0a987fc 100644
> > --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> > +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > @@ -17,5 +17,7 @@ SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
> >  S = "${WORKDIR}/git"
> >  PV = "1.9.0+git${SRCPV}"
> >  
> > +TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> > +
> > 
> 
> We need to put some comments in here about what this is doing and why.
> 

Note that this was one of the issues I had with the
-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 build. My guess is that we also
have to remove -D_TIME_BITS=64.
Khem Raj Dec. 1, 2022, 11:07 p.m. UTC | #3
On Thu, Dec 1, 2022 at 3:05 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> On 01/12/2022 19:12:50+0000, Richard Purdie wrote:
> > On Thu, 2022-12-01 at 11:02 -0800, Khem Raj wrote:
> > > pseudo overrides certain libc functions which are aliases when LFS64 is
> > > enabled. In anycase pseudo may not be much used on 32bit systems anyway
> > >
> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > ---
> > >  meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > index c34580b4ff..c3f0a987fc 100644
> > > --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > @@ -17,5 +17,7 @@ SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
> > >  S = "${WORKDIR}/git"
> > >  PV = "1.9.0+git${SRCPV}"
> > >
> > > +TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> > > +
> > >
> >
> > We need to put some comments in here about what this is doing and why.
> >
>
> Note that this was one of the issues I had with the
> -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 build. My guess is that we also
> have to remove -D_TIME_BITS=64.

Eventually yes, however lets do that incrementally. First I am trying
to get LFS handled.

>
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Richard Purdie Dec. 1, 2022, 11:20 p.m. UTC | #4
On Thu, 2022-12-01 at 15:07 -0800, Khem Raj wrote:
> On Thu, Dec 1, 2022 at 3:05 PM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> > 
> > On 01/12/2022 19:12:50+0000, Richard Purdie wrote:
> > > On Thu, 2022-12-01 at 11:02 -0800, Khem Raj wrote:
> > > > pseudo overrides certain libc functions which are aliases when LFS64 is
> > > > enabled. In anycase pseudo may not be much used on 32bit systems anyway
> > > > 
> > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > > ---
> > > >  meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > > 
> > > > diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > index c34580b4ff..c3f0a987fc 100644
> > > > --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > @@ -17,5 +17,7 @@ SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
> > > >  S = "${WORKDIR}/git"
> > > >  PV = "1.9.0+git${SRCPV}"
> > > > 
> > > > +TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> > > > +
> > > > 
> > > 
> > > We need to put some comments in here about what this is doing and why.
> > > 
> > 
> > Note that this was one of the issues I had with the
> > -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 build. My guess is that we also
> > have to remove -D_TIME_BITS=64.
> 
> Eventually yes, however lets do that incrementally. First I am trying
> to get LFS handled.

Pseudo is a bit of a special case so if we can see an issue here, lets
add the other bit needed as well please! :)

I don't mind if it is one or two patches but we should do it.

Cheers,

Richard
Khem Raj Dec. 1, 2022, 11:22 p.m. UTC | #5
On Thu, Dec 1, 2022 at 3:20 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Thu, 2022-12-01 at 15:07 -0800, Khem Raj wrote:
> > On Thu, Dec 1, 2022 at 3:05 PM Alexandre Belloni
> > <alexandre.belloni@bootlin.com> wrote:
> > >
> > > On 01/12/2022 19:12:50+0000, Richard Purdie wrote:
> > > > On Thu, 2022-12-01 at 11:02 -0800, Khem Raj wrote:
> > > > > pseudo overrides certain libc functions which are aliases when LFS64 is
> > > > > enabled. In anycase pseudo may not be much used on 32bit systems anyway
> > > > >
> > > > > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > > > ---
> > > > >  meta/recipes-devtools/pseudo/pseudo_git.bb | 2 ++
> > > > >  1 file changed, 2 insertions(+)
> > > > >
> > > > > diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > > index c34580b4ff..c3f0a987fc 100644
> > > > > --- a/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > > +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
> > > > > @@ -17,5 +17,7 @@ SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
> > > > >  S = "${WORKDIR}/git"
> > > > >  PV = "1.9.0+git${SRCPV}"
> > > > >
> > > > > +TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D
> > > > > +
> > > > >
> > > >
> > > > We need to put some comments in here about what this is doing and why.
> > > >
> > >
> > > Note that this was one of the issues I had with the
> > > -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 build. My guess is that we also
> > > have to remove -D_TIME_BITS=64.
> >
> > Eventually yes, however lets do that incrementally. First I am trying
> > to get LFS handled.
>
> Pseudo is a bit of a special case so if we can see an issue here, lets
> add the other bit needed as well please! :)
>
> I don't mind if it is one or two patches but we should do it.
>

OK, I wanted to first fail with that option because we are removing
-D_FILE_OFFSET_BITS=64 it should be enough
for 64bit time_t as well.

> Cheers,
>
> Richard
>
diff mbox series

Patch

diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index c34580b4ff..c3f0a987fc 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -17,5 +17,7 @@  SRCREV = "c9670c27ff67ab899007ce749254b16091577e55"
 S = "${WORKDIR}/git"
 PV = "1.9.0+git${SRCPV}"
 
+TARGET_CPPFLAGS:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+
 # error: use of undeclared identifier '_STAT_VER'
 COMPATIBLE_HOST:libc-musl = 'null'