diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-10-16 00:48:59 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-10-27 07:24:26 +0000 |
commit | 2e4575d2e87022eee3262279df0c53f7733b52ef (patch) | |
tree | 01e67739c19e4bc4cabf9095eb1638cdf867b39f /meta | |
parent | 40911f4fa04f71c8305e05a99abde9acba68e37f (diff) | |
download | poky-2e4575d2e87022eee3262279df0c53f7733b52ef.tar.gz |
systemd: Fix build with uclibc
225 needs additional patches for cater for new APIs used
in systemd
Change-Id: Idb66c2c6bb65c94b52ba35b276ca12cc868b043e
(From OE-Core rev: a267cf21b8e7c79e53354bd645c205f617de816c)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch b/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch new file mode 100644 index 0000000000..76ce4b7813 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch | ||
2 | |||
3 | exp10 extension is not part of uClibc, so compute it. | ||
4 | |||
5 | |||
6 | Signed-off-by: Samuel Martin <s.martin49@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Index: git/src/basic/missing.h | ||
11 | =================================================================== | ||
12 | --- git.orig/src/basic/missing.h | ||
13 | +++ git/src/basic/missing.h | ||
14 | @@ -1036,3 +1036,8 @@ static inline int kcmp(pid_t pid1, pid_t | ||
15 | #ifndef INPUT_PROP_ACCELEROMETER | ||
16 | #define INPUT_PROP_ACCELEROMETER 0x06 | ||
17 | #endif | ||
18 | + | ||
19 | +#ifdef __UCLIBC__ | ||
20 | +/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ | ||
21 | +#define exp10(x) (exp((x) * log(10))) | ||
22 | +#endif /* __UCLIBC__ */ | ||
diff --git a/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch b/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch new file mode 100644 index 0000000000..30e38173e6 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From cb71e4beea3b3b11e5951f95c829cd2eee9fcf7b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 12 Sep 2015 19:10:04 +0000 | ||
4 | Subject: [PATCH 22/31] Use getenv when secure versions are not available | ||
5 | |||
6 | musl doesnt implement secure version, so we default | ||
7 | to it if configure does not detect a secure imeplementation | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | Upstream-Status: Rejected | ||
12 | |||
13 | src/basic/missing.h | 5 +++-- | ||
14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/src/basic/missing.h b/src/basic/missing.h | ||
17 | index bf9b490..d6dbc7d 100644 | ||
18 | --- a/src/basic/missing.h | ||
19 | +++ b/src/basic/missing.h | ||
20 | @@ -584,13 +584,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle | ||
21 | return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags); | ||
22 | } | ||
23 | #endif | ||
24 | - | ||
25 | -#ifndef HAVE_SECURE_GETENV | ||
26 | +#ifdef HAVE_SECURE_GETENV | ||
27 | # ifdef HAVE___SECURE_GETENV | ||
28 | # define secure_getenv __secure_getenv | ||
29 | # else | ||
30 | # error "neither secure_getenv nor __secure_getenv are available" | ||
31 | # endif | ||
32 | +#else | ||
33 | +# define secure_getenv getenv | ||
34 | #endif | ||
35 | |||
36 | #ifndef CIFS_MAGIC_NUMBER | ||
37 | -- | ||
38 | 2.5.2 | ||
39 | |||
diff --git a/meta/recipes-core/systemd/systemd_225.bb b/meta/recipes-core/systemd/systemd_225.bb index c2dad58754..18c2448124 100644 --- a/meta/recipes-core/systemd/systemd_225.bb +++ b/meta/recipes-core/systemd/systemd_225.bb | |||
@@ -53,6 +53,8 @@ S = "${WORKDIR}/git" | |||
53 | 53 | ||
54 | SRC_URI_append_libc-uclibc = "\ | 54 | SRC_URI_append_libc-uclibc = "\ |
55 | file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ | 55 | file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \ |
56 | file://0022-Use-getenv-when-secure-versions-are-not-available.patch \ | ||
57 | file://0001-fix-build-on-uClibc-exp10.patch \ | ||
56 | " | 58 | " |
57 | LDFLAGS_append_libc-uclibc = " -lrt" | 59 | LDFLAGS_append_libc-uclibc = " -lrt" |
58 | 60 | ||