summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-12-25 16:09:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-11 23:26:29 +0000
commit3ad08c0463ae45e857c8a328b31444d48fe59f95 (patch)
treed5d3563809192631b35eb49e943442ba7b954d21 /meta
parent74c3667b2a99832ef277f0375d8eba77aa150b94 (diff)
downloadpoky-3ad08c0463ae45e857c8a328b31444d48fe59f95.tar.gz
uclibc: Upgrade to 1.0.10
Drop upstreamed patches Seems to fix parallel build race with locales (From OE-Core rev: 1eb9ce1277dfaaa32d9d528f21c96deedf8f122f) 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')
-rw-r--r--meta/recipes-core/uclibc/uclibc-git.inc7
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0001-Revert-glibc-compat-bump-glibc-minor-version.patch28
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch125
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/libc-stdlib-canonicalize_file_name-memory-leak.patch95
4 files changed, 2 insertions, 253 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git.inc b/meta/recipes-core/uclibc/uclibc-git.inc
index b84912ba7a..a5c4b5e2ff 100644
--- a/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/meta/recipes-core/uclibc/uclibc-git.inc
@@ -1,15 +1,12 @@
1SRCREV = "d1b81113b43a6d26dec4e0e58a380895d121006e" 1SRCREV = "0ad73077c230093ae004829da44418597f330c6a"
2 2
3PV = "1.0.9+git${SRCPV}" 3PV = "1.0.10+git${SRCPV}"
4 4
5FILESEXTRAPATHS =. "${FILE_DIRNAME}/uclibc-git:" 5FILESEXTRAPATHS =. "${FILE_DIRNAME}/uclibc-git:"
6 6
7SRC_URI = "git://uclibc-ng.org/git/uclibc-ng;branch=1.0 \ 7SRC_URI = "git://uclibc-ng.org/git/uclibc-ng;branch=1.0 \
8 file://0001-Disable-lrount_tes-function.patch \ 8 file://0001-Disable-lrount_tes-function.patch \
9 file://0001-Revert-glibc-compat-bump-glibc-minor-version.patch \
10 file://0002-Add-implementation-for-copysignl-for-ppc.patch \
11 file://0003-Add-argp-implementation.patch \ 9 file://0003-Add-argp-implementation.patch \
12 file://libc-stdlib-canonicalize_file_name-memory-leak.patch \
13 file://uClibc.machine \ 10 file://uClibc.machine \
14 file://uClibc.distro \ 11 file://uClibc.distro \
15 file://obstack.cfg \ 12 file://obstack.cfg \
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-Revert-glibc-compat-bump-glibc-minor-version.patch b/meta/recipes-core/uclibc/uclibc-git/0001-Revert-glibc-compat-bump-glibc-minor-version.patch
deleted file mode 100644
index 72d010932a..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0001-Revert-glibc-compat-bump-glibc-minor-version.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From f9f566849ad0785b2fd3fd6c4c5d324f9f822aac Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 13 Dec 2015 17:25:11 +0000
4Subject: [PATCH] Revert "glibc compat: bump glibc minor version"
5
6This reverts commit 4ff3a6c8eb91db71d6dc3d2932b66e848bd20ac3.
7---
8Upstream-Status: Inappropriate [ OE-Specific ]
9
10 include/features.h | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/include/features.h b/include/features.h
14index f6fbbf4..dcf1348 100644
15--- a/include/features.h
16+++ b/include/features.h
17@@ -393,7 +393,7 @@ uClibc was built without large file support enabled.
18 these macros to test for features in specific releases. */
19 /* Don't do it, if you want to keep uClibc happy. */
20 #define __GLIBC__ 2
21-#define __GLIBC_MINOR__ 10
22+#define __GLIBC_MINOR__ 2
23 #endif
24
25 #define __GLIBC_PREREQ(maj, min) \
26--
272.6.4
28
diff --git a/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch b/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch
deleted file mode 100644
index d4275c997e..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
1From 5d362074e5975b150a35bcfa77eab1bfa4e30de7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 16 Aug 2015 20:50:56 -0700
4Subject: [PATCH 2/7] Add implementation for copysignl for ppc
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 libc/sysdeps/linux/powerpc/Makefile.arch | 2 +-
11 libc/sysdeps/linux/powerpc/copysignl.c | 89 ++++++++++++++++++++++++++++++++
12 2 files changed, 90 insertions(+), 1 deletion(-)
13 create mode 100644 libc/sysdeps/linux/powerpc/copysignl.c
14
15diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
16index 4fbcb11..7c09c87 100644
17--- a/libc/sysdeps/linux/powerpc/Makefile.arch
18+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
19@@ -5,7 +5,7 @@
20 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
21 #
22
23-CSRC-y := __syscall_error.c ioctl.c
24+CSRC-y := __syscall_error.c ioctl.c copysignl.c
25
26 SSRC-y := \
27 __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
28diff --git a/libc/sysdeps/linux/powerpc/copysignl.c b/libc/sysdeps/linux/powerpc/copysignl.c
29new file mode 100644
30index 0000000..000f653
31--- /dev/null
32+++ b/libc/sysdeps/linux/powerpc/copysignl.c
33@@ -0,0 +1,89 @@
34+/* s_copysignl.c -- long double version of s_copysign.c.
35+ * Conversion to long double by Ulrich Drepper,
36+ * Cygnus Support, drepper@cygnus.com.
37+ */
38+
39+/*
40+ * ====================================================
41+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
42+ *
43+ * Developed at SunPro, a Sun Microsystems, Inc. business.
44+ * Permission to use, copy, modify, and distribute this
45+ * software is freely granted, provided that this notice
46+ * is preserved.
47+ * ====================================================
48+ */
49+
50+/*
51+ * copysignl(long double x, long double y)
52+ * copysignl(x,y) returns a value with the magnitude of x and
53+ * with the sign bit of y.
54+ */
55+
56+#include <endian.h>
57+#include <stdint.h>
58+
59+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
60+
61+typedef union
62+{
63+ long double value;
64+ struct
65+ {
66+ int sign_exponent:16;
67+ unsigned int empty:16;
68+ uint32_t msw;
69+ uint32_t lsw;
70+ } parts;
71+} ieee_long_double_shape_type;
72+
73+#endif
74+
75+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
76+
77+typedef union
78+{
79+ long double value;
80+ struct
81+ {
82+ uint32_t lsw;
83+ uint32_t msw;
84+ int sign_exponent:16;
85+ unsigned int empty:16;
86+ } parts;
87+} ieee_long_double_shape_type;
88+
89+#endif
90+
91+/* Get int from the exponent of a long double. */
92+
93+#define GET_LDOUBLE_EXP(exp,d) \
94+do { \
95+ ieee_long_double_shape_type ge_u; \
96+ ge_u.value = (d); \
97+ (exp) = ge_u.parts.sign_exponent; \
98+} while (0)
99+
100+/* Set exponent of a long double from an int. */
101+
102+#define SET_LDOUBLE_EXP(d,exp) \
103+do { \
104+ ieee_long_double_shape_type se_u; \
105+ se_u.value = (d); \
106+ se_u.parts.sign_exponent = (exp); \
107+ (d) = se_u.value; \
108+} while (0)
109+
110+long double copysignl(long double x, long double y);
111+libc_hidden_proto(copysignl);
112+
113+long double copysignl(long double x, long double y)
114+{
115+ uint32_t es1,es2;
116+ GET_LDOUBLE_EXP(es1,x);
117+ GET_LDOUBLE_EXP(es2,y);
118+ SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
119+ return x;
120+}
121+
122+libc_hidden_def(copysignl);
123--
1242.1.4
125
diff --git a/meta/recipes-core/uclibc/uclibc-git/libc-stdlib-canonicalize_file_name-memory-leak.patch b/meta/recipes-core/uclibc/uclibc-git/libc-stdlib-canonicalize_file_name-memory-leak.patch
deleted file mode 100644
index 83d21e2ec7..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/libc-stdlib-canonicalize_file_name-memory-leak.patch
+++ /dev/null
@@ -1,95 +0,0 @@
1From patchwork Wed Oct 21 06:02:30 2015
2Content-Type: text/plain; charset="utf-8"
3MIME-Version: 1.0
4Content-Transfer-Encoding: 7bit
5Subject: libc/stdlib: canonicalize_file_name() memory leak
6From: =?utf-8?q?Wojciech_Nizi=C5=84ski?= <niziak@spox.org>
7X-Patchwork-Id: 533608
8Message-Id: <loom.20151021T080015-833@post.gmane.org>
9To: uclibc@uclibc.org
10Date: Wed, 21 Oct 2015 06:02:30 +0000 (UTC)
11
12System based on Buildroot 2014.11
13 Linux 3.10.88
14 uclibc 0.9.33.2 (also with 1.0.2)
15 systemd 216
16 gcc 4.8.3 (also with 4.9.2)
17
18Bug:
19 After 2 days system is out of memory. PID 1 (systemd) is allocating.
20 over 120MB od RAM..
21 Just after reboot PID 1 is taking only about 600kB.
22
23How to reproduce:
24 With every systemd service reload or restart, heap of PID 1 grows.
25 Try with command:
26 watch -n1 \
27 'systemctl stop systemd-sysctl ; grep heap /proc/1/smaps -A15; free'
28
29Source of bug:
30
31 Uclibc's canonicalize_file_name() is allocating temprary buffer of.
32 4kB (PATH_MAX), and passing it to realpath() as second argument..
33 Function canonicalize... is not checking if realpath() fails and.
34 memory is lost.
35
36 Backtrace:
37 #0 malloc (bytes=4096) at libc/stdlib/malloc-standard/malloc.c:844
38 #1 canonicalize_file_name.
39 (name="/etc/systemd/system/systemd-sysctl.service.d") at.
40 libc/stdlib/canonicalize.c:30
41 #2 path_strv_resolve (...) at src/shared/path-util.c:275
42
43Solution:
44 Do not use temporary buffer like in eglibc.
45 Function realpath() will be responsible for allocation.
46
47From: Wojciech Nizinski <w.nizinski@grinn-global.com>
48Date: Tue, 20 Oct 2015 14:08:09 +0200
49Subject: [PATCH]libc/stdlib: canonicalize_file_name() memory leak
50
51Uclibc's canonicalize_file_name() is allocating temprary buffer of 4kB
52(PATH_MAX), and passing it to realpath() as second argument. Function is
53not checking if realpath() fails and memory is lost.
54---
55Upstream-Status: Submitted
56
57 libc/stdlib/canonicalize.c | 21 +--------------------
58 1 file changed, 1 insertion(+), 20 deletions(-)
59
60diff --git a/libc/stdlib/canonicalize.c b/libc/stdlib/canonicalize.c
61index 06e710a..da09d58 100644
62--- a/libc/stdlib/canonicalize.c
63+++ b/libc/stdlib/canonicalize.c
64@@ -9,30 +9,11 @@
65 */
66
67 #include <stdlib.h>
68-#include <limits.h>
69
70 #ifdef __USE_GNU
71
72-#ifndef PATH_MAX
73-# ifdef _POSIX_VERSION
74-# define PATH_MAX _POSIX_PATH_MAX
75-# else
76-# ifdef MAXPATHLEN
77-# define PATH_MAX MAXPATHLEN
78-# else
79-# define PATH_MAX 1024
80-# endif
81-# endif
82-#endif
83-
84 char * canonicalize_file_name (const char *name)
85 {
86- char *buf = (char *) malloc(PATH_MAX);
87-
88- if(unlikely(buf == NULL))
89- return NULL;
90-
91- *buf='\0';
92- return realpath (name, buf);
93+ return realpath (name, NULL);
94 }
95 #endif