diff mbox series

[meta-oe,1/2] pahole: respect libdir

Message ID 20230407220737.889502-1-Martin.Jansa@gmail.com
State Under Review
Headers show
Series [meta-oe,1/2] pahole: respect libdir | expand

Commit Message

Martin Jansa April 7, 2023, 10:07 p.m. UTC
* use the same expression as cmake.bbclass is using:
  CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')}
  but ${baselib} should work here as well

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj April 7, 2023, 11:48 p.m. UTC | #1
On Fri, Apr 7, 2023 at 3:07 PM Martin Jansa <Martin.Jansa@gmail.com> wrote:
>
> * use the same expression as cmake.bbclass is using:
>   CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')}
>   but ${baselib} should work here as well
>
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> index b7f1f8bb28..2bb73c3eb7 100644
> --- a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> +++ b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> @@ -20,7 +20,7 @@ inherit cmake pkgconfig
>
>  PACKAGECONFIG[python3] = ",,python3-core,python3-core"
>
> -EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
> +EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"

Can we use ${baselib} instead ?

>
>  FILES:${PN} =  "${bindir}/pahole \
>                 ${libdir}/libdwarves.so* \
> --
> 2.40.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#101990): https://lists.openembedded.org/g/openembedded-devel/message/101990
> Mute This Topic: https://lists.openembedded.org/mt/98134284/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa April 7, 2023, 11:50 p.m. UTC | #2
Yes, we can I think as commit message says, but we should probably use
baselib in cmake.bbclass as well for consistency.

On Sat, Apr 8, 2023 at 1:48 AM Khem Raj <raj.khem@gmail.com> wrote:

> On Fri, Apr 7, 2023 at 3:07 PM Martin Jansa <Martin.Jansa@gmail.com>
> wrote:
> >
> > * use the same expression as cmake.bbclass is using:
> >   CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'),
> d.getVar('prefix') + '/')}
> >   but ${baselib} should work here as well
> >
> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> > ---
> >  meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> > index b7f1f8bb28..2bb73c3eb7 100644
> > --- a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> > +++ b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
> > @@ -20,7 +20,7 @@ inherit cmake pkgconfig
> >
> >  PACKAGECONFIG[python3] = ",,python3-core,python3-core"
> >
> > -EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release
> -DLIBBPF_EMBEDDED=OFF"
> > +EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'),
> d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
>
> Can we use ${baselib} instead ?
>
> >
> >  FILES:${PN} =  "${bindir}/pahole \
> >                 ${libdir}/libdwarves.so* \
> > --
> > 2.40.0
> >
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#101990):
> https://lists.openembedded.org/g/openembedded-devel/message/101990
> > Mute This Topic: https://lists.openembedded.org/mt/98134284/1997914
> > Group Owner: openembedded-devel+owner@lists.openembedded.org
> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>
Khem Raj April 7, 2023, 11:51 p.m. UTC | #3
On Fri, Apr 7, 2023 at 4:50 PM Martin Jansa <martin.jansa@gmail.com> wrote:
>
> Yes, we can I think as commit message says, but we should probably use baselib in cmake.bbclass as well for consistency.

thats fine. Just send a patch to cmake bbclass as well. I would not
like to hold a better fix on that condition.

>
> On Sat, Apr 8, 2023 at 1:48 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> On Fri, Apr 7, 2023 at 3:07 PM Martin Jansa <Martin.Jansa@gmail.com> wrote:
>> >
>> > * use the same expression as cmake.bbclass is using:
>> >   CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')}
>> >   but ${baselib} should work here as well
>> >
>> > Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
>> > ---
>> >  meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> >
>> > diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
>> > index b7f1f8bb28..2bb73c3eb7 100644
>> > --- a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
>> > +++ b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
>> > @@ -20,7 +20,7 @@ inherit cmake pkgconfig
>> >
>> >  PACKAGECONFIG[python3] = ",,python3-core,python3-core"
>> >
>> > -EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
>> > +EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
>>
>> Can we use ${baselib} instead ?
>>
>> >
>> >  FILES:${PN} =  "${bindir}/pahole \
>> >                 ${libdir}/libdwarves.so* \
>> > --
>> > 2.40.0
>> >
>> >
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> > Links: You receive all messages sent to this group.
>> > View/Reply Online (#101990): https://lists.openembedded.org/g/openembedded-devel/message/101990
>> > Mute This Topic: https://lists.openembedded.org/mt/98134284/1997914
>> > Group Owner: openembedded-devel+owner@lists.openembedded.org
>> > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
>> > -=-=-=-=-=-=-=-=-=-=-=-
>> >
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
index b7f1f8bb28..2bb73c3eb7 100644
--- a/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
+++ b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb
@@ -20,7 +20,7 @@  inherit cmake pkgconfig
 
 PACKAGECONFIG[python3] = ",,python3-core,python3-core"
 
-EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
+EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
 
 FILES:${PN} =  "${bindir}/pahole \
 		${libdir}/libdwarves.so* \