diff mbox series

[2/4] libunwind: merge .inc and .bb

Message ID 20240117150720.3585669-2-ross.burton@arm.com
State Accepted, archived
Commit e0d7f27e7da8c2d052e3c761d41305348d898458
Headers show
Series [1/4] musl: doesn't support riscv32 | expand

Commit Message

Ross Burton Jan. 17, 2024, 3:07 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

There's no need to these to be split, so merge them together.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-support/libunwind/libunwind.inc  | 23 ---------------
 .../libunwind/libunwind_1.6.2.bb              | 28 +++++++++++++++++--
 2 files changed, 25 insertions(+), 26 deletions(-)
 delete mode 100644 meta/recipes-support/libunwind/libunwind.inc

Comments

Etienne Cordonnier Jan. 17, 2024, 5:19 p.m. UTC | #1
Hi Ross,
I thought the main reason of having .inc files was to have a stable git
history, since the bb files get constantly renamed with each update? There
are many recipes using a split .inc file without a need for it, so I
assumed this is the standard codestyle of poky? Is it not the case?

Etienne

On Wed, Jan 17, 2024 at 4:07 PM Ross Burton <ross.burton@arm.com> wrote:

> From: Ross Burton <ross.burton@arm.com>
>
> There's no need to these to be split, so merge them together.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  meta/recipes-support/libunwind/libunwind.inc  | 23 ---------------
>  .../libunwind/libunwind_1.6.2.bb              | 28 +++++++++++++++++--
>  2 files changed, 25 insertions(+), 26 deletions(-)
>  delete mode 100644 meta/recipes-support/libunwind/libunwind.inc
>
> diff --git a/meta/recipes-support/libunwind/libunwind.inc
> b/meta/recipes-support/libunwind/libunwind.inc
> deleted file mode 100644
> index bf74f9fa3c7..00000000000
> --- a/meta/recipes-support/libunwind/libunwind.inc
> +++ /dev/null
> @@ -1,23 +0,0 @@
> -SUMMARY = "Library for obtaining the call-chain of a program"
> -DESCRIPTION = "a portable and efficient C programming interface (API) to
> determine the call-chain of a program"
> -HOMEPAGE = "
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nongnu.org_libunwind&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=lWmWqF8G-xAViw4gogbniL5C4TmmC_Z-U_7q3yHJJe8&e=
> "
> -LICENSE = "MIT"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
> -DEPENDS += "libatomic-ops"
> -DEPENDS:append:libc-musl = " libucontext"
> -
> -inherit autotools multilib_header
> -
> -PACKAGECONFIG ??= ""
> -PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
> -PACKAGECONFIG[latexdocs] = "--enable-documentation,
> --disable-documentation, latex2man-native"
> -
> -EXTRA_OECONF:arm = "--enable-debug-frame"
> -EXTRA_OECONF:armeb = "--enable-debug-frame"
> -EXTRA_OECONF:aarch64 = "--enable-debug-frame"
> -
> -do_install:append () {
> -       oe_multilib_header libunwind.h
> -}
> -
> -BBCLASSEXTEND = "native"
> diff --git a/meta/recipes-support/libunwind/libunwind_1.6.2.bb
> b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
> index d67862608c1..650e2c9ec40 100644
> --- a/meta/recipes-support/libunwind/libunwind_1.6.2.bb
> +++ b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
> @@ -1,4 +1,10 @@
> -require libunwind.inc
> +SUMMARY = "Library for obtaining the call-chain of a program"
> +DESCRIPTION = "a portable and efficient C programming interface (API) to
> determine the call-chain of a program"
> +HOMEPAGE = "
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.nongnu.org_libunwind&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=lWmWqF8G-xAViw4gogbniL5C4TmmC_Z-U_7q3yHJJe8&e=
> "
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
> +DEPENDS += "libatomic-ops"
> +DEPENDS:append:libc-musl = " libucontext"
>
>  SRC_URI = "
> https://urldefense.proofpoint.com/v2/url?u=http-3A__download.savannah.nongnu.org_releases_libunwind_libunwind-2D-24-257BPV-257D.tar.gz&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=DzppDAaiQpwcwHtq6BJCCnV8IRnwe8BOlE-V1z_AkfA&e=
> \
>             file://0003-x86-Stub-out-x86_local_resume.patch \
> @@ -11,15 +17,31 @@ SRC_URI:append:libc-musl = "
> file://musl-header-conflict.patch"
>
>  SRC_URI[sha256sum] =
> "4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976"
>
> +inherit autotools multilib_header
> +
> +COMPATIBLE_HOST:riscv32 = "null"
> +
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
> +PACKAGECONFIG[latexdocs] = "--enable-documentation,
> --disable-documentation, latex2man-native"
> +
> +EXTRA_OECONF:arm = "--enable-debug-frame"
> +EXTRA_OECONF:armeb = "--enable-debug-frame"
> +EXTRA_OECONF:aarch64 = "--enable-debug-frame"
> +
>  EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests
> --enable-static"
>
>  #
> https://urldefense.proofpoint.com/v2/url?u=http-3A__errors.yoctoproject.org_Errors_Details_20487_&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=SKDMc7SnpmHxBq9SlFgKMBVybrXAwMHEjQ5vnXg4nAA&e=
>  ARM_INSTRUCTION_SET:armv4 = "arm"
>  ARM_INSTRUCTION_SET:armv5 = "arm"
>
> -COMPATIBLE_HOST:riscv32 = "null"
> -
>  LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES',
> 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
>
>  SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
>  CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"
> +
> +do_install:append () {
> +       oe_multilib_header libunwind.h
> +}
> +
> +BBCLASSEXTEND = "native"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193920):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_193920&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=rRLXP74Dh2XnyVmQM6aYtOyPF2ZlWsMFKlYfrMUmt34&e=
> Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_103787498_7048771&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=_OPUyWCjt0FVC1ckEUV57eYVcd3jh3-hCZLg-paODBw&e=
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=P8pttzCM0snL4m0mo5VJm8mOnj0IfhCrI_TI3FJlan6TDSqW2WJLwYJEhK9Xwt3l&s=zMPlfcTWwai56yU_5P41Df59-erBRGJVEKyunoV5CS4&e=
> [ecordonnier@snap.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Ross Burton Jan. 17, 2024, 5:25 p.m. UTC | #2
On 17 Jan 2024, at 17:19, Etienne Cordonnier <ecordonnier@snap.com> wrote:
> 
> Hi Ross,
> I thought the main reason of having .inc files was to have a stable git history, since the bb files get constantly renamed with each update? There are many recipes using a split .inc file without a need for it, so I assumed this is the standard codestyle of poky? Is it not the case?

It originates from when openembedded had multiple versions for each recipe, to share logic.

Some people say that it helps track history, but unless you put _only_ the checksums in the versioned file then you need to track the renamed file anyway, and git’s “—follow” option does a reasonable job.  I don’t consider this a sufficient advantage considering the inconvenience of having a recipe split arbitrarily between two files.

Ross
Etienne Cordonnier Jan. 17, 2024, 10:37 p.m. UTC | #3
OK, good to know. I mostly use gitk and it doesn't do a good job at
following renames, so I thought that was the reason for this file
structure.

Etienne

On Wed, Jan 17, 2024 at 6:26 PM Ross Burton <ross.burton@arm.com> wrote:
>
> On 17 Jan 2024, at 17:19, Etienne Cordonnier <ecordonnier@snap.com> wrote:
> >
> > Hi Ross,
> > I thought the main reason of having .inc files was to have a stable git history, since the bb files get constantly renamed with each update? There are many recipes using a split .inc file without a need for it, so I assumed this is the standard codestyle of poky? Is it not the case?
>
> It originates from when openembedded had multiple versions for each recipe, to share logic.
>
> Some people say that it helps track history, but unless you put _only_ the checksums in the versioned file then you need to track the renamed file anyway, and git’s “—follow” option does a reasonable job.  I don’t consider this a sufficient advantage considering the inconvenience of having a recipe split arbitrarily between two files.
>
> Ross
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193940): https://lists.openembedded.org/g/openembedded-core/message/193940
> Mute This Topic: https://lists.openembedded.org/mt/103787498/7259375
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [cordonnier.etienne@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-support/libunwind/libunwind.inc b/meta/recipes-support/libunwind/libunwind.inc
deleted file mode 100644
index bf74f9fa3c7..00000000000
--- a/meta/recipes-support/libunwind/libunwind.inc
+++ /dev/null
@@ -1,23 +0,0 @@ 
-SUMMARY = "Library for obtaining the call-chain of a program"
-DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
-HOMEPAGE = "http://www.nongnu.org/libunwind"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
-DEPENDS += "libatomic-ops"
-DEPENDS:append:libc-musl = " libucontext"
-
-inherit autotools multilib_header
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
-PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
-
-EXTRA_OECONF:arm = "--enable-debug-frame"
-EXTRA_OECONF:armeb = "--enable-debug-frame"
-EXTRA_OECONF:aarch64 = "--enable-debug-frame"
-
-do_install:append () {
-	oe_multilib_header libunwind.h
-}
-
-BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libunwind/libunwind_1.6.2.bb b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
index d67862608c1..650e2c9ec40 100644
--- a/meta/recipes-support/libunwind/libunwind_1.6.2.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.6.2.bb
@@ -1,4 +1,10 @@ 
-require libunwind.inc
+SUMMARY = "Library for obtaining the call-chain of a program"
+DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
+HOMEPAGE = "http://www.nongnu.org/libunwind"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2d80c8ed4062b8339b715f90fa68cc9f"
+DEPENDS += "libatomic-ops"
+DEPENDS:append:libc-musl = " libucontext"
 
 SRC_URI = "http://download.savannah.nongnu.org/releases/libunwind/libunwind-${PV}.tar.gz \
            file://0003-x86-Stub-out-x86_local_resume.patch \
@@ -11,15 +17,31 @@  SRC_URI:append:libc-musl = " file://musl-header-conflict.patch"
 
 SRC_URI[sha256sum] = "4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976"
 
+inherit autotools multilib_header
+
+COMPATIBLE_HOST:riscv32 = "null"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
+PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
+
+EXTRA_OECONF:arm = "--enable-debug-frame"
+EXTRA_OECONF:armeb = "--enable-debug-frame"
+EXTRA_OECONF:aarch64 = "--enable-debug-frame"
+
 EXTRA_OECONF:append:libc-musl = " --disable-documentation --disable-tests --enable-static"
 
 # http://errors.yoctoproject.org/Errors/Details/20487/
 ARM_INSTRUCTION_SET:armv4 = "arm"
 ARM_INSTRUCTION_SET:armv5 = "arm"
 
-COMPATIBLE_HOST:riscv32 = "null"
-
 LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 
 SECURITY_LDFLAGS:append:libc-musl = " -lssp_nonshared"
 CACHED_CONFIGUREVARS:append:libc-musl = " LDFLAGS='${LDFLAGS} -lucontext'"
+
+do_install:append () {
+	oe_multilib_header libunwind.h
+}
+
+BBCLASSEXTEND = "native"