diff mbox series

[1/5] zip: Enable largefile support based on distro feature

Message ID 20220811055433.819522-1-raj.khem@gmail.com
State Accepted, archived
Commit 0becc36f930969a237af7d7486fc94249b0395eb
Headers show
Series [1/5] zip: Enable largefile support based on distro feature | expand

Commit Message

Khem Raj Aug. 11, 2022, 5:54 a.m. UTC
The configure test tries to run a binary during build to determine
largefile support, which wont work in cross-compile mode, therefore
specify it when largefile DISTRO_FEATURE is on.

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

Comments

Andre McCurdy Aug. 12, 2022, 8:24 p.m. UTC | #1
On Wed, Aug 10, 2022 at 10:54 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> The configure test tries to run a binary during build to determine
> largefile support, which wont work in cross-compile mode, therefore
> specify it when largefile DISTRO_FEATURE is on.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-extended/zip/zip_3.0.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
> index 07a67b96348..d560c83464b 100644
> --- a/meta/recipes-extended/zip/zip_3.0.bb
> +++ b/meta/recipes-extended/zip/zip_3.0.bb
> @@ -29,6 +29,8 @@ CVE_CHECK_IGNORE += "CVE-2018-13410"
>  # Not for zip but for smart contract implementation for it
>  CVE_CHECK_IGNORE += "CVE-2018-13684"
>
> +CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DLARGE_FILE_SUPPORT', '', d)}"

This should be hardcoded to enable LFS. The largefile distro feature
isn't used in oe-core (ie disabling LFS is not supported or even
possible anymore). The distro feature should be removed completely at
some point... when recipes in meta-oe etc have stopped referring to
it. See release notes from OE 2.3 (ie May 2017):

  https://docs.yoctoproject.org/2.3/ref-manual/ref-manual.html#migration-2.3-miscellaneous-changes

>  # zip.inc sets CFLAGS, but what Makefile actually uses is
>  # CFLAGS_NOOPT.  It will also force -O3 optimization, overriding
>  # whatever we set.
> --
> 2.37.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#169227): https://lists.openembedded.org/g/openembedded-core/message/169227
> Mute This Topic: https://lists.openembedded.org/mt/92953016/3619030
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [armccurdy@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Khem Raj Aug. 12, 2022, 8:31 p.m. UTC | #2
On Fri, Aug 12, 2022 at 1:25 PM Andre McCurdy <armccurdy@gmail.com> wrote:
>
> On Wed, Aug 10, 2022 at 10:54 PM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > The configure test tries to run a binary during build to determine
> > largefile support, which wont work in cross-compile mode, therefore
> > specify it when largefile DISTRO_FEATURE is on.
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-extended/zip/zip_3.0.bb | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
> > index 07a67b96348..d560c83464b 100644
> > --- a/meta/recipes-extended/zip/zip_3.0.bb
> > +++ b/meta/recipes-extended/zip/zip_3.0.bb
> > @@ -29,6 +29,8 @@ CVE_CHECK_IGNORE += "CVE-2018-13410"
> >  # Not for zip but for smart contract implementation for it
> >  CVE_CHECK_IGNORE += "CVE-2018-13684"
> >
> > +CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DLARGE_FILE_SUPPORT', '', d)}"
>
> This should be hardcoded to enable LFS. The largefile distro feature
> isn't used in oe-core (ie disabling LFS is not supported or even
> possible anymore). The distro feature should be removed completely at
> some point... when recipes in meta-oe etc have stopped referring to
> it. See release notes from OE 2.3 (ie May 2017):
>
>   https://docs.yoctoproject.org/2.3/ref-manual/ref-manual.html#migration-2.3-miscellaneous-changes
>

you are right.

> >  # zip.inc sets CFLAGS, but what Makefile actually uses is
> >  # CFLAGS_NOOPT.  It will also force -O3 optimization, overriding
> >  # whatever we set.
> > --
> > 2.37.1
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#169227): https://lists.openembedded.org/g/openembedded-core/message/169227
> > Mute This Topic: https://lists.openembedded.org/mt/92953016/3619030
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [armccurdy@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
diff mbox series

Patch

diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
index 07a67b96348..d560c83464b 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -29,6 +29,8 @@  CVE_CHECK_IGNORE += "CVE-2018-13410"
 # Not for zip but for smart contract implementation for it
 CVE_CHECK_IGNORE += "CVE-2018-13684"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-DLARGE_FILE_SUPPORT', '', d)}"
+
 # zip.inc sets CFLAGS, but what Makefile actually uses is
 # CFLAGS_NOOPT.  It will also force -O3 optimization, overriding
 # whatever we set.