summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/argp-headers.patch2
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/argp-support.patch3
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch2
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch13
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch83
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/orign_path.patch185
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch12
-rw-r--r--meta/recipes-core/uclibc/uclibc-git/uclibc-arm-ftruncate64.patch18
-rw-r--r--meta/recipes-core/uclibc/uclibc_git.bb8
9 files changed, 194 insertions, 132 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch b/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch
index 7fd148fed2..b31b991846 100644
--- a/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/argp-headers.patch
@@ -8,6 +8,8 @@ Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
8 create mode 100644 include/argp.h 8 create mode 100644 include/argp.h
9 create mode 100644 libc/argp/argp-fmtstream.h 9 create mode 100644 libc/argp/argp-fmtstream.h
10 10
11Upstream-Status: Pending
12
11Index: git/include/argp.h 13Index: git/include/argp.h
12=================================================================== 14===================================================================
13--- /dev/null 15--- /dev/null
diff --git a/meta/recipes-core/uclibc/uclibc-git/argp-support.patch b/meta/recipes-core/uclibc/uclibc-git/argp-support.patch
index 04a3c7824c..3e9680f1fe 100644
--- a/meta/recipes-core/uclibc/uclibc-git/argp-support.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/argp-support.patch
@@ -13,6 +13,9 @@ it doesn't need to link libuargp.so explicitely.
13Signed-off-by: Salvatore Cro <salvatore.cro at st.com> 13Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
14Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono at st.com> 14Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono at st.com>
15Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com> 15Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
16
17Upstream-Status: Pending
18
16--- 19---
17 Makefile.in | 8 + 20 Makefile.in | 8 +
18 Makerules | 8 +- 21 Makerules | 8 +-
diff --git a/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
index 429f27dfc4..15ee0ca156 100644
--- a/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/compile-arm-fork-with-O2.patch
@@ -1,5 +1,5 @@
1When compiling in thumb mode for arm with -Os gcc gives up since it can not find registers 1When compiling in thumb mode for arm with -Os gcc gives up since it can not find registers
2to spill. So we use -O2 option for compiling fork.c It may be addressable is gcc. 2to spill. So we use -O2 option for compiling fork.c It may be addressable in gcc.
3 3
4Signed-off-by: Khem Raj <raj.khem@gmail.com> 4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5 5
diff --git a/meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch b/meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch
deleted file mode 100644
index f009cb97f7..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/cross_compile_check.patch
+++ /dev/null
@@ -1,13 +0,0 @@
1diff --git a/Rules.mak b/Rules.mak
2index 84baa97..571da05 100644
3--- a/Rules.mak
4+++ b/Rules.mak
5@@ -158,7 +158,7 @@ endif
6 comma:=,
7 space:= #
8
9-ifndef CROSS_COMPILE
10+ifeq ($(CROSS_COMPILE),)
11 CROSS_COMPILE=$(call qstrip,$(CROSS_COMPILER_PREFIX))
12 endif
13
diff --git a/meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch b/meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch
deleted file mode 100644
index 16e48b1bca..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/fix_libdl.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1Defer removal of the local scope of a dl-opened library after
2all the destructors (of itself and related dependencies) are actually
3get unloaded, otherwise any function registered via atexit()
4won't be resolved.
5
6Signed-off-by: Khem Raj <raj.khem at gmail.com>
7Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono at st.com>
8Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
9---
10 ldso/libdl/libdl.c | 33 +++++++++++++++++++++------------
11 1 files changed, 21 insertions(+), 12 deletions(-)
12
13
14Upstream-Status: Pending
15
16Index: git/ldso/libdl/libdl.c
17===================================================================
18--- git.orig/ldso/libdl/libdl.c 2012-01-17 17:38:44.930821794 -0800
19+++ git/ldso/libdl/libdl.c 2012-01-17 17:39:02.754822656 -0800
20@@ -780,7 +780,9 @@
21 struct dyn_elf *handle;
22 unsigned int end = 0, start = 0xffffffff;
23 unsigned int i, j;
24- struct r_scope_elem *ls;
25+ struct r_scope_elem *ls, *ls_next = NULL;
26+ struct elf_resolve **handle_rlist;
27+
28 #if defined(USE_TLS) && USE_TLS
29 bool any_tls = false;
30 size_t tls_free_start = NO_TLS_OFFSET;
31@@ -813,6 +815,19 @@
32 free(handle);
33 return 0;
34 }
35+
36+ /* Store the handle's local scope array for later removal */
37+ handle_rlist = handle->dyn->symbol_scope.r_list;
38+
39+ /* Store references to the local scope entries for later removal */
40+ for (ls = &_dl_loaded_modules->symbol_scope; ls && ls->next; ls = ls->next)
41+ if (ls->next->r_list[0] == handle->dyn) {
42+ break;
43+ }
44+ /* ls points to the previous local symbol scope */
45+ if(ls && ls->next)
46+ ls_next = ls->next->next;
47+
48 /* OK, this is a valid handle - now close out the file */
49 for (j = 0; j < handle->init_fini.nlist; ++j) {
50 tpnt = handle->init_fini.init_fini[j];
51@@ -974,16 +989,6 @@
52 }
53 }
54
55- if (handle->dyn == tpnt) {
56- /* Unlink the local scope from global one */
57- for (ls = &_dl_loaded_modules->symbol_scope; ls; ls = ls->next)
58- if (ls->next->r_list[0] == tpnt) {
59- _dl_if_debug_print("removing symbol_scope: %s\n", tpnt->libname);
60- break;
61- }
62- ls->next = ls->next->next;
63- }
64-
65 /* Next, remove tpnt from the global symbol table list */
66 if (_dl_symbol_tables) {
67 if (_dl_symbol_tables->dyn == tpnt) {
68@@ -1005,10 +1010,14 @@
69 }
70 }
71 free(tpnt->libname);
72- free(tpnt->symbol_scope.r_list);
73 free(tpnt);
74 }
75 }
76+ /* Unlink and release the handle's local scope from global one */
77+ if(ls)
78+ ls->next = ls_next;
79+ free(handle_rlist);
80+
81 for (rpnt1 = handle->next; rpnt1; rpnt1 = rpnt1_tmp) {
82 rpnt1_tmp = rpnt1->next;
83 free(rpnt1);
diff --git a/meta/recipes-core/uclibc/uclibc-git/orign_path.patch b/meta/recipes-core/uclibc/uclibc-git/orign_path.patch
new file mode 100644
index 0000000000..c9c15a34b7
--- /dev/null
+++ b/meta/recipes-core/uclibc/uclibc-git/orign_path.patch
@@ -0,0 +1,185 @@
1Patch is backported from
2http://lists.busybox.net/pipermail/uclibc/2011-March/045003.html
3
4Upstream-Status: Pending
5
6Index: git/ldso/ldso/dl-elf.c
7===================================================================
8--- git.orig/ldso/ldso/dl-elf.c 2012-01-23 19:18:58.000000000 -0800
9+++ git/ldso/ldso/dl-elf.c 2012-01-23 21:52:06.144646590 -0800
10@@ -133,53 +133,60 @@
11 * in uClibc/ldso/util/ldd.c */
12 static struct elf_resolve *
13 search_for_named_library(const char *name, unsigned rflags, const char *path_list,
14- struct dyn_elf **rpnt)
15+ struct dyn_elf **rpnt, const char* origin)
16 {
17- char *path, *path_n, *mylibname;
18+ char *mylibname;
19+ const char *p, *pn;
20 struct elf_resolve *tpnt;
21- int done;
22+ int plen;
23
24 if (path_list==NULL)
25 return NULL;
26
27- /* We need a writable copy of this string, but we don't
28- * need this allocated permanently since we don't want
29- * to leak memory, so use alloca to put path on the stack */
30- done = _dl_strlen(path_list);
31- path = alloca(done + 1);
32-
33 /* another bit of local storage */
34 mylibname = alloca(2050);
35
36- _dl_memcpy(path, path_list, done+1);
37-
38 /* Unlike ldd.c, don't bother to eliminate double //s */
39
40 /* Replace colons with zeros in path_list */
41 /* : at the beginning or end of path maps to CWD */
42 /* :: anywhere maps CWD */
43 /* "" maps to CWD */
44- done = 0;
45- path_n = path;
46- do {
47- if (*path == 0) {
48- *path = ':';
49- done = 1;
50+ for (p = path_list; p != NULL; p = pn) {
51+ pn = _dl_strchr(p + 1, ':');
52+ if (pn != NULL) {
53+ plen = pn - p;
54+ pn++;
55+ } else
56+ plen = _dl_strlen(p);
57+
58+ if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
59+ int olen;
60+ if (rflags && plen != 7)
61+ continue;
62+ if (origin == NULL)
63+ continue;
64+ for (olen = _dl_strlen(origin) - 1; olen >= 0 && origin[olen] != '/'; olen--)
65+ ;
66+ if (olen <= 0)
67+ continue;
68+ _dl_memcpy(&mylibname[0], origin, olen);
69+ _dl_memcpy(&mylibname[olen], p + 7, plen - 7);
70+ mylibname[olen + plen - 7] = 0;
71+ } else if (plen != 0) {
72+ _dl_memcpy(mylibname, p, plen);
73+ mylibname[plen] = 0;
74+ } else {
75+ _dl_strcpy(mylibname, ".");
76 }
77- if (*path == ':') {
78- *path = 0;
79- if (*path_n)
80- _dl_strcpy(mylibname, path_n);
81- else
82- _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
83- _dl_strcat(mylibname, "/");
84- _dl_strcat(mylibname, name);
85- if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
86- return tpnt;
87- path_n = path+1;
88- }
89- path++;
90- } while (!done);
91+ _dl_strcat(mylibname, "/");
92+ _dl_strcat(mylibname, name);
93+
94+ tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname);
95+ if (tpnt != NULL)
96+ return tpnt;
97+ }
98+
99 return NULL;
100 }
101
102@@ -231,8 +238,10 @@
103 if (pnt) {
104 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
105 _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
106- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
107+ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt,
108+ tpnt->libname)) != NULL)
109 return tpnt1;
110+
111 }
112 #endif
113
114@@ -240,7 +249,7 @@
115 /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
116 if (_dl_library_path) {
117 _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
118- if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt)) != NULL)
119+ if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt, NULL)) != NULL)
120 {
121 return tpnt1;
122 }
123@@ -254,7 +263,7 @@
124 if (pnt) {
125 pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
126 _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
127- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
128+ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, NULL)) != NULL)
129 return tpnt1;
130 }
131 #endif
132@@ -288,7 +297,7 @@
133 /* Look for libraries wherever the shared library loader
134 * was installed */
135 _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
136- tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt);
137+ tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt, NULL);
138 if (tpnt1 != NULL)
139 return tpnt1;
140 #endif
141@@ -301,7 +310,7 @@
142 #ifndef __LDSO_CACHE_SUPPORT__
143 ":" UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib"
144 #endif
145- , rpnt);
146+ , rpnt, NULL);
147 if (tpnt1 != NULL)
148 return tpnt1;
149
150Index: git/ldso/ldso/ldso.c
151===================================================================
152--- git.orig/ldso/ldso/ldso.c 2012-01-23 19:18:58.000000000 -0800
153+++ git/ldso/ldso/ldso.c 2012-01-23 21:34:11.152594621 -0800
154@@ -407,6 +407,20 @@
155 return p - list;
156 }
157
158+static void _dl_setup_progname(const char *argv0)
159+{
160+ char image[PATH_MAX];
161+ ssize_t s;
162+
163+ s = _dl_readlink("/proc/self/exe", image, sizeof(image));
164+ if (s > 0 && image[0] == '/') {
165+ image[s] = 0;
166+ _dl_progname = _dl_strdup(image);
167+ } else if (argv0) {
168+ _dl_progname = argv0;
169+ }
170+}
171+
172 void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
173 ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv
174 DL_GET_READY_TO_RUN_EXTRA_PARMS)
175@@ -458,9 +472,7 @@
176 * been fixed up by now. Still no function calls outside of this
177 * library, since the dynamic resolver is not yet ready.
178 */
179- if (argv[0]) {
180- _dl_progname = argv[0];
181- }
182+ _dl_setup_progname(argv[0]);
183
184 #ifndef __LDSO_STANDALONE_SUPPORT__
185 if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) {
diff --git a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
index 90fd3db5c2..bee251c335 100644
--- a/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
+++ b/meta/recipes-core/uclibc/uclibc-git/remove_attribute_optimize_Os.patch
@@ -3,18 +3,6 @@ Dont support localised optimizations this helps to have a global -O level
3Signed-off-by: Khem Raj <raj.khem@gmail.com> 3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending 4Upstream-Status: Pending
5 5
6Index: git/include/features.h
7===================================================================
8--- git.orig/include/features.h
9+++ git/include/features.h
10@@ -186,7 +186,6 @@
11 # define __need_uClibc_config_h
12 # include <bits/uClibc_config.h>
13 # undef __need_uClibc_config_h
14-
15 /* For uClibc, always optimize for size -- this should disable
16 * a lot of expensive inlining...
17 * TODO: this is wrong! __OPTIMIZE_SIZE__ is an indicator of
18Index: git/libpthread/nptl/pthread_mutex_timedlock.c 6Index: git/libpthread/nptl/pthread_mutex_timedlock.c
19=================================================================== 7===================================================================
20--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c 8--- git.orig/libpthread/nptl/pthread_mutex_timedlock.c
diff --git a/meta/recipes-core/uclibc/uclibc-git/uclibc-arm-ftruncate64.patch b/meta/recipes-core/uclibc/uclibc-git/uclibc-arm-ftruncate64.patch
deleted file mode 100644
index 05a394d84b..0000000000
--- a/meta/recipes-core/uclibc/uclibc-git/uclibc-arm-ftruncate64.patch
+++ /dev/null
@@ -1,18 +0,0 @@
1ftruncate64 has 4 args on arm
2
3Signed-off-by: Khem Raj <raj.khem@gmail.com>
4Upstream-Status: Pending
5
6Index: uclibc-0.9.29/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
7===================================================================
8--- uclibc-0.9.29.orig/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
9+++ uclibc-0.9.29/libc/sysdeps/linux/arm/bits/uClibc_arch_features.h
10@@ -38,4 +38,8 @@
11 /* define if target supports IEEE signed zero floats */
12 #define __UCLIBC_HAVE_SIGNED_ZERO__
13
14+#ifdef __ARM_EABI__
15+# define __UCLIBC_TRUNCATE64_HAS_4_ARGS__
16+#endif
17+
18 #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
diff --git a/meta/recipes-core/uclibc/uclibc_git.bb b/meta/recipes-core/uclibc/uclibc_git.bb
index ee1b5e0cfc..0088152bcc 100644
--- a/meta/recipes-core/uclibc/uclibc_git.bb
+++ b/meta/recipes-core/uclibc/uclibc_git.bb
@@ -1,4 +1,4 @@
1SRCREV="a4421e60526d3420a9c0bd55bfa4a25a746cbc8e" 1SRCREV="eb72efd81e0d5be6c836c5a084cc65b9734f544d"
2 2
3require uclibc.inc 3require uclibc.inc
4 4
@@ -11,10 +11,9 @@ PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
11 11
12FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}" 12FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}"
13 13
14SRC_URI = "git://busybox.osuosl.org/uClibc.git;branch=master;protocol=git \ 14SRC_URI = "git://uclibc.org/uClibc.git;branch=master;protocol=git \
15 file://uClibc.machine \ 15 file://uClibc.machine \
16 file://uClibc.distro \ 16 file://uClibc.distro \
17 file://uclibc-arm-ftruncate64.patch \
18 file://uclibc_enable_log2_test.patch \ 17 file://uclibc_enable_log2_test.patch \
19 file://ldso_use_arm_dl_linux_resolve_in_thumb_mode.patch \ 18 file://ldso_use_arm_dl_linux_resolve_in_thumb_mode.patch \
20 file://powerpc_copysignl.patch \ 19 file://powerpc_copysignl.patch \
@@ -23,8 +22,7 @@ SRC_URI = "git://busybox.osuosl.org/uClibc.git;branch=master;protocol=git \
23 file://remove_attribute_optimize_Os.patch \ 22 file://remove_attribute_optimize_Os.patch \
24 file://compile-arm-fork-with-O2.patch \ 23 file://compile-arm-fork-with-O2.patch \
25 file://uclibc-execvpe.patch \ 24 file://uclibc-execvpe.patch \
26 file://fix_libdl.patch \ 25 file://orign_path.patch \
27 file://cross_compile_check.patch \
28 " 26 "
29 27
30S = "${WORKDIR}/git" 28S = "${WORKDIR}/git"