On Thu, Oct 31, 2019 at 7:40 PM Zheng, Ruoqin
<[email protected]> wrote:
>
> Hi Khem
>
> + AX_AM_CFLAGS_ADD([-Werror=format-signedness])
> ++AX_AM_CFLAGS_ADD([-Wno-address-of-packed-member])
> +
>
> >This warning knob may not be available always so
> >Either we fix the warning by altering the code and making it go away or we 
> >disable werror completely
> >Of course first option is preferred
>
> I found a new pull request to fix this problem. Can I backport it?

seems ok

> https://github.com/intel/ledmon/pull/48/commits
>
> -inherit systemd
> +inherit autotools-brokensep systemd
>
> >This is sad that we move to new version and out of tree build is broken can 
> >we fix that rather than patching it out ?
> >It might be upstream worthy patch as well
>
> For this problem, I found inherit autotools system also works well. So should 
> I inherit autotools?
>b


super


>   --
> Best Regards
>
> 发件人: Khem Raj <[email protected]>
> 发送时间: 2019年10月31日 18:45
> 收件人: Zheng, Ruoqin/郑 若钦 <[email protected]>
> 抄送: [email protected]
> 主题: Re: [oe] [meta-oe][PATCH] ledmon: upgrade to 0.93
>
>
>
> On Thu, Oct 31, 2019 at 9:16 AM Zheng Ruoqin 
> <mailto:[email protected]> wrote:
> 1) inherit autotools-brokensep as new version use autotools.
>
> 2) Add a patch to fix compile error.
>    0001-Disable-Waddress-of-packed-member-to-fix-compi.patch
>
> 3) Modify do_install_append() function to fix do_package error as follows:
>    ledmon-git-r0 do_package: SYSTEMD_SERVICE_ledmon value ledmon.service does 
> not exist
>
> Signed-off-by: Zheng Ruoqin <mailto:[email protected]>
> ---
>  ...le-Waddress-of-packed-member-to-fix-compi.patch | 35 
> ++++++++++++++++++++++
>  meta-oe/recipes-bsp/ledmon/http://ledmon_git.bb           | 13 ++++----
>  2 files changed, 43 insertions(+), 5 deletions(-)
>  create mode 100644 
> meta-oe/recipes-bsp/ledmon/ledmon/0001-Disable-Waddress-of-packed-member-to-fix-compi.patch
>
> diff --git 
> a/meta-oe/recipes-bsp/ledmon/ledmon/0001-Disable-Waddress-of-packed-member-to-fix-compi.patch
>  
> b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Disable-Waddress-of-packed-member-to-fix-compi.patch
> new file mode 100644
> index 0000000..bd2b204
> --- /dev/null
> +++ 
> b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Disable-Waddress-of-packed-member-to-fix-compi.patch
> @@ -0,0 +1,35 @@
> +From 310540bbf853bc9bea384962d6acf66c7e99fd83 Mon Sep 17 00:00:00 2001
> +From: Zheng Ruoqin <mailto:[email protected]>
> +Date: Thu, 31 Oct 2019 12:52:57 +0900
> +Subject: [PATCH] Disable -Waddress-of-packed-member to fix compile
> + error.
> +
> +"-Waddress-of-packed-member" is enabled by default with gcc-9, and raise the 
> following waring.
> +
> +|   550 |  _dump_sgpio_amd(&amd_reg->amd);
> +|       |                  ^~~~~~~~~~~~~
> +| amd_sgpio.c: In function '_write_amd_register':
> +| amd_sgpio.c:558:18: error: taking address of packed member of 'struct 
> amd_register' may result in an unaligned pointer value 
> [-Werror=address-of-packed-member]
> +
> +So disable it.
> +
> +Signed-off-by: Zheng Ruoqin <mailto:[email protected]>
> +---
> + http://configure.ac | 1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/http://configure.ac b/http://configure.ac
> +index 7bc20f8..bf89a3c 100644
> +--- a/http://configure.ac
> ++++ b/http://configure.ac
> +@@ -24,6 +24,7 @@ AX_AM_CFLAGS_ADD([-Werror=alloca])
> + AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers])
> + AX_AM_CFLAGS_ADD([-Werror])
> + AX_AM_CFLAGS_ADD([-Werror=format-signedness])
> ++AX_AM_CFLAGS_ADD([-Wno-address-of-packed-member])
> +
>
> This warning knob may not be available always so
> Either we fix the warning by altering the code and making it go away or we 
> disable werror completely
> Of course first option is preferred
>
> + AC_SUBST([AM_CFLAGS])
> + AC_SUBST([AM_CPPFLAGS])
> +--
> +2.7.4
> +
> diff --git a/meta-oe/recipes-bsp/ledmon/http://ledmon_git.bb 
> b/meta-oe/recipes-bsp/ledmon/http://ledmon_git.bb
> index 74ae56c..5825868 100644
> --- a/meta-oe/recipes-bsp/ledmon/http://ledmon_git.bb
> +++ b/meta-oe/recipes-bsp/ledmon/http://ledmon_git.bb
> @@ -11,15 +11,17 @@ LIC_FILES_CHKSUM = 
> "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
>
>  DEPENDS = "sg3-utils udev"
>
> -inherit systemd
> +inherit autotools-brokensep systemd
>
> This is sad that we move to new version and out of tree build is broken can 
> we fix that rather than patching it out ?
>
> It might be upstream worthy patch as well
>
>
>  SYSTEMD_SERVICE_${PN} = "ledmon.service"
>
> +# 0.93
>  SRC_URI = "git://http://github.com/intel/ledmon;branch=master \
>             file://0002-include-sys-select.h-and-sys-types.h.patch \
> +           file://0001-Disable-Waddress-of-packed-member-to-fix-compi.patch \
>            "
>
> -SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f"
> +SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e"
>
>  COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
>  COMPATIBLE_HOST_libc-musl = "null"
> @@ -28,7 +30,8 @@ S = "${WORKDIR}/git"
>  EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'"
>
>  do_install_append() {
> -       install -d ${D}/${systemd_unitdir}/system
> -       oe_runmake  DESTDIR=${D}  install
> -       oe_runmake  DESTDIR=${D}${systemd_unitdir}/system  install-systemd
> +        if mailto:${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 
> 'false', d)}; then
> +               install -d ${D}${systemd_unitdir}/system
> +               install -m 0755 ${S}/systemd/ledmon.service 
> ${D}${systemd_unitdir}/system
> +        fi
>  }
> --
> 2.7.4
>
>
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> mailto:[email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>
-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to