diff options
-rw-r--r-- | meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch | 29 | ||||
-rw-r--r-- | meta-oe/recipes-bsp/ledmon/ledmon_git.bb | 17 |
2 files changed, 41 insertions, 5 deletions
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch new file mode 100644 index 0000000000..b65f1a732f --- /dev/null +++ b/meta-oe/recipes-bsp/ledmon/ledmon/0001-Don-t-build-with-Werror-to-fix-compile-error.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | Subject: [PATCH] Don't build with -Werror to fix compile error. | ||
2 | |||
3 | | 550 | _dump_sgpio_amd(&amd_reg->amd); | ||
4 | | | ^~~~~~~~~~~~~ | ||
5 | | amd_sgpio.c: In function '_write_amd_register': | ||
6 | | 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] | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> | ||
11 | --- | ||
12 | configure.ac | 1 - | ||
13 | 1 file changed, 1 deletion(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 7bc20f8..7e01bd5 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -22,7 +22,6 @@ AX_AM_CFLAGS_ADD([-Werror=format-truncation=1]) | ||
20 | AX_AM_CFLAGS_ADD([-Werror=shift-negative-value]) | ||
21 | AX_AM_CFLAGS_ADD([-Werror=alloca]) | ||
22 | AX_AM_CFLAGS_ADD([-Werror=missing-field-initializers]) | ||
23 | -AX_AM_CFLAGS_ADD([-Werror]) | ||
24 | AX_AM_CFLAGS_ADD([-Werror=format-signedness]) | ||
25 | |||
26 | AC_SUBST([AM_CFLAGS]) | ||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb index 74ae56c671..f9ae9aad9a 100644 --- a/meta-oe/recipes-bsp/ledmon/ledmon_git.bb +++ b/meta-oe/recipes-bsp/ledmon/ledmon_git.bb | |||
@@ -11,15 +11,17 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | |||
11 | 11 | ||
12 | DEPENDS = "sg3-utils udev" | 12 | DEPENDS = "sg3-utils udev" |
13 | 13 | ||
14 | inherit systemd | 14 | inherit autotools systemd |
15 | 15 | ||
16 | SYSTEMD_SERVICE_${PN} = "ledmon.service" | 16 | SYSTEMD_SERVICE_${PN} = "ledmon.service" |
17 | 17 | ||
18 | # 0.93 | ||
18 | SRC_URI = "git://github.com/intel/ledmon;branch=master \ | 19 | SRC_URI = "git://github.com/intel/ledmon;branch=master \ |
19 | file://0002-include-sys-select.h-and-sys-types.h.patch \ | 20 | file://0002-include-sys-select.h-and-sys-types.h.patch \ |
21 | file://0001-Don-t-build-with-Werror-to-fix-compile-error.patch \ | ||
20 | " | 22 | " |
21 | 23 | ||
22 | SRCREV = "ad1304ca1363d727425a1f23703c523e21feae4f" | 24 | SRCREV = "1d72f9cb5c9163b2ecdf19709935720e65f5b90e" |
23 | 25 | ||
24 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" | 26 | COMPATIBLE_HOST = "(i.86|x86_64).*-linux" |
25 | COMPATIBLE_HOST_libc-musl = "null" | 27 | COMPATIBLE_HOST_libc-musl = "null" |
@@ -27,8 +29,13 @@ COMPATIBLE_HOST_libc-musl = "null" | |||
27 | S = "${WORKDIR}/git" | 29 | S = "${WORKDIR}/git" |
28 | EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'" | 30 | EXTRA_OEMAKE = "CC='${CC}' LDFLAGS='${LDFLAGS}' CFLAGS='${CFLAGS}'" |
29 | 31 | ||
32 | # The ledmon sources include headers in ${S}/config to build but not in CFLAGS. | ||
33 | # We need to add this include path in CFLAGS. | ||
34 | CFLAGS += "-I${S}/config" | ||
35 | |||
30 | do_install_append() { | 36 | do_install_append() { |
31 | install -d ${D}/${systemd_unitdir}/system | 37 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
32 | oe_runmake DESTDIR=${D} install | 38 | install -d ${D}${systemd_unitdir}/system |
33 | oe_runmake DESTDIR=${D}${systemd_unitdir}/system install-systemd | 39 | install -m 0755 ${S}/systemd/ledmon.service ${D}${systemd_unitdir}/system |
40 | fi | ||
34 | } | 41 | } |