summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-24 12:38:42 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-24 12:38:42 +0000
commit46454ac2a8a7d693ac135f0d4a9461bbcf24eea9 (patch)
tree86488784b36537f382ccd448c6684d60f1540527
parent20de4c55a2ddfa802a01cc353884d73a934bf7ba (diff)
downloadrockbox-46454ac2a8a7d693ac135f0d4a9461bbcf24eea9.tar.gz
rockbox-46454ac2a8a7d693ac135f0d4a9461bbcf24eea9.zip
Move setjmp to lib and add setjmp for sh (imported from newlib) and compile it as separate library.
It's used by both, plugins and codecs, and sh/hwcodec doesn't compile codecs so it doesn't fit into sources. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27869 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/codecs.make2
-rw-r--r--apps/codecs/lib/SOURCES9
-rw-r--r--apps/plugins/lib/SOURCES16
-rw-r--r--apps/plugins/lib/pluginlib_exit.h4
-rw-r--r--apps/plugins/lua/rockconf.h4
-rw-r--r--apps/plugins/plugins.make2
-rw-r--r--lib/libsetjmp/LICENSE830
-rw-r--r--lib/libsetjmp/SOURCES19
-rw-r--r--lib/libsetjmp/arm/setjmp.S (renamed from apps/codecs/lib/setjmp_arm.S)0
-rw-r--r--lib/libsetjmp/libsetjmp.make21
-rw-r--r--lib/libsetjmp/m68k/setjmp.S (renamed from apps/codecs/lib/setjmp_cf.S)0
-rw-r--r--lib/libsetjmp/mips/setjmp.S (renamed from apps/codecs/lib/setjmp_mips.S)0
-rw-r--r--lib/libsetjmp/setjmp.h (renamed from apps/codecs/lib/setjmp.h)7
-rw-r--r--lib/libsetjmp/sh/asm.h42
-rw-r--r--lib/libsetjmp/sh/setjmp.S194
-rw-r--r--tools/root.make6
16 files changed, 1118 insertions, 38 deletions
diff --git a/apps/codecs/codecs.make b/apps/codecs/codecs.make
index 4ca54ce36e..30fea9969e 100644
--- a/apps/codecs/codecs.make
+++ b/apps/codecs/codecs.make
@@ -126,7 +126,7 @@ $(CODECDIR)/%-pre.map: $(CODEC_CRT0) $(CODECLINK_LDS) $(CODECDIR)/%.o $(CODECLIB
126 $(CODECLIB) \ 126 $(CODECLIB) \
127 -lgcc $(subst .map,-pre.map,$(CODECLDFLAGS)) 127 -lgcc $(subst .map,-pre.map,$(CODECLDFLAGS))
128 128
129$(CODECDIR)/%.codec: $(CODECDIR)/%.o 129$(CODECDIR)/%.codec: $(CODECDIR)/%.o $(LIBSETJMP)
130 $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \ 130 $(call PRINTS,LD $(@F))$(CC) $(CODECFLAGS) -o $(CODECDIR)/$*.elf \
131 $(filter %.o, $^) \ 131 $(filter %.o, $^) \
132 $(filter %.a, $+) \ 132 $(filter %.a, $+) \
diff --git a/apps/codecs/lib/SOURCES b/apps/codecs/lib/SOURCES
index f9b2447efe..cef214a3ab 100644
--- a/apps/codecs/lib/SOURCES
+++ b/apps/codecs/lib/SOURCES
@@ -13,18 +13,9 @@ mdct.c
13 13
14#ifdef CPU_ARM 14#ifdef CPU_ARM
15mdct_arm.S 15mdct_arm.S
16setjmp_arm.S
17../../../firmware/target/arm/support-arm.S 16../../../firmware/target/arm/support-arm.S
18#endif 17#endif
19 18
20#ifdef CPU_COLDFIRE
21setjmp_cf.S
22#endif
23
24#ifdef CPU_MIPS
25setjmp_mips.S
26#endif
27
28#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__) 19#elif (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
29osx.dummy.c 20osx.dummy.c
30#endif 21#endif
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES
index fa12f94730..1db9896065 100644
--- a/apps/plugins/lib/SOURCES
+++ b/apps/plugins/lib/SOURCES
@@ -75,19 +75,3 @@ pluginlib_albumart.c
75#ifdef HAVE_TOUCHSCREEN 75#ifdef HAVE_TOUCHSCREEN
76pluginlib_touchscreen.c 76pluginlib_touchscreen.c
77#endif 77#endif
78
79#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
80
81#ifdef CPU_ARM
82../../codecs/lib/setjmp_arm.S
83#endif
84
85#ifdef CPU_COLDFIRE
86../../codecs/lib/setjmp_cf.S
87#endif
88
89#ifdef CPU_MIPS
90../../codecs/lib/setjmp_mips.S
91#endif
92
93#endif /* PLATFORM_NATIVE */
diff --git a/apps/plugins/lib/pluginlib_exit.h b/apps/plugins/lib/pluginlib_exit.h
index 00cbc8dc7f..8c7f0c437f 100644
--- a/apps/plugins/lib/pluginlib_exit.h
+++ b/apps/plugins/lib/pluginlib_exit.h
@@ -23,11 +23,7 @@
23#define __PLUGINLIB_EXIT_H__ 23#define __PLUGINLIB_EXIT_H__
24 24
25#include "config.h" 25#include "config.h"
26#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
27#include "../../codecs/lib/setjmp.h"
28#else
29#include <setjmp.h> 26#include <setjmp.h>
30#endif
31 27
32#define _PLUGINLIB_EXIT_INIT(atexit) switch(setjmp(__exit_env)) \ 28#define _PLUGINLIB_EXIT_INIT(atexit) switch(setjmp(__exit_env)) \
33 { \ 29 { \
diff --git a/apps/plugins/lua/rockconf.h b/apps/plugins/lua/rockconf.h
index dd7f98f1d7..c0a233135a 100644
--- a/apps/plugins/lua/rockconf.h
+++ b/apps/plugins/lua/rockconf.h
@@ -31,11 +31,7 @@
31#undef LUA_PATH_DEFAULT 31#undef LUA_PATH_DEFAULT
32#define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;" 32#define LUA_PATH_DEFAULT "$/?.lua;" "$/?/init.lua;" VIEWERS_DIR"/lua/?.lua;" VIEWERS_DIR"/lua/?/init.lua;"
33 33
34#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
35#include "../../codecs/lib/setjmp.h"
36#else
37#include <setjmp.h> 34#include <setjmp.h>
38#endif
39 35
40#include "lib/pluginlib_exit.h" 36#include "lib/pluginlib_exit.h"
41 37
diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index d3c66c34ca..532dba68c0 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -89,7 +89,7 @@ else
89endif 89endif
90PLUGINLDFLAGS += $(GLOBAL_LDOPTS) 90PLUGINLDFLAGS += $(GLOBAL_LDOPTS)
91 91
92$(BUILDDIR)/%.rock: 92$(BUILDDIR)/%.rock: $(LIBSETJMP)
93 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \ 93 $(call PRINTS,LD $(@F))$(CC) $(PLUGINFLAGS) -o $(BUILDDIR)/$*.elf \
94 $(filter %.o, $^) \ 94 $(filter %.o, $^) \
95 $(filter %.a, $+) \ 95 $(filter %.a, $+) \
diff --git a/lib/libsetjmp/LICENSE b/lib/libsetjmp/LICENSE
new file mode 100644
index 0000000000..cf903b5062
--- /dev/null
+++ b/lib/libsetjmp/LICENSE
@@ -0,0 +1,830 @@
1The newlib subdirectory is a collection of software from several sources.
2
3Each file may have its own copyright/license that is embedded in the source
4file. Unless otherwise noted in the body of the source file(s), the following copyright
5notices will apply to the contents of the newlib subdirectory:
6
7(1) Red Hat Incorporated
8
9Copyright (c) 1994-2009 Red Hat, Inc. All rights reserved.
10
11This copyrighted material is made available to anyone wishing to use,
12modify, copy, or redistribute it subject to the terms and conditions
13of the BSD License. This program is distributed in the hope that
14it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
15including the implied warranties of MERCHANTABILITY or FITNESS FOR
16A PARTICULAR PURPOSE. A copy of this license is available at
17http://www.opensource.org/licenses. Any Red Hat trademarks that are
18incorporated in the source code or documentation are not subject to
19the BSD License and may only be used or replicated with the express
20permission of Red Hat, Inc.
21
22(2) University of California, Berkeley
23
24Copyright (c) 1981-2000 The Regents of the University of California.
25All rights reserved.
26
27Redistribution and use in source and binary forms, with or without modification,
28are permitted provided that the following conditions are met:
29
30 * Redistributions of source code must retain the above copyright notice,
31 this list of conditions and the following disclaimer.
32 * Redistributions in binary form must reproduce the above copyright notice,
33 this list of conditions and the following disclaimer in the documentation
34 and/or other materials provided with the distribution.
35 * Neither the name of the University nor the names of its contributors
36 may be used to endorse or promote products derived from this software
37 without specific prior written permission.
38
39THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
40AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
41WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
42IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
43INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
45PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
46WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
48OF SUCH DAMAGE.
49
50(3) David M. Gay (AT&T 1991, Lucent 1998)
51
52The author of this software is David M. Gay.
53
54Copyright (c) 1991 by AT&T.
55
56Permission to use, copy, modify, and distribute this software for any
57purpose without fee is hereby granted, provided that this entire notice
58is included in all copies of any software which is or includes a copy
59or modification of this software and in all copies of the supporting
60documentation for such software.
61
62THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
63WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR AT&T MAKES ANY
64REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
65OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
66
67-------------------------------------------------------------------
68
69The author of this software is David M. Gay.
70
71Copyright (C) 1998-2001 by Lucent Technologies
72All Rights Reserved
73
74Permission to use, copy, modify, and distribute this software and
75its documentation for any purpose and without fee is hereby
76granted, provided that the above copyright notice appear in all
77copies and that both that the copyright notice and this
78permission notice and warranty disclaimer appear in supporting
79documentation, and that the name of Lucent or any of its entities
80not be used in advertising or publicity pertaining to
81distribution of the software without specific, written prior
82permission.
83
84LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
85INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
86IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY
87SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
88WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
89IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
90ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
91THIS SOFTWARE.
92
93
94(4) Advanced Micro Devices
95
96Copyright 1989, 1990 Advanced Micro Devices, Inc.
97
98This software is the property of Advanced Micro Devices, Inc (AMD) which
99specifically grants the user the right to modify, use and distribute this
100software provided this notice is not removed or altered. All other rights
101are reserved by AMD.
102
103AMD MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS
104SOFTWARE. IN NO EVENT SHALL AMD BE LIABLE FOR INCIDENTAL OR CONSEQUENTIAL
105DAMAGES IN CONNECTION WITH OR ARISING FROM THE FURNISHING, PERFORMANCE, OR
106USE OF THIS SOFTWARE.
107
108So that all may benefit from your experience, please report any problems
109or suggestions about this software to the 29K Technical Support Center at
110800-29-29-AMD (800-292-9263) in the USA, or 0800-89-1131 in the UK, or
1110031-11-1129 in Japan, toll free. The direct dial number is 512-462-4118.
112
113Advanced Micro Devices, Inc.
11429K Support Products
115Mail Stop 573
1165900 E. Ben White Blvd.
117Austin, TX 78741
118800-292-9263
119
120(5) C.W. Sandmann
121
122Copyright (C) 1993 C.W. Sandmann
123
124This file may be freely distributed as long as the author's name remains.
125
126(6) Eric Backus
127
128(C) Copyright 1992 Eric Backus
129
130This software may be used freely so long as this copyright notice is
131left intact. There is no warrantee on this software.
132
133(7) Sun Microsystems
134
135Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
136
137Developed at SunPro, a Sun Microsystems, Inc. business.
138Permission to use, copy, modify, and distribute this
139software is freely granted, provided that this notice is preserved.
140
141(8) Hewlett Packard
142
143(c) Copyright 1986 HEWLETT-PACKARD COMPANY
144
145To anyone who acknowledges that this file is provided "AS IS"
146without any express or implied warranty:
147 permission to use, copy, modify, and distribute this file
148for any purpose is hereby granted without fee, provided that
149the above copyright notice and this notice appears in all
150copies, and that the name of Hewlett-Packard Company not be
151used in advertising or publicity pertaining to distribution
152of the software without specific, written prior permission.
153Hewlett-Packard Company makes no representations about the
154suitability of this software for any purpose.
155
156(9) Hans-Peter Nilsson
157
158Copyright (C) 2001 Hans-Peter Nilsson
159
160Permission to use, copy, modify, and distribute this software is
161freely granted, provided that the above copyright notice, this notice
162and the following disclaimer are preserved with no changes.
163
164THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
165IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
166WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
167PURPOSE.
168
169(10) Stephane Carrez (m68hc11-elf/m68hc12-elf targets only)
170
171Copyright (C) 1999, 2000, 2001, 2002 Stephane Carrez (stcarrez@nerim.fr)
172
173The authors hereby grant permission to use, copy, modify, distribute,
174and license this software and its documentation for any purpose, provided
175that existing copyright notices are retained in all copies and that this
176notice is included verbatim in any distributions. No written agreement,
177license, or royalty fee is required for any of the authorized uses.
178Modifications to this software may be copyrighted by their authors
179and need not follow the licensing terms described here, provided that
180the new terms are clearly indicated on the first page of each file where
181they apply.
182
183(11) Christopher G. Demetriou
184
185Copyright (c) 2001 Christopher G. Demetriou
186All rights reserved.
187
188Redistribution and use in source and binary forms, with or without
189modification, are permitted provided that the following conditions
190are met:
1911. Redistributions of source code must retain the above copyright
192 notice, this list of conditions and the following disclaimer.
1932. Redistributions in binary form must reproduce the above copyright
194 notice, this list of conditions and the following disclaimer in the
195 documentation and/or other materials provided with the distribution.
1963. The name of the author may not be used to endorse or promote products
197 derived from this software without specific prior written permission.
198
199THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
200IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
201OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
202IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
203INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
204NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
205DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
206THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
207(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
208THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
209
210(12) SuperH, Inc.
211
212Copyright 2002 SuperH, Inc. All rights reserved
213
214This software is the property of SuperH, Inc (SuperH) which specifically
215grants the user the right to modify, use and distribute this software
216provided this notice is not removed or altered. All other rights are
217reserved by SuperH.
218
219SUPERH MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO
220THIS SOFTWARE. IN NO EVENT SHALL SUPERH BE LIABLE FOR INDIRECT, SPECIAL,
221INCIDENTAL OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING FROM
222THE FURNISHING, PERFORMANCE, OR USE OF THIS SOFTWARE.
223
224So that all may benefit from your experience, please report any problems
225or suggestions about this software to the SuperH Support Center via
226e-mail at softwaresupport@superh.com .
227
228SuperH, Inc.
229405 River Oaks Parkway
230San Jose
231CA 95134
232USA
233
234(13) Royal Institute of Technology
235
236Copyright (c) 1999 Kungliga Tekniska Högskolan
237(Royal Institute of Technology, Stockholm, Sweden).
238All rights reserved.
239
240Redistribution and use in source and binary forms, with or without
241modification, are permitted provided that the following conditions
242are met:
243
2441. Redistributions of source code must retain the above copyright
245 notice, this list of conditions and the following disclaimer.
246
2472. Redistributions in binary form must reproduce the above copyright
248 notice, this list of conditions and the following disclaimer in the
249 documentation and/or other materials provided with the distribution.
250
2513. Neither the name of KTH nor the names of its contributors may be
252 used to endorse or promote products derived from this software without
253 specific prior written permission.
254
255THIS SOFTWARE IS PROVIDED BY KTH AND ITS CONTRIBUTORS ``AS IS'' AND ANY
256EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
257IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
258PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KTH OR ITS CONTRIBUTORS BE
259LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
260CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
261SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
262BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
263WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
264OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
265ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
266
267(14) Alexey Zelkin
268
269Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
270All rights reserved.
271
272Redistribution and use in source and binary forms, with or without
273modification, are permitted provided that the following conditions
274are met:
2751. Redistributions of source code must retain the above copyright
276 notice, this list of conditions and the following disclaimer.
2772. Redistributions in binary form must reproduce the above copyright
278 notice, this list of conditions and the following disclaimer in the
279 documentation and/or other materials provided with the distribution.
280
281THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
282ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
283IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
284ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
285FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
286DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
287OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
288HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
289LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
290OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
291SUCH DAMAGE.
292
293(15) Andrey A. Chernov
294
295Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia.
296All rights reserved.
297
298Redistribution and use in source and binary forms, with or without
299modification, are permitted provided that the following conditions
300are met:
3011. Redistributions of source code must retain the above copyright
302 notice, this list of conditions and the following disclaimer.
3032. Redistributions in binary form must reproduce the above copyright
304 notice, this list of conditions and the following disclaimer in the
305 documentation and/or other materials provided with the distribution.
306
307THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
308ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
309IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
310ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
311FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
312DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
313OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
314HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
315LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
316OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
317SUCH DAMAGE.
318
319(16) FreeBSD
320
321Copyright (c) 1997-2002 FreeBSD Project.
322All rights reserved.
323
324Redistribution and use in source and binary forms, with or without
325modification, are permitted provided that the following conditions
326are met:
3271. Redistributions of source code must retain the above copyright
328 notice, this list of conditions and the following disclaimer.
3292. Redistributions in binary form must reproduce the above copyright
330 notice, this list of conditions and the following disclaimer in the
331 documentation and/or other materials provided with the distribution.
332
333THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
334ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
335IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
336ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
337FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
338DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
339OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
340HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
341LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
342OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
343SUCH DAMAGE.
344
345(17) S. L. Moshier
346
347Author: S. L. Moshier.
348
349Copyright (c) 1984,2000 S.L. Moshier
350
351Permission to use, copy, modify, and distribute this software for any
352purpose without fee is hereby granted, provided that this entire notice
353is included in all copies of any software which is or includes a copy
354or modification of this software and in all copies of the supporting
355documentation for such software.
356
357THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
358WARRANTY. IN PARTICULAR, THE AUTHOR MAKES NO REPRESENTATION
359OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
360SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
361
362(18) Citrus Project
363
364Copyright (c)1999 Citrus Project,
365All rights reserved.
366
367Redistribution and use in source and binary forms, with or without
368modification, are permitted provided that the following conditions
369are met:
3701. Redistributions of source code must retain the above copyright
371 notice, this list of conditions and the following disclaimer.
3722. Redistributions in binary form must reproduce the above copyright
373 notice, this list of conditions and the following disclaimer in the
374 documentation and/or other materials provided with the distribution.
375
376THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
377ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
378IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
379ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
380FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
381DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
382OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
383HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
384LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
385OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
386SUCH DAMAGE.
387
388(19) Todd C. Miller
389
390Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
391All rights reserved.
392
393Redistribution and use in source and binary forms, with or without
394modification, are permitted provided that the following conditions
395are met:
3961. Redistributions of source code must retain the above copyright
397 notice, this list of conditions and the following disclaimer.
3982. Redistributions in binary form must reproduce the above copyright
399 notice, this list of conditions and the following disclaimer in the
400 documentation and/or other materials provided with the distribution.
4013. The name of the author may not be used to endorse or promote products
402 derived from this software without specific prior written permission.
403
404THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
405INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
406AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
407THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
408EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
409PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
410OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
411WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
412OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
413ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
414
415(20) DJ Delorie (i386)
416Copyright (C) 1991 DJ Delorie
417All rights reserved.
418
419Redistribution and use in source and binary forms is permitted
420provided that the above copyright notice and following paragraph are
421duplicated in all such forms.
422
423This file is distributed WITHOUT ANY WARRANTY; without even the implied
424warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
425
426(21) Free Software Foundation LGPL License (*-linux* targets only)
427
428 Copyright (C) 1990-1999, 2000, 2001 Free Software Foundation, Inc.
429 This file is part of the GNU C Library.
430 Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
431
432 The GNU C Library is free software; you can redistribute it and/or
433 modify it under the terms of the GNU Lesser General Public
434 License as published by the Free Software Foundation; either
435 version 2.1 of the License, or (at your option) any later version.
436
437 The GNU C Library is distributed in the hope that it will be useful,
438 but WITHOUT ANY WARRANTY; without even the implied warranty of
439 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
440 Lesser General Public License for more details.
441
442 You should have received a copy of the GNU Lesser General Public
443 License along with the GNU C Library; if not, write to the Free
444 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
445 02110-1301 USA.
446
447(22) Xavier Leroy LGPL License (i[3456]86-*-linux* targets only)
448
449Copyright (C) 1996 Xavier Leroy (Xavier.Leroy@inria.fr)
450
451This program is free software; you can redistribute it and/or
452modify it under the terms of the GNU Library General Public License
453as published by the Free Software Foundation; either version 2
454of the License, or (at your option) any later version.
455
456This program is distributed in the hope that it will be useful,
457but WITHOUT ANY WARRANTY; without even the implied warranty of
458MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
459GNU Library General Public License for more details.
460
461(23) Intel (i960)
462
463Copyright (c) 1993 Intel Corporation
464
465Intel hereby grants you permission to copy, modify, and distribute this
466software and its documentation. Intel grants this permission provided
467that the above copyright notice appears in all copies and that both the
468copyright notice and this permission notice appear in supporting
469documentation. In addition, Intel grants this permission provided that
470you prominently mark as "not part of the original" any modifications
471made to this software or documentation, and that the name of Intel
472Corporation not be used in advertising or publicity pertaining to
473distribution of the software or the documentation without specific,
474written prior permission.
475
476Intel Corporation provides this AS IS, WITHOUT ANY WARRANTY, EXPRESS OR
477IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY
478OR FITNESS FOR A PARTICULAR PURPOSE. Intel makes no guarantee or
479representations regarding the use of, or the results of the use of,
480the software and documentation in terms of correctness, accuracy,
481reliability, currentness, or otherwise; and you rely on the software,
482documentation and results solely at your own risk.
483
484IN NO EVENT SHALL INTEL BE LIABLE FOR ANY LOSS OF USE, LOSS OF BUSINESS,
485LOSS OF PROFITS, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES
486OF ANY KIND. IN NO EVENT SHALL INTEL'S TOTAL LIABILITY EXCEED THE SUM
487PAID TO INTEL FOR THE PRODUCT LICENSED HEREUNDER.
488
489(24) Hewlett-Packard (hppa targets only)
490
491(c) Copyright 1986 HEWLETT-PACKARD COMPANY
492
493To anyone who acknowledges that this file is provided "AS IS"
494without any express or implied warranty:
495 permission to use, copy, modify, and distribute this file
496for any purpose is hereby granted without fee, provided that
497the above copyright notice and this notice appears in all
498copies, and that the name of Hewlett-Packard Company not be
499used in advertising or publicity pertaining to distribution
500of the software without specific, written prior permission.
501Hewlett-Packard Company makes no representations about the
502suitability of this software for any purpose.
503
504(25) Henry Spencer (only *-linux targets)
505
506Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
507This software is not subject to any license of the American Telephone
508and Telegraph Company or of the Regents of the University of California.
509
510Permission is granted to anyone to use this software for any purpose on
511any computer system, and to alter it and redistribute it, subject
512to the following restrictions:
513
5141. The author is not responsible for the consequences of use of this
515 software, no matter how awful, even if they arise from flaws in it.
516
5172. The origin of this software must not be misrepresented, either by
518 explicit claim or by omission. Since few users ever read sources,
519 credits must appear in the documentation.
520
5213. Altered versions must be plainly marked as such, and must not be
522 misrepresented as being the original software. Since few users
523 ever read sources, credits must appear in the documentation.
524
5254. This notice may not be removed or altered.
526
527(26) Mike Barcroft
528
529Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
530All rights reserved.
531
532Redistribution and use in source and binary forms, with or without
533modification, are permitted provided that the following conditions
534are met:
5351. Redistributions of source code must retain the above copyright
536 notice, this list of conditions and the following disclaimer.
5372. Redistributions in binary form must reproduce the above copyright
538 notice, this list of conditions and the following disclaimer in the
539 documentation and/or other materials provided with the distribution.
540
541THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
542ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
543IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
544ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
545FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
546DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
547OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
548HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
549LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
550OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
551SUCH DAMAGE.
552
553(27) Konstantin Chuguev (--enable-newlib-iconv)
554
555Copyright (c) 1999, 2000
556 Konstantin Chuguev. All rights reserved.
557
558Redistribution and use in source and binary forms, with or without
559modification, are permitted provided that the following conditions
560are met:
5611. Redistributions of source code must retain the above copyright
562 notice, this list of conditions and the following disclaimer.
5632. Redistributions in binary form must reproduce the above copyright
564 notice, this list of conditions and the following disclaimer in the
565 documentation and/or other materials provided with the distribution.
566
567THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
568ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
569IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
570ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
571FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
572DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
573OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
574HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
575LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
576OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
577SUCH DAMAGE.
578
579 iconv (Charset Conversion Library) v2.0
580
581(28) Artem Bityuckiy (--enable-newlib-iconv)
582
583Copyright (c) 2003, Artem B. Bityuckiy, SoftMine Corporation.
584Rights transferred to Franklin Electronic Publishers.
585
586Redistribution and use in source and binary forms, with or without
587modification, are permitted provided that the following conditions
588are met:
5891. Redistributions of source code must retain the above copyright
590 notice, this list of conditions and the following disclaimer.
5912. Redistributions in binary form must reproduce the above copyright
592 notice, this list of conditions and the following disclaimer in the
593 documentation and/or other materials provided with the distribution.
594
595THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
596ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
597IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
598ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
599FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
600DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
601OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
602HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
603LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
604OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
605SUCH DAMAGE.
606
607(29) IBM, Sony, Toshiba (only spu-* targets)
608
609 (C) Copyright 2001,2006,
610 International Business Machines Corporation,
611 Sony Computer Entertainment, Incorporated,
612 Toshiba Corporation,
613
614 All rights reserved.
615
616 Redistribution and use in source and binary forms, with or without
617 modification, are permitted provided that the following conditions are met:
618
619 * Redistributions of source code must retain the above copyright notice,
620 this list of conditions and the following disclaimer.
621 * Redistributions in binary form must reproduce the above copyright
622 notice, this list of conditions and the following disclaimer in the
623 documentation and/or other materials provided with the distribution.
624 * Neither the names of the copyright holders nor the names of their
625 contributors may be used to endorse or promote products derived from this
626 software without specific prior written permission.
627
628 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
629 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
630 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
631 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
632 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
633 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
634 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
635 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
636 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
637 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
638 POSSIBILITY OF SUCH DAMAGE.
639
640(30) - Alex Tatmanjants (targets using libc/posix)
641
642 Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
643 at Electronni Visti IA, Kiev, Ukraine.
644 All rights reserved.
645
646 Redistribution and use in source and binary forms, with or without
647 modification, are permitted provided that the following conditions
648 are met:
649 1. Redistributions of source code must retain the above copyright
650 notice, this list of conditions and the following disclaimer.
651 2. Redistributions in binary form must reproduce the above copyright
652 notice, this list of conditions and the following disclaimer in the
653 documentation and/or other materials provided with the distribution.
654
655 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
656 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
657 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
658 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
659 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
660 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
661 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
662 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
663 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
664 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
665 SUCH DAMAGE.
666
667(31) - M. Warner Losh (targets using libc/posix)
668
669 Copyright (c) 1998, M. Warner Losh <imp@freebsd.org>
670 All rights reserved.
671
672 Redistribution and use in source and binary forms, with or without
673 modification, are permitted provided that the following conditions
674 are met:
675 1. Redistributions of source code must retain the above copyright
676 notice, this list of conditions and the following disclaimer.
677 2. Redistributions in binary form must reproduce the above copyright
678 notice, this list of conditions and the following disclaimer in the
679 documentation and/or other materials provided with the distribution.
680
681 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
682 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
683 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
684 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
685 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
686 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
687 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
688 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
689 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
690 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
691 SUCH DAMAGE.
692
693(32) - Andrey A. Chernov (targets using libc/posix)
694
695 Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia.
696 All rights reserved.
697
698 Redistribution and use in source and binary forms, with or without
699 modification, are permitted provided that the following conditions
700 are met:
701 1. Redistributions of source code must retain the above copyright
702 notice, this list of conditions and the following disclaimer.
703 2. Redistributions in binary form must reproduce the above copyright
704 notice, this list of conditions and the following disclaimer in the
705 documentation and/or other materials provided with the distribution.
706
707 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
708 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
709 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
710 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
711 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
712 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
713 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
714 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
715 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
716 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
717 SUCH DAMAGE.
718
719(33) - Daniel Eischen (targets using libc/posix)
720
721 Copyright (c) 2001 Daniel Eischen <deischen@FreeBSD.org>.
722 All rights reserved.
723
724 Redistribution and use in source and binary forms, with or without
725 modification, are permitted provided that the following conditions
726 are met:
727 1. Redistributions of source code must retain the above copyright
728 notice, this list of conditions and the following disclaimer.
729 2. Redistributions in binary form must reproduce the above copyright
730 notice, this list of conditions and the following disclaimer in the
731 documentation and/or other materials provided with the distribution.
732
733 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
734 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
735 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
736 ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
737 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
738 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
739 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
740 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
741 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
742 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
743 SUCH DAMAGE.
744
745
746(34) - Jon Beniston (only lm32-* targets)
747
748 Contributed by Jon Beniston <jon@beniston.com>
749
750 Redistribution and use in source and binary forms, with or without
751 modification, are permitted provided that the following conditions
752 are met:
753 1. Redistributions of source code must retain the above copyright
754 notice, this list of conditions and the following disclaimer.
755 2. Redistributions in binary form must reproduce the above copyright
756 notice, this list of conditions and the following disclaimer in the
757 documentation and/or other materials provided with the distribution.
758
759 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
760 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
761 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
762 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
763 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
764 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
765 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
766 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
767 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
768 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
769 SUCH DAMAGE.
770
771
772(35) - ARM Ltd (arm and thumb variant targets only)
773
774 Copyright (c) 2009 ARM Ltd
775 All rights reserved.
776
777 Redistribution and use in source and binary forms, with or without
778 modification, are permitted provided that the following conditions
779 are met:
780 1. Redistributions of source code must retain the above copyright
781 notice, this list of conditions and the following disclaimer.
782 2. Redistributions in binary form must reproduce the above copyright
783 notice, this list of conditions and the following disclaimer in the
784 documentation and/or other materials provided with the distribution.
785 3. The name of the company may not be used to endorse or promote
786 products derived from this software without specific prior written
787 permission.
788
789 THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED
790 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
791 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
792 IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
793 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
794 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
795 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
796 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
797 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
798 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
799
800(36) - Xilinx, Inc. (micrroblaze-* and powerpc-* targets)
801
802Copyright (c) 2004, 2009 Xilinx, Inc. All rights reserved.
803
804Redistribution and use in source and binary forms, with or without
805modification, are permitted provided that the following conditions are
806met:
807
8081. Redistributions source code must retain the above copyright notice,
809this list of conditions and the following disclaimer.
810
8112. Redistributions in binary form must reproduce the above copyright
812notice, this list of conditions and the following disclaimer in the
813documentation and/or other materials provided with the distribution.
814
8153. Neither the name of Xilinx nor the names of its contributors may be
816used to endorse or promote products derived from this software without
817specific prior written permission.
818
819THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
820IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
821TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
822PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
823HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
824SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
825TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
826PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
827LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
828NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
829SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
830
diff --git a/lib/libsetjmp/SOURCES b/lib/libsetjmp/SOURCES
new file mode 100644
index 0000000000..aa0ac46a23
--- /dev/null
+++ b/lib/libsetjmp/SOURCES
@@ -0,0 +1,19 @@
1#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
2
3#ifdef CPU_ARM
4arm/setjmp.S
5#endif
6
7#ifdef CPU_COLDFIRE
8m68k/setjmp.S
9#endif
10
11#ifdef CPU_SH
12sh/setjmp.S
13#endif
14
15#ifdef CPU_MIPS
16mips/setjmp.S
17#endif
18
19#endif
diff --git a/apps/codecs/lib/setjmp_arm.S b/lib/libsetjmp/arm/setjmp.S
index ee5ebd9169..ee5ebd9169 100644
--- a/apps/codecs/lib/setjmp_arm.S
+++ b/lib/libsetjmp/arm/setjmp.S
diff --git a/lib/libsetjmp/libsetjmp.make b/lib/libsetjmp/libsetjmp.make
new file mode 100644
index 0000000000..b7d4cad25f
--- /dev/null
+++ b/lib/libsetjmp/libsetjmp.make
@@ -0,0 +1,21 @@
1# __________ __ ___.
2# Open \______ \ ____ ____ | | _\_ |__ _______ ___
3# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6# \/ \/ \/ \/ \/
7#
8
9SETJMP_DIR = $(ROOTDIR)/lib/libsetjmp
10SETJMP_SRC = $(call preprocess, $(SETJMP_DIR)/SOURCES)
11SETJMP_OBJ := $(call c2obj, $(SETJMP_SRC))
12
13OTHER_SRC += $(SETJMP_SRC)
14
15LIBSETJMP = $(BUILDDIR)/lib/libsetjmp.a
16
17INCLUDES += -I$(SETJMP_DIR)
18
19$(LIBSETJMP): $(SETJMP_OBJ)
20 $(SILENT)$(shell rm -f $@)
21 $(call PRINTS,AR $(@F))$(AR) rcs $@ $^ >/dev/null
diff --git a/apps/codecs/lib/setjmp_cf.S b/lib/libsetjmp/m68k/setjmp.S
index 86eda8079c..86eda8079c 100644
--- a/apps/codecs/lib/setjmp_cf.S
+++ b/lib/libsetjmp/m68k/setjmp.S
diff --git a/apps/codecs/lib/setjmp_mips.S b/lib/libsetjmp/mips/setjmp.S
index 7fa127a7a4..7fa127a7a4 100644
--- a/apps/codecs/lib/setjmp_mips.S
+++ b/lib/libsetjmp/mips/setjmp.S
diff --git a/apps/codecs/lib/setjmp.h b/lib/libsetjmp/setjmp.h
index f7ff2ea58c..f1f5d6a89e 100644
--- a/apps/codecs/lib/setjmp.h
+++ b/lib/libsetjmp/setjmp.h
@@ -5,6 +5,7 @@
5 * newlib 1.17.0, with minor changes for Rockbox. 5 * newlib 1.17.0, with minor changes for Rockbox.
6 */ 6 */
7 7
8#include "config.h"
8#ifdef CPU_ARM 9#ifdef CPU_ARM
9/* 10/*
10 * All callee preserved registers: 11 * All callee preserved registers:
@@ -35,16 +36,16 @@
35#endif 36#endif
36#endif 37#endif
37 38
38#if 0 /* Disabled for now, as SH doesn't have setjmp implementation (yet) */ 39#ifdef CPU_SH
39#ifdef __sh__ 40#define __SH5__ 0
40#if __SH5__ 41#if __SH5__
41#define _JBLEN 50 42#define _JBLEN 50
42#define _JBTYPE long long 43#define _JBTYPE long long
43#else 44#else
45/* r8 through r15 (callee saved), pr, fp regs if available */
44#define _JBLEN 20 46#define _JBLEN 20
45#endif /* __SH5__ */ 47#endif /* __SH5__ */
46#endif 48#endif
47#endif
48 49
49#ifdef _JBLEN 50#ifdef _JBLEN
50#ifdef _JBTYPE 51#ifdef _JBTYPE
diff --git a/lib/libsetjmp/sh/asm.h b/lib/libsetjmp/sh/asm.h
new file mode 100644
index 0000000000..db30b149b5
--- /dev/null
+++ b/lib/libsetjmp/sh/asm.h
@@ -0,0 +1,42 @@
1#ifdef __STDC__
2# define _C_LABEL(x) _ ## x
3#else
4# define _C_LABEL(x) _/**/x
5#endif
6#define _ASM_LABEL(x) x
7
8#if __SH5__
9# if __SH5__ == 32 && __SHMEDIA__
10# define TEXT .section .text..SHmedia32, "ax"
11# else
12# define TEXT .text
13# endif
14
15# define _ENTRY(name) \
16 TEXT; .balign 8; .globl name; name:
17#else
18#define _ENTRY(name) \
19 .text; .align 2; .globl name; name:
20#endif /* __SH5__ */
21
22#define ENTRY(name) \
23 _ENTRY(_C_LABEL(name))
24
25#if (defined (__sh2__) || defined (__SH2E__) || defined (__sh3__) || defined (__SH3E__) \
26 || defined (__SH4_SINGLE__) || defined (__SH4__)) \
27 || defined (__SH4_SINGLE_ONLY__) || defined (__SH5__) || defined (__SH2A__)
28#define DELAYED_BRANCHES
29#define SL(branch, dest, in_slot, in_slot_arg2) \
30 branch##.s dest; in_slot, in_slot_arg2
31#else
32#define SL(branch, dest, in_slot, in_slot_arg2) \
33 in_slot, in_slot_arg2; branch dest
34#endif
35
36#ifdef __LITTLE_ENDIAN__
37#define SHHI shlld
38#define SHLO shlrd
39#else
40#define SHHI shlrd
41#define SHLO shlld
42#endif
diff --git a/lib/libsetjmp/sh/setjmp.S b/lib/libsetjmp/sh/setjmp.S
new file mode 100644
index 0000000000..7df2054531
--- /dev/null
+++ b/lib/libsetjmp/sh/setjmp.S
@@ -0,0 +1,194 @@
1#include "config.h"
2#ifdef ROCKBOX_LITTLE_ENDIAN
3#define __LITTLE_ENDIAN__
4#endif
5
6/* SH7034, the only supported sh target supported by Rockbox is sh1 */
7#define __SH5__ 0
8#define __SHMEDIA__ 0
9
10/* below is unmodified setjmp.S revision 1.3 from newlib cvs */
11#if __SHMEDIA__
12 .mode SHmedia
13#endif
14
15#include "asm.h"
16
17ENTRY(setjmp)
18#if __SH5__
19 ptabs r18, tr0
20 gettr tr5, r5
21 gettr tr6, r6
22 gettr tr7, r7
23 st.q r2, 0*8, r18
24 st.q r2, 1*8, r10
25 st.q r2, 2*8, r11
26 st.q r2, 3*8, r12
27 st.q r2, 4*8, r13
28 st.q r2, 5*8, r14
29 st.q r2, 6*8, r15
30 st.q r2, 7*8, r28
31 st.q r2, 8*8, r29
32 st.q r2, 9*8, r30
33 st.q r2, 10*8, r31
34 st.q r2, 11*8, r32
35 st.q r2, 12*8, r33
36 st.q r2, 13*8, r34
37 st.q r2, 14*8, r35
38 st.q r2, 15*8, r44
39 st.q r2, 16*8, r45
40 st.q r2, 17*8, r46
41 st.q r2, 18*8, r47
42 st.q r2, 19*8, r48
43 st.q r2, 20*8, r49
44 st.q r2, 21*8, r50
45 st.q r2, 22*8, r51
46 st.q r2, 23*8, r52
47 st.q r2, 24*8, r53
48 st.q r2, 25*8, r54
49 st.q r2, 26*8, r55
50 st.q r2, 27*8, r56
51 st.q r2, 28*8, r57
52 st.q r2, 29*8, r58
53 st.q r2, 30*8, r59
54 st.q r2, 31*8, r5
55 st.q r2, 32*8, r6
56 st.q r2, 33*8, r7
57#if ! __SH4_NOFPU__
58 fst.d r2, 34*8, dr12
59 fst.d r2, 35*8, dr14
60 fst.d r2, 36*8, dr36
61 fst.d r2, 37*8, dr38
62 fst.d r2, 38*8, dr40
63 fst.d r2, 39*8, dr42
64 fst.d r2, 40*8, dr44
65 fst.d r2, 41*8, dr46
66 fst.d r2, 42*8, dr48
67 fst.d r2, 43*8, dr50
68 fst.d r2, 44*8, dr52
69 fst.d r2, 45*8, dr54
70 fst.d r2, 46*8, dr56
71 fst.d r2, 47*8, dr58
72 fst.d r2, 48*8, dr60
73 fst.d r2, 49*8, dr62
74#endif
75 movi 0, r2
76 blink tr0, r63
77#else
78#if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
79 add #(13*4),r4
80#else
81 add #(9*4),r4
82#endif
83
84 sts.l pr,@-r4
85
86#if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
87 fmov.s fr15,@-r4 ! call saved floating point registers
88 fmov.s fr14,@-r4
89 fmov.s fr13,@-r4
90 fmov.s fr12,@-r4
91#endif
92
93 mov.l r15,@-r4 ! call saved integer registers
94 mov.l r14,@-r4
95 mov.l r13,@-r4
96 mov.l r12,@-r4
97
98 mov.l r11,@-r4
99 mov.l r10,@-r4
100 mov.l r9,@-r4
101 mov.l r8,@-r4
102
103 rts
104 mov #0,r0
105#endif /* __SH5__ */
106
107ENTRY(longjmp)
108#if __SH5__
109 ld.q r2, 0*8, r18
110 ptabs r18, tr0
111 ld.q r2, 1*8, r10
112 ld.q r2, 2*8, r11
113 ld.q r2, 3*8, r12
114 ld.q r2, 4*8, r13
115 ld.q r2, 5*8, r14
116 ld.q r2, 6*8, r15
117 ld.q r2, 7*8, r28
118 ld.q r2, 8*8, r29
119 ld.q r2, 9*8, r30
120 ld.q r2, 10*8, r31
121 ld.q r2, 11*8, r32
122 ld.q r2, 12*8, r33
123 ld.q r2, 13*8, r34
124 ld.q r2, 14*8, r35
125 ld.q r2, 15*8, r44
126 ld.q r2, 16*8, r45
127 ld.q r2, 17*8, r46
128 ld.q r2, 18*8, r47
129 ld.q r2, 19*8, r48
130 ld.q r2, 20*8, r49
131 ld.q r2, 21*8, r50
132 ld.q r2, 22*8, r51
133 ld.q r2, 23*8, r52
134 ld.q r2, 24*8, r53
135 ld.q r2, 25*8, r54
136 ld.q r2, 26*8, r55
137 ld.q r2, 27*8, r56
138 ld.q r2, 28*8, r57
139 ld.q r2, 29*8, r58
140 ld.q r2, 30*8, r59
141 ld.q r2, 31*8, r5
142 ld.q r2, 32*8, r6
143 ld.q r2, 33*8, r7
144 ptabs r5, tr5
145 ptabs r6, tr6
146 ptabs r7, tr7
147#if ! __SH4_NOFPU__
148 fld.d r2, 34*8, dr12
149 fld.d r2, 35*8, dr14
150 fld.d r2, 36*8, dr36
151 fld.d r2, 37*8, dr38
152 fld.d r2, 38*8, dr40
153 fld.d r2, 39*8, dr42
154 fld.d r2, 40*8, dr44
155 fld.d r2, 41*8, dr46
156 fld.d r2, 42*8, dr48
157 fld.d r2, 43*8, dr50
158 fld.d r2, 44*8, dr52
159 fld.d r2, 45*8, dr54
160 fld.d r2, 46*8, dr56
161 fld.d r2, 47*8, dr58
162 fld.d r2, 48*8, dr60
163 fld.d r2, 49*8, dr62
164#endif
165 movi 1, r2
166 cmvne r3, r3, r2
167 blink tr0, r63
168#else
169 mov.l @r4+,r8
170 mov.l @r4+,r9
171 mov.l @r4+,r10
172 mov.l @r4+,r11
173
174 mov.l @r4+,r12
175 mov.l @r4+,r13
176 mov.l @r4+,r14
177 mov.l @r4+,r15
178
179#if defined (__SH2E__) || defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
180 fmov.s @r4+,fr12 ! call saved floating point registers
181 fmov.s @r4+,fr13
182 fmov.s @r4+,fr14
183 fmov.s @r4+,fr15
184#endif
185
186 lds.l @r4+,pr
187
188 mov r5,r0
189 tst r0,r0
190 bf retr4
191 movt r0
192retr4: rts
193 nop
194#endif /* __SH5__ */
diff --git a/tools/root.make b/tools/root.make
index 4aff793abc..eda27b77c0 100644
--- a/tools/root.make
+++ b/tools/root.make
@@ -69,6 +69,11 @@ ifeq (,$(findstring checkwps,$(APPSDIR)))
69 endif 69 endif
70endif 70endif
71 71
72#included before codecs.make and plugins.make so they see $(LIBSETJMP)
73ifndef APP_TYPE
74 include $(ROOTDIR)/lib/libsetjmp/libsetjmp.make
75endif
76
72ifneq (,$(findstring bootloader,$(APPSDIR))) 77ifneq (,$(findstring bootloader,$(APPSDIR)))
73 include $(APPSDIR)/bootloader.make 78 include $(APPSDIR)/bootloader.make
74else ifneq (,$(findstring bootbox,$(APPSDIR))) 79else ifneq (,$(findstring bootbox,$(APPSDIR)))
@@ -95,6 +100,7 @@ else
95 ifdef APP_TYPE 100 ifdef APP_TYPE
96 include $(ROOTDIR)/uisimulator/uisimulator.make 101 include $(ROOTDIR)/uisimulator/uisimulator.make
97 endif 102 endif
103
98endif # bootloader 104endif # bootloader
99 105
100OBJ := $(SRC:.c=.o) 106OBJ := $(SRC:.c=.o)