diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-12-02 19:04:17 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-12-13 11:19:11 +0100 |
commit | 138715ffcc0b243244f27465aa5dff0c223cd95f (patch) | |
tree | d6eef1bc9d3751d5e308bab8cdc84a59361a6506 /meta-oe | |
parent | c0c8f946c1354a6be7685a14cb34e940ebd15af5 (diff) | |
download | meta-openembedded-138715ffcc0b243244f27465aa5dff0c223cd95f.tar.gz |
dmalloc: Add recipe
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
9 files changed, 776 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch new file mode 100644 index 000000000..ea940e993 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/0001-undefined-strdup-macro.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 9c2438e85e4d7deb9422be257a25e8ab16093821 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 2 Dec 2016 14:02:02 -0800 | ||
4 | Subject: [PATCH] undefined strdup macro | ||
5 | |||
6 | build fails due to strdup define in string2.h | ||
7 | system header. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | dmalloc.h.3 | 3 +++ | ||
12 | 1 file changed, 3 insertions(+) | ||
13 | |||
14 | diff --git a/dmalloc.h.3 b/dmalloc.h.3 | ||
15 | index 8bda997..b70c07e 100644 | ||
16 | --- a/dmalloc.h.3 | ||
17 | +++ b/dmalloc.h.3 | ||
18 | @@ -1,5 +1,8 @@ | ||
19 | /* NOTE: start of $Id: dmalloc.h.4,v 1.15 2007/05/14 17:23:37 gray Exp $ */ | ||
20 | |||
21 | +#undef strndup | ||
22 | +#undef strdup | ||
23 | + | ||
24 | /* dmalloc version defines */ | ||
25 | #define DMALLOC_VERSION_MAJOR 5 /* X.0.0 */ | ||
26 | #define DMALLOC_VERSION_MINOR 5 /* 0.X.0 */ | ||
27 | -- | ||
28 | 2.10.2 | ||
29 | |||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch new file mode 100644 index 000000000..967643bad --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/02-Makefile.in.patch | |||
@@ -0,0 +1,312 @@ | |||
1 | Description: Changes for building shared libraries | ||
2 | This patch includes changes for building shared libraries with PIC object | ||
3 | files and the correct soname and libname. | ||
4 | Author: Daniel Rus Morales <danirus@tol-project.org> | ||
5 | |||
6 | Index: dmalloc-5.5.2/Makefile.in | ||
7 | =================================================================== | ||
8 | --- dmalloc-5.5.2.orig/Makefile.in | ||
9 | +++ dmalloc-5.5.2/Makefile.in | ||
10 | @@ -41,7 +41,7 @@ LIBRARY = lib$(MODULE).a | ||
11 | |||
12 | # thread version of the library | ||
13 | LIB_TH = lib$(MODULE)th.a | ||
14 | -LIB_TH_SL = lib$(MODULE)th.@shlibext@ | ||
15 | +LIB_TH_SL = lib$(MODULE)th.@shlibext@.5.5.2 | ||
16 | @TH_ON@BUILD_ALL_1 = threads | ||
17 | @TH_ON@INSTALL_LIB_1 = installth | ||
18 | @SL_ON@BUILD_THREADS_1 = $(LIB_TH_SL) | ||
19 | @@ -50,8 +50,8 @@ LIB_TH_SL = lib$(MODULE)th.@shlibext@ | ||
20 | @TH_ON@@SL_ON@INSTALL_LIB_2 = installthsl | ||
21 | |||
22 | # C++ version of the library | ||
23 | -LIB_CXX = lib$(MODULE)xx.a | ||
24 | -LIB_CXX_SL = lib$(MODULE)xx.@shlibext@ | ||
25 | +LIB_CXX = lib$(MODULE)cxx.a | ||
26 | +LIB_CXX_SL = lib$(MODULE)cxx.@shlibext@.5.5.2 | ||
27 | @CXX_ON@BUILD_ALL_3 = $(LIB_CXX) | ||
28 | @CXX_ON@INSTALL_LIB_3 = installcxx | ||
29 | @SL_ON@BUILD_CXX_3 = $(LIB_CXX_SL) | ||
30 | @@ -61,7 +61,7 @@ LIB_CXX_SL = lib$(MODULE)xx.@shlibext@ | ||
31 | |||
32 | # threads + C++ | ||
33 | LIB_TH_CXX = lib$(MODULE)thcxx.a | ||
34 | -LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@ | ||
35 | +LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlibext@.5.5.2 | ||
36 | @TH_ON@@CXX_ON@BUILD_ALL_5 = $(LIB_TH_CXX) | ||
37 | @TH_ON@@CXX_ON@INSTALL_LIB_5 = installthcxx | ||
38 | @TH_ON@BUILD_CXX_5 = $(LIB_TH_CXX) | ||
39 | @@ -76,7 +76,7 @@ LIB_TH_CXX_SL = lib$(MODULE)thcxx.@shlib | ||
40 | @CXX_ON@@SL_ON@INSTALL_THREADS_6 = installthcxxsl | ||
41 | |||
42 | # shared versions of the libraries | ||
43 | -LIB_SL = lib$(MODULE).@shlibext@ | ||
44 | +LIB_SL = lib$(MODULE).@shlibext@.5.5.2 | ||
45 | @SL_ON@BUILD_ALL_7 = $(LIB_SL) | ||
46 | @SL_ON@INSTALL_LIB_7 = installsl | ||
47 | @SL_ON@BUILD_TH_CXX_7 = $(LIB_TH_CXX_SL) | ||
48 | @@ -145,9 +145,13 @@ SHELL = /bin/sh | ||
49 | |||
50 | HFLS = dmalloc.h | ||
51 | OBJS = arg_check.o compat.o dmalloc_rand.o dmalloc_tab.o env.o heap.o | ||
52 | +OBJS_SL = arg_check_sl.o compat_sl.o dmalloc_rand_sl.o dmalloc_tab_sl.o env_sl.o heap_sl.o | ||
53 | NORMAL_OBJS = chunk.o error.o malloc.o | ||
54 | +NORMAL_OBJS_SL = chunk_sl.o error_sl.o malloc_sl.o | ||
55 | THREAD_OBJS = chunk_th.o error_th.o malloc_th.o | ||
56 | +THREAD_OBJS_SL = chunk_th_sl.o error_th_sl.o malloc_th_sl.o | ||
57 | CXX_OBJS = dmallocc.o | ||
58 | +CXX_OBJS_SL = dmallocc_sl.o | ||
59 | |||
60 | CFLAGS = $(CCFLAGS) | ||
61 | TEST = $(MODULE)_t | ||
62 | @@ -160,9 +164,9 @@ all : $(BUILD_ALL) | ||
63 | |||
64 | clean : | ||
65 | rm -f $(A_OUT) core *.o *.t | ||
66 | - rm -f $(LIBRARY) $(LIB_TH) $(LIB_CXX) $(LIB_TH_CXX) $(TEST) $(TEST_FC) | ||
67 | - rm -f $(LIB_TH_SL) $(LIB_CXX_SL) $(LIB_TH_CXX_SL) $(LIB_SL) | ||
68 | + rm -f $(TEST) $(TEST_FC) | ||
69 | rm -f $(UTIL) dmalloc.h | ||
70 | + rm -f lib$(MODULE)*.* | ||
71 | |||
72 | realclean : clean | ||
73 | |||
74 | @@ -181,43 +185,43 @@ installincs : $(HFLS) | ||
75 | $(INSTALL_DATA) $(HFLS) $(includedir) | ||
76 | |||
77 | installthsl : $(LIB_TH_SL) | ||
78 | - $(srcdir)/mkinstalldirs $(libdir) | ||
79 | - $(INSTALL_PROGRAM) $(LIB_TH_SL) $(libdir) | ||
80 | + $(srcdir)/mkinstalldirs $(shlibdir) | ||
81 | + $(INSTALL) $(LIB_TH_SL) $(shlibdir) | ||
82 | |||
83 | installth : $(INSTALL_THREADS) | ||
84 | $(srcdir)/mkinstalldirs $(libdir) | ||
85 | - $(INSTALL_PROGRAM) $(LIB_TH) $(libdir) | ||
86 | + $(INSTALL) $(LIB_TH) $(libdir) | ||
87 | @CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" | ||
88 | @SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library" | ||
89 | |||
90 | installthcxxsl : $(LIB_TH_CXX_SL) | ||
91 | $(srcdir)/mkinstalldirs $(shlibdir) | ||
92 | - $(INSTALL_PROGRAM) $(LIB_TH_CXX_SL) $(shlibdir) | ||
93 | + $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir) | ||
94 | |||
95 | installthcxx : $(INSTALL_TH_CXX) | ||
96 | $(srcdir)/mkinstalldirs $(libdir) | ||
97 | - $(INSTALL_PROGRAM) $(LIB_TH_CXX) $(libdir) | ||
98 | + $(INSTALL) $(LIB_TH_CXX) $(libdir) | ||
99 | @SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library" | ||
100 | |||
101 | installcxxsl : $(LIB_CXX_SL) | ||
102 | - $(srcdir)/mkinstalldirs $(libdir) | ||
103 | - $(INSTALL_PROGRAM) $(LIB_CXX_SL) $(libdir) | ||
104 | + $(srcdir)/mkinstalldirs $(shlibdir) | ||
105 | + $(INSTALL) $(LIB_CXX_SL) $(shlibdir) | ||
106 | |||
107 | installcxx : $(INSTALL_CXX) | ||
108 | $(srcdir)/mkinstalldirs $(libdir) | ||
109 | - $(INSTALL_PROGRAM) $(LIB_CXX) $(libdir) | ||
110 | + $(INSTALL) $(LIB_CXX) $(libdir) | ||
111 | @TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" | ||
112 | @SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" | ||
113 | |||
114 | installsl : $(LIB_SL) | ||
115 | $(srcdir)/mkinstalldirs $(shlibdir) | ||
116 | - $(INSTALL_PROGRAM) $(LIB_SL) $(shlibdir) | ||
117 | + $(INSTALL) $(LIB_SL) $(shlibdir) | ||
118 | @CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" | ||
119 | @TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library" | ||
120 | |||
121 | installlib : $(INSTALL_LIB) | ||
122 | $(srcdir)/mkinstalldirs $(libdir) | ||
123 | - $(INSTALL_PROGRAM) $(LIBRARY) $(libdir) | ||
124 | + $(INSTALL) $(LIBRARY) $(libdir) | ||
125 | @RANLIB@ $(libdir)/$(LIBRARY) | ||
126 | @SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)" | ||
127 | @CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library" | ||
128 | @@ -255,10 +259,8 @@ shlib : $(BUILD_SL) | ||
129 | # NOTE: you may have to edit the configure.ac script to get this to | ||
130 | # work on your operating system. Please send feedback to the author | ||
131 | # via: http://256.com/gray/email.html | ||
132 | -$(LIB_SL) : $(LIBRARY) | ||
133 | - rm -f $@ $@.t | ||
134 | - @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS) | ||
135 | - mv $@.t $@ | ||
136 | +$(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
137 | + $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
138 | |||
139 | $(LIBRARY) : $(OBJS) $(NORMAL_OBJS) | ||
140 | ar cr $@ $? | ||
141 | @@ -268,32 +270,26 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS) | ||
142 | ar cr $@ $? | ||
143 | @RANLIB@ $@ | ||
144 | |||
145 | -$(LIB_TH_SL) : $(LIB_TH) | ||
146 | - rm -f $@ $@.t | ||
147 | - @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS) | ||
148 | - mv $@.t $@ | ||
149 | +$(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) | ||
150 | + $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) | ||
151 | |||
152 | $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) | ||
153 | ar cr $@ $? | ||
154 | @RANLIB@ $@ | ||
155 | |||
156 | -$(LIB_CXX_SL) : $(LIB_CXX) | ||
157 | - rm -f $@ $@.t | ||
158 | - @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) | ||
159 | - mv $@.t $@ | ||
160 | +$(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
161 | + $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
162 | |||
163 | $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) | ||
164 | ar cr $@ $? | ||
165 | @RANLIB@ $@ | ||
166 | |||
167 | -$(LIB_TH_CXX_SL) : $(LIB_TH_CXX) | ||
168 | - rm -f $@ $@.t | ||
169 | - @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) | ||
170 | - mv $@.t $@ | ||
171 | +$(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
172 | + $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
173 | |||
174 | -threadssl : $(LIB_TH_SL) | ||
175 | +threadssl : $(LIB_TH_SL)$(ver) | ||
176 | |||
177 | -threadscxxsl : $(LIB_TH_CXX_SL) | ||
178 | +threadscxxsl : $(LIB_TH_CXX_SL)$(ver) | ||
179 | |||
180 | threadscxx : $(BUILD_TH_CXX) | ||
181 | @SL_OFF@ @echo "Enter 'make threadscxxsl' to build the threaded C++ shared-library" | ||
182 | @@ -302,7 +298,7 @@ threads : $(BUILD_THREADS) | ||
183 | @CXX_OFF@ @echo "Enter 'make threadscxx' to build the threaded C++ library" | ||
184 | @SL_OFF@ @echo "Enter 'make threadssl' to build the threaded shared library" | ||
185 | |||
186 | -cxxsl : $(LIB_CXX_SL) | ||
187 | +cxxsl : $(LIB_CXX_SL)$(ver) | ||
188 | |||
189 | cxx : $(BUILD_CXX) | ||
190 | @SL_OFF@ @echo "Enter 'make cxxsl' to build the cxx shared library" | ||
191 | @@ -371,6 +367,11 @@ dmallocc.o : $(srcdir)/dmallocc.cc | ||
192 | $(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ | ||
193 | -o ./$@ | ||
194 | |||
195 | +dmallocc_sl.o : $(srcdir)/dmallocc.cc | ||
196 | + rm -f $@ | ||
197 | + $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ | ||
198 | + -o ./$@ | ||
199 | + | ||
200 | # | ||
201 | # auto configure settings - uncomment if you are doing configure | ||
202 | # development on the library | ||
203 | @@ -395,38 +396,109 @@ dmallocc.o : $(srcdir)/dmallocc.cc | ||
204 | |||
205 | arg_check.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \ | ||
206 | dmalloc_loc.h error.h arg_check.h | ||
207 | +arg_check_sl.o: arg_check.c conf.h settings.h dmalloc.h chunk.h debug_tok.h \ | ||
208 | + dmalloc_loc.h error.h arg_check.h | ||
209 | + rm -f $@ | ||
210 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
211 | chunk.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ | ||
212 | dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ | ||
213 | error_val.h heap.h | ||
214 | +chunk_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ | ||
215 | + dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ | ||
216 | + error_val.h heap.h | ||
217 | + rm -f $@ | ||
218 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
219 | compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h | ||
220 | +compat_sl.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h | ||
221 | + rm -f $@ | ||
222 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
223 | dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \ | ||
224 | debug_tok.h dmalloc_loc.h env.h error_val.h version.h | ||
225 | +dmalloc_sl.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \ | ||
226 | + debug_tok.h dmalloc_loc.h env.h error_val.h version.h | ||
227 | + rm -f $@ | ||
228 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
229 | dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \ | ||
230 | dmalloc_argv_loc.h compat.h | ||
231 | +dmalloc_argv_sl.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \ | ||
232 | + dmalloc_argv_loc.h compat.h | ||
233 | + rm -f $@ | ||
234 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
235 | dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ | ||
236 | dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h | ||
237 | +dmalloc_fc_t_sl.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ | ||
238 | + dmalloc_rand.h debug_tok.h dmalloc_loc.h error_val.h | ||
239 | + rm -f $@ | ||
240 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
241 | dmalloc_rand.o: dmalloc_rand.c dmalloc_rand.h | ||
242 | +dmalloc_rand_sl.o: dmalloc_rand.c dmalloc_rand.h | ||
243 | + rm -f $@ | ||
244 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
245 | dmalloc_t.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \ | ||
246 | dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \ | ||
247 | error_val.h heap.h | ||
248 | +dmalloc_t_sl.o: dmalloc_t.c conf.h settings.h compat.h dmalloc.h \ | ||
249 | + dmalloc_argv.h dmalloc_rand.h arg_check.h debug_tok.h dmalloc_loc.h \ | ||
250 | + error_val.h heap.h | ||
251 | + rm -f $@ | ||
252 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
253 | dmalloc_tab.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \ | ||
254 | dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h | ||
255 | +dmalloc_tab_sl.o: dmalloc_tab.c conf.h settings.h chunk.h compat.h dmalloc.h \ | ||
256 | + dmalloc_loc.h error.h error_val.h dmalloc_tab.h dmalloc_tab_loc.h | ||
257 | + rm -f $@ | ||
258 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
259 | env.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \ | ||
260 | debug_tok.h env.h error.h | ||
261 | +env_sl.o: env.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h \ | ||
262 | + debug_tok.h env.h error.h | ||
263 | + rm -f $@ | ||
264 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
265 | error.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
266 | dmalloc_loc.h env.h error.h error_val.h version.h | ||
267 | +error_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
268 | + dmalloc_loc.h env.h error.h error_val.h version.h | ||
269 | + rm -f $@ | ||
270 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
271 | heap.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
272 | dmalloc_loc.h error.h error_val.h heap.h | ||
273 | +heap_sl.o: heap.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
274 | + dmalloc_loc.h error.h error_val.h heap.h | ||
275 | + rm -f $@ | ||
276 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
277 | malloc.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ | ||
278 | debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ | ||
279 | malloc_funcs.h return.h | ||
280 | +malloc_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ | ||
281 | + debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ | ||
282 | + malloc_funcs.h return.h | ||
283 | + rm -f $@ | ||
284 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
285 | protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \ | ||
286 | heap.h protect.h | ||
287 | +protect_sl.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \ | ||
288 | + heap.h protect.h | ||
289 | + rm -f $@ | ||
290 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
291 | chunk_th.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ | ||
292 | dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ | ||
293 | error_val.h heap.h | ||
294 | +chunk_th_sl.o: chunk.c conf.h settings.h dmalloc.h chunk.h chunk_loc.h \ | ||
295 | + dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h error.h \ | ||
296 | + error_val.h heap.h | ||
297 | + rm -f $@ | ||
298 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
299 | error_th.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
300 | dmalloc_loc.h env.h error.h error_val.h version.h | ||
301 | +error_th_sl.o: error.c conf.h settings.h dmalloc.h chunk.h compat.h debug_tok.h \ | ||
302 | + dmalloc_loc.h env.h error.h error_val.h version.h | ||
303 | + rm -f $@ | ||
304 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
305 | malloc_th.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ | ||
306 | debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ | ||
307 | malloc_funcs.h return.h | ||
308 | +malloc_th_sl.o: malloc.c conf.h settings.h dmalloc.h chunk.h compat.h \ | ||
309 | + debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ | ||
310 | + malloc_funcs.h return.h | ||
311 | + rm -f $@ | ||
312 | + $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ | ||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch new file mode 100644 index 000000000..be0945257 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/03-threads.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | Description: Fix LOCK_THREADS in settings.dist | ||
2 | This patch takes into account that if --enable-threads is used, LOCK_THREADS | ||
3 | doesn't get updated | ||
4 | Author: Markus Stenberg <markus.stenberg@conformiq.com> | ||
5 | Author: Daniel Rus Morales <danirus@tol-project.org> | ||
6 | Bug-Debian: http://bugs.debian.org/276457 | ||
7 | |||
8 | --- dmalloc-5.5.1.orig/settings.dist 2007-03-25 21:16:43.000000000 +0200 | ||
9 | +++ dmalloc-5.5.1/settings.dist 2007-04-27 20:56:49.000000000 +0200 | ||
10 | @@ -409,7 +409,7 @@ | ||
11 | */ | ||
12 | |||
13 | #ifndef LOCK_THREADS | ||
14 | -#define LOCK_THREADS 0 | ||
15 | +#define LOCK_THREADS 1 | ||
16 | #endif | ||
17 | |||
18 | #if LOCK_THREADS | ||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch new file mode 100644 index 000000000..e1db69059 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/100-use-xtools.patch | |||
@@ -0,0 +1,109 @@ | |||
1 | This patch makes configure use the cross ld and ar rather than the native tools. | ||
2 | |||
3 | It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some | ||
4 | bits gathered from buildroot, which is LGPL v2.1 | ||
5 | License for dmalloc is: | ||
6 | * Permission to use, copy, modify, and distribute this software for | ||
7 | * any purpose and without fee is hereby granted, provided that the | ||
8 | * above copyright notice and this permission notice appear in all | ||
9 | * copies, and that the name of Gray Watson not be used in advertising | ||
10 | * or publicity pertaining to distribution of the document or software | ||
11 | * without specific, written prior permission. | ||
12 | * | ||
13 | * Gray Watson makes no representations about the suitability of the | ||
14 | * software described herein for any purpose. It is provided "as is" | ||
15 | * without express or implied warranty. | ||
16 | |||
17 | I personnaly believe that the resulting code should therefore be | ||
18 | LGPL v2.1, but don't believe me, ask your lawyers! | ||
19 | |||
20 | Index: dmalloc-5.5.2/configure.ac | ||
21 | =================================================================== | ||
22 | --- dmalloc-5.5.2.orig/configure.ac | ||
23 | +++ dmalloc-5.5.2/configure.ac | ||
24 | @@ -69,6 +69,15 @@ if test "$ac_cv_prog_cc_stdc" = "no" ; t | ||
25 | fi | ||
26 | AC_PROG_INSTALL | ||
27 | AC_PROG_RANLIB | ||
28 | +AN_MAKEVAR([AR], [AC_PROG_AR]) | ||
29 | +AN_PROGRAM([ar], [AC_PROG_AR]) | ||
30 | +AC_DEFUN([AC_PROG_AR], [AC_CHECK_TOOL(AR, ar, :)]) | ||
31 | +AC_PROG_AR | ||
32 | +AN_MAKEVAR([LD], [AC_PROG_LD]) | ||
33 | +AN_PROGRAM([ld], [AC_PROG_LD]) | ||
34 | +AC_DEFUN([AC_PROG_LD], [AC_CHECK_TOOL(LD, ld, :)]) | ||
35 | +AC_PROG_LD | ||
36 | + | ||
37 | AC_C_CONST | ||
38 | |||
39 | # we need this for various settings | ||
40 | @@ -131,14 +140,14 @@ AC_SUBST(shlibdir) | ||
41 | AC_MSG_CHECKING([shared library link args]) | ||
42 | AC_COMPILE_IFELSE([ int foo(int val) { return val + 1; } ],[ | ||
43 | # so now we try to create an archive from the compiled .o file | ||
44 | - (ar cr conftest.a conftest.o) 2>&5 | ||
45 | + (${ac_cv_prog_AR} cr conftest.a conftest.o) 2>&5 | ||
46 | # see which shared-library ld commands work | ||
47 | # | ||
48 | # Darwin/Mac OS X - Terry Teague | ||
49 | # username terry_teague at domain users.sourceforge.net | ||
50 | ac_cv_shared_lib_link_objs=no | ||
51 | if test `uname` = "Darwin"; then | ||
52 | - if (ld -dylib -o conftest.so.t -lc conftest.a) 2>&5; then | ||
53 | + if (${ac_cv_prog_LD} -dylib -o conftest.so.t -lc conftest.a) 2>&5; then | ||
54 | # By convention on some platforms | ||
55 | # libLLL.so, libLLL.X.so are symlinks to libLLL.X.Y.Z.so | ||
56 | # where X.Y.Z is version # (major.minor.increment) of the library | ||
57 | @@ -156,12 +165,12 @@ AC_COMPILE_IFELSE([ int foo(int val) { r | ||
58 | ac_cv_shared_link_args='# Could not configure shlib linking' | ||
59 | enable_shlib=no | ||
60 | fi | ||
61 | - elif (ld -shared --whole-archive -soname conftest.so -o conftest.so.t conftest.a) 2>&5; then | ||
62 | - ac_cv_shared_link_args='ld -shared --whole-archive -soname $@ -o $@.t' | ||
63 | - elif (ld -shared -o conftest.so.t -all -soname conftest.so.t -none -lc -all conftest.a) 2>&5; then | ||
64 | - ac_cv_shared_link_args='ld -shared -o $@.t -all -soname $@ -none -lc -all' | ||
65 | - elif (ld -G -o conftest.so.t conftest.a) 2>&5; then | ||
66 | - ac_cv_shared_link_args='ld -G -o $@.t' | ||
67 | + elif (${ac_cv_prog_LD} -shared --whole-archive -soname conftest.so -o conftest.so.t conftest.a) 2>&5; then | ||
68 | + ac_cv_shared_link_args='${CC} -Wl,-shared -Wl,--whole-archive -Wl,-soname,$@ -o $@.t -Wl,--no-whole-archive' | ||
69 | + elif (${ac_cv_prog_LD} -shared -o conftest.so.t -all -soname conftest.so.t -none -lc -all conftest.a) 2>&5; then | ||
70 | + ac_cv_shared_link_args='${CC} -Wl,-shared -o $@.t -Wl,-all -Wl,-soname,$@ -Wl,-none -lc -Wl,-all' | ||
71 | + elif (${ac_cv_prog_LD} -G -o conftest.so.t conftest.a) 2>&5; then | ||
72 | + ac_cv_shared_link_args='${CC} -Wl,-G -o $@.t' | ||
73 | else | ||
74 | # oh well, toss an error | ||
75 | ac_cv_shared_link_args='# Could not configure shlib linking' | ||
76 | Index: dmalloc-5.5.2/Makefile.in | ||
77 | =================================================================== | ||
78 | --- dmalloc-5.5.2.orig/Makefile.in | ||
79 | +++ dmalloc-5.5.2/Makefile.in | ||
80 | @@ -263,25 +263,25 @@ $(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
81 | $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
82 | |||
83 | $(LIBRARY) : $(OBJS) $(NORMAL_OBJS) | ||
84 | - ar cr $@ $? | ||
85 | + @AR@ cr $@ $? | ||
86 | @RANLIB@ $@ | ||
87 | |||
88 | $(LIB_TH) : $(OBJS) $(THREAD_OBJS) | ||
89 | - ar cr $@ $? | ||
90 | + @AR@ cr $@ $? | ||
91 | @RANLIB@ $@ | ||
92 | |||
93 | $(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) | ||
94 | $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) | ||
95 | |||
96 | $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) | ||
97 | - ar cr $@ $? | ||
98 | + @AR@ cr $@ $? | ||
99 | @RANLIB@ $@ | ||
100 | |||
101 | $(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
102 | $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
103 | |||
104 | $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) | ||
105 | - ar cr $@ $? | ||
106 | + @AR@ cr $@ $? | ||
107 | @RANLIB@ $@ | ||
108 | |||
109 | $(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch new file mode 100644 index 000000000..2581e5488 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/13-fix-ldflags-in-makefile.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | Index: dmalloc-5.5.2/Makefile.in | ||
2 | =================================================================== | ||
3 | --- dmalloc-5.5.2.orig/Makefile.in | ||
4 | +++ dmalloc-5.5.2/Makefile.in | ||
5 | @@ -260,7 +260,7 @@ shlib : $(BUILD_SL) | ||
6 | # work on your operating system. Please send feedback to the author | ||
7 | # via: http://256.com/gray/email.html | ||
8 | $(LIB_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
9 | - $(CC) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
10 | + $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloc.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) | ||
11 | |||
12 | $(LIBRARY) : $(OBJS) $(NORMAL_OBJS) | ||
13 | ar cr $@ $? | ||
14 | @@ -271,21 +271,21 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS) | ||
15 | @RANLIB@ $@ | ||
16 | |||
17 | $(LIB_TH_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) | ||
18 | - $(CC) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) | ||
19 | + $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmallocth.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) | ||
20 | |||
21 | $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) | ||
22 | ar cr $@ $? | ||
23 | @RANLIB@ $@ | ||
24 | |||
25 | $(LIB_CXX_SL) : $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
26 | - $(CC) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
27 | + $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmalloccxx.so.5 -o $@ $(OBJS_SL) $(NORMAL_OBJS_SL) $(CXX_OBJS_SL) | ||
28 | |||
29 | $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) | ||
30 | ar cr $@ $? | ||
31 | @RANLIB@ $@ | ||
32 | |||
33 | $(LIB_TH_CXX_SL) : $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
34 | - $(CC) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
35 | + $(CC) $(LDFLAGS) -shared -Wl,-soname,libdmallocthcxx.so.5 -o $@ $(OBJS_SL) $(THREAD_OBJS_SL) $(CXX_OBJS_SL) | ||
36 | |||
37 | threadssl : $(LIB_TH_SL)$(ver) | ||
38 | |||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch new file mode 100644 index 000000000..935ac983a --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/130-mips.patch | |||
@@ -0,0 +1,90 @@ | |||
1 | Patch to correctly handle the MIPS case. | ||
2 | |||
3 | It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some | ||
4 | bits gathered from buildroot, which is LGPL v2.1 | ||
5 | License for dmalloc is: | ||
6 | * Permission to use, copy, modify, and distribute this software for | ||
7 | * any purpose and without fee is hereby granted, provided that the | ||
8 | * above copyright notice and this permission notice appear in all | ||
9 | * copies, and that the name of Gray Watson not be used in advertising | ||
10 | * or publicity pertaining to distribution of the document or software | ||
11 | * without specific, written prior permission. | ||
12 | * | ||
13 | * Gray Watson makes no representations about the suitability of the | ||
14 | * software described herein for any purpose. It is provided "as is" | ||
15 | * without express or implied warranty. | ||
16 | |||
17 | I personnaly believe that the resulting code should therefore be | ||
18 | LGPL v2.1, but don't believe me, ask your lawyers! | ||
19 | |||
20 | Index: dmalloc-5.5.2/return.h | ||
21 | =================================================================== | ||
22 | --- dmalloc-5.5.2.orig/return.h | ||
23 | +++ dmalloc-5.5.2/return.h | ||
24 | @@ -106,26 +106,16 @@ | ||
25 | /*************************************/ | ||
26 | |||
27 | /* | ||
28 | - * For DEC Mips machines running Ultrix | ||
29 | + * For Mips machines running Linux | ||
30 | */ | ||
31 | #if __mips | ||
32 | |||
33 | /* | ||
34 | - * I have no idea how to get inline assembly with the default cc. | ||
35 | - * Anyone know how? | ||
36 | - */ | ||
37 | - | ||
38 | -#if 0 | ||
39 | - | ||
40 | -/* | ||
41 | * NOTE: we assume here that file is global. | ||
42 | * | ||
43 | - * $31 is the frame pointer. $2 looks to be the return address but maybe | ||
44 | - * not consistently. | ||
45 | + * $31 is the return address. | ||
46 | */ | ||
47 | -#define GET_RET_ADDR(file) asm("sw $2, file") | ||
48 | - | ||
49 | -#endif | ||
50 | +#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file)) | ||
51 | |||
52 | #endif /* __mips */ | ||
53 | |||
54 | Index: dmalloc-5.5.2/configure.ac | ||
55 | =================================================================== | ||
56 | --- dmalloc-5.5.2.orig/configure.ac | ||
57 | +++ dmalloc-5.5.2/configure.ac | ||
58 | @@ -585,31 +585,7 @@ int main() { return 1; } | ||
59 | # check if the return.h macros work | ||
60 | # | ||
61 | AC_MSG_CHECKING([return.h macros work]) | ||
62 | -AC_RUN_IFELSE([ | ||
63 | - | ||
64 | -#define __CONF_H__ | ||
65 | -#define USE_RETURN_MACROS 1 | ||
66 | -#define RETURN_MACROS_WORK 1 | ||
67 | - | ||
68 | -#include "return.h" | ||
69 | - | ||
70 | -static void foo (void) | ||
71 | -{ | ||
72 | - char *ret_addr; | ||
73 | - GET_RET_ADDR(ret_addr); | ||
74 | -} | ||
75 | - | ||
76 | -main() | ||
77 | -{ | ||
78 | - foo(); | ||
79 | - exit(0); | ||
80 | -} | ||
81 | -], | ||
82 | -[ AC_DEFINE(RETURN_MACROS_WORK, 1) AC_MSG_RESULT([yes]) ], | ||
83 | -[ AC_DEFINE(RETURN_MACROS_WORK, 0) AC_MSG_RESULT([no]) ], | ||
84 | -[ AC_DEFINE(RETURN_MACROS_WORK, 0) AC_MSG_RESULT([no]) ] | ||
85 | -) | ||
86 | - | ||
87 | +AC_DEFINE(RETURN_MACROS_WORK, 1) | ||
88 | ############################################################################## | ||
89 | |||
90 | # | ||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch new file mode 100644 index 000000000..7edd46412 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/150-use_DESTDIR.patch | |||
@@ -0,0 +1,104 @@ | |||
1 | Make install rules use DESTDIR. | ||
2 | Split installation of the utilitity from the global install. | ||
3 | |||
4 | Copyright 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr> | ||
5 | Licensed to you as dmalloc-5.5.2 is. | ||
6 | |||
7 | Index: dmalloc-5.5.2/Makefile.in | ||
8 | =================================================================== | ||
9 | --- dmalloc-5.5.2.orig/Makefile.in | ||
10 | +++ dmalloc-5.5.2/Makefile.in | ||
11 | @@ -178,66 +178,66 @@ distclean : clean | ||
12 | # rm -f configure | ||
13 | |||
14 | installdirs : | ||
15 | - $(srcdir)/mkinstalldirs $(includedir) $(libdir) $(bindir) | ||
16 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(includedir) $(DESTDIR)/$(libdir) $(DESTDIR)/$(bindir) | ||
17 | |||
18 | installincs : $(HFLS) | ||
19 | - $(srcdir)/mkinstalldirs $(includedir) | ||
20 | - $(INSTALL_DATA) $(HFLS) $(includedir) | ||
21 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(includedir) | ||
22 | + $(INSTALL_DATA) $(HFLS) $(DESTDIR)/$(includedir) | ||
23 | |||
24 | installthsl : $(LIB_TH_SL) | ||
25 | - $(srcdir)/mkinstalldirs $(shlibdir) | ||
26 | - $(INSTALL) $(LIB_TH_SL) $(shlibdir) | ||
27 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir) | ||
28 | + $(INSTALL) $(LIB_TH_SL) $(DESTDIR)/$(shlibdir) | ||
29 | |||
30 | installth : $(INSTALL_THREADS) | ||
31 | - $(srcdir)/mkinstalldirs $(libdir) | ||
32 | - $(INSTALL) $(LIB_TH) $(libdir) | ||
33 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir) | ||
34 | + $(INSTALL) $(LIB_TH) $(DESTDIR)/$(libdir) | ||
35 | @CXX_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" | ||
36 | @SL_OFF@ @echo "Enter 'make installthsl' to install the threaded shared-library" | ||
37 | |||
38 | installthcxxsl : $(LIB_TH_CXX_SL) | ||
39 | - $(srcdir)/mkinstalldirs $(shlibdir) | ||
40 | - $(INSTALL) $(LIB_TH_CXX_SL) $(shlibdir) | ||
41 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir) | ||
42 | + $(INSTALL) $(LIB_TH_CXX_SL) $(DESTDIR)/$(shlibdir) | ||
43 | |||
44 | installthcxx : $(INSTALL_TH_CXX) | ||
45 | - $(srcdir)/mkinstalldirs $(libdir) | ||
46 | - $(INSTALL) $(LIB_TH_CXX) $(libdir) | ||
47 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir) | ||
48 | + $(INSTALL) $(LIB_TH_CXX) $(DESTDIR)/$(libdir) | ||
49 | @SL_OFF@ @echo "Enter 'make installthcxxsl' to install the threaded C++ shared-library" | ||
50 | |||
51 | installcxxsl : $(LIB_CXX_SL) | ||
52 | - $(srcdir)/mkinstalldirs $(shlibdir) | ||
53 | - $(INSTALL) $(LIB_CXX_SL) $(shlibdir) | ||
54 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir) | ||
55 | + $(INSTALL) $(LIB_CXX_SL) $(DESTDIR)/$(shlibdir) | ||
56 | |||
57 | installcxx : $(INSTALL_CXX) | ||
58 | - $(srcdir)/mkinstalldirs $(libdir) | ||
59 | - $(INSTALL) $(LIB_CXX) $(libdir) | ||
60 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir) | ||
61 | + $(INSTALL) $(LIB_CXX) $(DESTDIR)/$(libdir) | ||
62 | @TH_OFF@ @echo "Enter 'make installthcxx' to install the threaded C++ library" | ||
63 | @SL_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" | ||
64 | |||
65 | installsl : $(LIB_SL) | ||
66 | - $(srcdir)/mkinstalldirs $(shlibdir) | ||
67 | - $(INSTALL) $(LIB_SL) $(shlibdir) | ||
68 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(shlibdir) | ||
69 | + $(INSTALL) $(LIB_SL) $(DESTDIR)/$(shlibdir) | ||
70 | @CXX_OFF@ @echo "Enter 'make installcxxsl' to install the C++ shared-library" | ||
71 | @TH_OFF@ @echo "Enter 'make installthsl' to install thread shared-library" | ||
72 | |||
73 | installlib : $(INSTALL_LIB) | ||
74 | - $(srcdir)/mkinstalldirs $(libdir) | ||
75 | - $(INSTALL) $(LIBRARY) $(libdir) | ||
76 | - @RANLIB@ $(libdir)/$(LIBRARY) | ||
77 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(libdir) | ||
78 | + $(INSTALL) $(LIBRARY) $(DESTDIR)/$(libdir) | ||
79 | + @RANLIB@ $(DESTDIR)/$(libdir)/$(LIBRARY) | ||
80 | @SL_OFF@ @echo "Enter 'make installsl' to install $(LIB_SL) in $(shlibdir)" | ||
81 | @CXX_OFF@ @echo "Enter 'make installcxx' to install the C++ library" | ||
82 | @TH_OFF@ @echo "Enter 'make installth' to install thread library" | ||
83 | |||
84 | installdocs : $(srcdir)/docs/$(HTMLFILE) $(srcdir)/docs/$(TEXIFILE) \ | ||
85 | $(srcdir)/docs/$(PDFFILE) | ||
86 | - $(srcdir)/mkinstalldirs $(docdir) | ||
87 | - $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(docdir) | ||
88 | - $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(docdir) | ||
89 | - $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(docdir) | ||
90 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(docdir) | ||
91 | + $(INSTALL_DATA) $(srcdir)/docs/$(HTMLFILE) $(DESTDIR)/$(docdir) | ||
92 | + $(INSTALL_DATA) $(srcdir)/docs/$(TEXIFILE) $(DESTDIR)/$(docdir) | ||
93 | + $(INSTALL_DATA) $(srcdir)/docs/$(PDFFILE) $(DESTDIR)/$(docdir) | ||
94 | |||
95 | install : installincs installlib $(UTIL) | ||
96 | - $(srcdir)/mkinstalldirs $(bindir) | ||
97 | - $(INSTALL_PROGRAM) $(UTIL) $(bindir) | ||
98 | - @echo "Enter 'make installdocs' to install $(DOCFILES) in $(docdir)" | ||
99 | + $(srcdir)/mkinstalldirs $(DESTDIR)/$(bindir) | ||
100 | + $(INSTALL_PROGRAM) $(UTIL) $(DESTDIR)/$(bindir) | ||
101 | + @echo "Enter 'make installdocs' to install $(DOCFILES) in $(DESTDIR)/$(docdir)" | ||
102 | |||
103 | dmalloc.h.2 : $(srcdir)/configure | ||
104 | $(SHELL) $(srcdir)/configure | ||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch b/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch new file mode 100644 index 000000000..a5bd73661 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc/configure-pagesize-HACK.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | We cant run tests during cross compile therefore pin to 4k pages | ||
2 | |||
3 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
4 | |||
5 | Index: dmalloc-5.5.2/configure.ac | ||
6 | =================================================================== | ||
7 | --- dmalloc-5.5.2.orig/configure.ac | ||
8 | +++ dmalloc-5.5.2/configure.ac | ||
9 | @@ -348,26 +348,8 @@ AC_MSG_RESULT([$ac_cv_use_mmap]) | ||
10 | # | ||
11 | AC_CHECK_FUNCS(getpagesize) | ||
12 | AC_MSG_CHECKING([basic-block size]) | ||
13 | -ac_cv_page_size=0 | ||
14 | -if test $ac_cv_page_size = 0; then | ||
15 | - AC_RUN_IFELSE([main() { if (getpagesize()<=2048) exit(0); else exit(1); }], | ||
16 | - [ ac_cv_page_size=11 ] ) | ||
17 | -fi | ||
18 | -if test $ac_cv_page_size = 0; then | ||
19 | - AC_RUN_IFELSE([main() { if (getpagesize()<=4096) exit(0); else exit(1); }], | ||
20 | - [ ac_cv_page_size=12 ] ) | ||
21 | -fi | ||
22 | -if test $ac_cv_page_size = 0; then | ||
23 | - AC_RUN_IFELSE([main() { if (getpagesize()<=8192) exit(0); else exit(1); }], | ||
24 | - [ ac_cv_page_size=13 ] ) | ||
25 | -fi | ||
26 | -if test $ac_cv_page_size = 0; then | ||
27 | - AC_RUN_IFELSE([main() { if (getpagesize()<=16384) exit(0); else exit(1); }], | ||
28 | - [ ac_cv_page_size=14 ] ) | ||
29 | -fi | ||
30 | -if test $ac_cv_page_size = 0; then | ||
31 | - ac_cv_page_size=15 | ||
32 | -fi | ||
33 | +# fix to 4K for now | ||
34 | +ac_cv_page_size=12 | ||
35 | AC_DEFINE_UNQUOTED([BASIC_BLOCK],[$ac_cv_page_size]) | ||
36 | AC_MSG_RESULT([$ac_cv_page_size]) | ||
37 | |||
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb b/meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb new file mode 100644 index 000000000..2f0d8a340 --- /dev/null +++ b/meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | # Copyright (C) 2016 Khem Raj <raj.khem@gmail.com> | ||
2 | # Released under the MIT license (see COPYING.MIT for the terms) | ||
3 | |||
4 | SUMMARY = "Debug Malloc Library" | ||
5 | |||
6 | DESCRIPTION = "The debug memory allocation or dmalloc library has been \ | ||
7 | designed as a drop in replacement for the system's malloc, realloc, \ | ||
8 | calloc, free and other memory management routines while providing \ | ||
9 | powerful debugging facilities configurable at runtime. These facilities \ | ||
10 | include such things as memory-leak tracking, fence-post write detection, \ | ||
11 | file/line number reporting, and general logging of statistics." | ||
12 | |||
13 | HOMEPAGE = "http://dmalloc.com/" | ||
14 | LICENSE = "CC-BY-SA-3.0" | ||
15 | |||
16 | LIC_FILES_CHKSUM = "file://dmalloc.c;beginline=4;endline=17;md5=83d13664f87f1f1a3b6b2b6f6eba85aa" | ||
17 | |||
18 | SECTION = "libs" | ||
19 | |||
20 | SRC_URI = "http://dmalloc.com/releases/dmalloc-${PV}.tgz \ | ||
21 | file://02-Makefile.in.patch \ | ||
22 | file://03-threads.patch \ | ||
23 | file://13-fix-ldflags-in-makefile.patch \ | ||
24 | file://configure-pagesize-HACK.patch \ | ||
25 | file://100-use-xtools.patch \ | ||
26 | file://130-mips.patch \ | ||
27 | file://150-use_DESTDIR.patch \ | ||
28 | file://0001-undefined-strdup-macro.patch \ | ||
29 | " | ||
30 | |||
31 | SRC_URI[md5sum] = "f92e5606c23a8092f3d5694e8d1c932e" | ||
32 | SRC_URI[sha256sum] = "d3be5c6eec24950cb3bd67dbfbcdf036f1278fae5fd78655ef8cdf9e911e428a" | ||
33 | |||
34 | ARM_INSTRUCTION_SET = "arm" | ||
35 | |||
36 | inherit autotools | ||
37 | |||
38 | EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader" | ||
39 | EXTRA_OECONF += "--enable-threads --enable-cxx --enable-shlib" | ||