diff options
author | Richard Purdie <richard@openedhand.com> | 2006-05-09 16:35:43 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-05-09 16:35:43 +0000 |
commit | 8e898fe29b4b621df383b49b4a1df8d7d12b9a8f (patch) | |
tree | 383d65ec1202a8bb5891e9c68ed5e681b1b8e53e /openembedded/packages | |
parent | 8100c3dbd30a3c28306c9d176323b4a69d101a6a (diff) | |
download | poky-8e898fe29b4b621df383b49b4a1df8d7d12b9a8f.tar.gz |
Add EABI toolchain
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@379 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages')
44 files changed, 3446 insertions, 1 deletions
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch new file mode 100644 index 0000000000..4461bedd4e --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | # strip (and objcopy) fail to set the error code if there is no | ||
2 | # output file name and the rename of the stripped (or copied) file | ||
3 | # fails, yet the command fails to do anything. This fixes both | ||
4 | # objcopy and strip. | ||
5 | # | ||
6 | # modification by bero: Ported to 2.16.91.0.6 | ||
7 | # | ||
8 | #Signed-off-by: John Bowler <jbowler@acm.org> | ||
9 | #Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org> | ||
10 | --- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100 | ||
11 | +++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100 | ||
12 | @@ -2593,7 +2593,8 @@ | ||
13 | if (preserve_dates) | ||
14 | set_times (tmpname, &statbuf); | ||
15 | if (output_file == NULL) | ||
16 | - smart_rename (tmpname, argv[i], preserve_dates); | ||
17 | + if(smart_rename (tmpname, argv[i], preserve_dates)) | ||
18 | + hold_status = 1; | ||
19 | status = hold_status; | ||
20 | } | ||
21 | else | ||
22 | @@ -3184,7 +3185,8 @@ | ||
23 | { | ||
24 | if (preserve_dates) | ||
25 | set_times (tmpname, &statbuf); | ||
26 | - smart_rename (tmpname, input_filename, preserve_dates); | ||
27 | + if (smart_rename (tmpname, input_filename, preserve_dates)) | ||
28 | + status = 1; | ||
29 | } | ||
30 | else | ||
31 | unlink (tmpname); | ||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch new file mode 100644 index 0000000000..25222e5df2 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch | |||
@@ -0,0 +1,139 @@ | |||
1 | --- binutils-2.16.91.0.7/bfd/configure | ||
2 | +++ binutils-2.16.91.0.7/bfd/configure | ||
3 | @@ -3576,7 +3576,7 @@ | ||
4 | ;; | ||
5 | |||
6 | # This must be Linux ELF. | ||
7 | -linux-gnu*) | ||
8 | +linux-gnu*|linux-uclibc*) | ||
9 | lt_cv_deplibs_check_method=pass_all | ||
10 | ;; | ||
11 | |||
12 | --- binutils-2.16.91.0.7/binutils/configure | ||
13 | +++ binutils-2.16.91.0.7/binutils/configure | ||
14 | @@ -3411,7 +3411,7 @@ | ||
15 | ;; | ||
16 | |||
17 | # This must be Linux ELF. | ||
18 | -linux-gnu*) | ||
19 | +linux-gnu*|linux-uclibc*) | ||
20 | lt_cv_deplibs_check_method=pass_all | ||
21 | ;; | ||
22 | |||
23 | --- binutils-2.16.91.0.7/configure | ||
24 | +++ binutils-2.16.91.0.7/configure | ||
25 | @@ -1270,7 +1270,7 @@ | ||
26 | am33_2.0-*-linux*) | ||
27 | noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" | ||
28 | ;; | ||
29 | - sh-*-linux*) | ||
30 | + sh*-*-linux*) | ||
31 | noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" | ||
32 | ;; | ||
33 | sh*-*-pe|mips*-*-pe|*arm-wince-pe) | ||
34 | @@ -1578,7 +1578,7 @@ | ||
35 | romp-*-*) | ||
36 | noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" | ||
37 | ;; | ||
38 | - sh-*-* | sh64-*-*) | ||
39 | + sh*-*-* | sh64-*-*) | ||
40 | case "${host}" in | ||
41 | i[3456789]86-*-vsta) ;; # don't add gprof back in | ||
42 | i[3456789]86-*-go32*) ;; # don't add gprof back in | ||
43 | --- binutils-2.16.91.0.7/configure.in | ||
44 | +++ binutils-2.16.91.0.7/configure.in | ||
45 | @@ -468,7 +468,7 @@ | ||
46 | am33_2.0-*-linux*) | ||
47 | noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" | ||
48 | ;; | ||
49 | - sh-*-linux*) | ||
50 | + sh*-*-linux*) | ||
51 | noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" | ||
52 | ;; | ||
53 | sh*-*-pe|mips*-*-pe|*arm-wince-pe) | ||
54 | @@ -776,7 +776,7 @@ | ||
55 | romp-*-*) | ||
56 | noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" | ||
57 | ;; | ||
58 | - sh-*-* | sh64-*-*) | ||
59 | + sh*-*-* | sh64-*-*) | ||
60 | case "${host}" in | ||
61 | i[[3456789]]86-*-vsta) ;; # don't add gprof back in | ||
62 | i[[3456789]]86-*-go32*) ;; # don't add gprof back in | ||
63 | --- binutils-2.16.91.0.7/gas/configure | ||
64 | +++ binutils-2.16.91.0.7/gas/configure | ||
65 | @@ -3411,7 +3411,7 @@ | ||
66 | ;; | ||
67 | |||
68 | # This must be Linux ELF. | ||
69 | -linux-gnu*) | ||
70 | +linux-gnu*|linux-uclibc*) | ||
71 | lt_cv_deplibs_check_method=pass_all | ||
72 | ;; | ||
73 | |||
74 | --- binutils-2.16.91.0.7/gprof/configure | ||
75 | +++ binutils-2.16.91.0.7/gprof/configure | ||
76 | @@ -3419,6 +3419,11 @@ | ||
77 | lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` | ||
78 | ;; | ||
79 | |||
80 | +linux-uclibc*) | ||
81 | + lt_cv_deplibs_check_method=pass_all | ||
82 | + lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` | ||
83 | + ;; | ||
84 | + | ||
85 | netbsd* | knetbsd*-gnu) | ||
86 | if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then | ||
87 | lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' | ||
88 | --- binutils-2.16.91.0.7/ld/configure | ||
89 | +++ binutils-2.16.91.0.7/ld/configure | ||
90 | @@ -3413,7 +3413,7 @@ | ||
91 | ;; | ||
92 | |||
93 | # This must be Linux ELF. | ||
94 | -linux-gnu*) | ||
95 | +linux-gnu*|linux-uclibc*) | ||
96 | lt_cv_deplibs_check_method=pass_all | ||
97 | ;; | ||
98 | |||
99 | --- binutils-2.16.91.0.7/libtool.m4 | ||
100 | +++ binutils-2.16.91.0.7/libtool.m4 | ||
101 | @@ -739,7 +739,7 @@ | ||
102 | ;; | ||
103 | |||
104 | # This must be Linux ELF. | ||
105 | -linux-gnu*) | ||
106 | +linux-gnu*|linux-uclibc*) | ||
107 | lt_cv_deplibs_check_method=pass_all | ||
108 | ;; | ||
109 | |||
110 | --- binutils-2.16.91.0.7/ltconfig | ||
111 | +++ binutils-2.16.91.0.7/ltconfig | ||
112 | @@ -602,6 +602,7 @@ | ||
113 | |||
114 | # Transform linux* to *-*-linux-gnu*, to support old configure scripts. | ||
115 | case $host_os in | ||
116 | +linux-uclibc*) ;; | ||
117 | linux-gnu*) ;; | ||
118 | linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` | ||
119 | esac | ||
120 | @@ -1247,7 +1248,7 @@ | ||
121 | ;; | ||
122 | |||
123 | # This must be Linux ELF. | ||
124 | -linux-gnu*) | ||
125 | +linux-gnu*|linux-uclibc*) | ||
126 | version_type=linux | ||
127 | need_lib_prefix=no | ||
128 | need_version=no | ||
129 | --- binutils-2.16.91.0.7/opcodes/configure | ||
130 | +++ binutils-2.16.91.0.7/opcodes/configure | ||
131 | @@ -3579,7 +3579,7 @@ | ||
132 | ;; | ||
133 | |||
134 | # This must be Linux ELF. | ||
135 | -linux-gnu*) | ||
136 | +linux-gnu*|linux-uclibc*) | ||
137 | lt_cv_deplibs_check_method=pass_all | ||
138 | ;; | ||
139 | |||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..04a7e61e25 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 001_ld_makefile_patch.dpatch | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Description: correct where ld scripts are installed | ||
6 | ## DP: Author: Chris Chimelis <chris@debian.org> | ||
7 | ## DP: Upstream status: N/A | ||
8 | ## DP: Date: ?? | ||
9 | |||
10 | if [ $# -ne 1 ]; then | ||
11 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
16 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
17 | |||
18 | case "$1" in | ||
19 | -patch) patch $patch_opts -p1 < $0;; | ||
20 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
21 | *) | ||
22 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
23 | exit 1;; | ||
24 | esac | ||
25 | |||
26 | exit 0 | ||
27 | |||
28 | @DPATCH@ | ||
29 | --- binutils-2.16.91.0.1/ld/Makefile.am | ||
30 | +++ binutils-2.16.91.0.1/ld/Makefile.am | ||
31 | @@ -20,7 +20,7 @@ | ||
32 | # We put the scripts in the directory $(scriptdir)/ldscripts. | ||
33 | # We can't put the scripts in $(datadir) because the SEARCH_DIR | ||
34 | # directives need to be different for native and cross linkers. | ||
35 | -scriptdir = $(tooldir)/lib | ||
36 | +scriptdir = $(libdir) | ||
37 | |||
38 | EMUL = @EMUL@ | ||
39 | EMULATION_OFILES = @EMULATION_OFILES@ | ||
40 | --- binutils-2.16.91.0.1/ld/Makefile.in | ||
41 | +++ binutils-2.16.91.0.1/ld/Makefile.in | ||
42 | @@ -268,7 +268,7 @@ | ||
43 | # We put the scripts in the directory $(scriptdir)/ldscripts. | ||
44 | # We can't put the scripts in $(datadir) because the SEARCH_DIR | ||
45 | # directives need to be different for native and cross linkers. | ||
46 | -scriptdir = $(tooldir)/lib | ||
47 | +scriptdir = $(libdir) | ||
48 | BASEDIR = $(srcdir)/.. | ||
49 | BFDDIR = $(BASEDIR)/bfd | ||
50 | INCDIR = $(BASEDIR)/include | ||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch new file mode 100644 index 0000000000..f337611edf --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Specify which filename is causing an error if the filename is a | ||
6 | ## DP: directory. (#45832) | ||
7 | |||
8 | if [ $# -ne 1 ]; then | ||
9 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
14 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
15 | |||
16 | case "$1" in | ||
17 | -patch) patch $patch_opts -p1 < $0;; | ||
18 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
19 | *) | ||
20 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
21 | exit 1;; | ||
22 | esac | ||
23 | |||
24 | exit 0 | ||
25 | |||
26 | @DPATCH@ | ||
27 | diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c | ||
28 | --- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 | ||
29 | +++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 | ||
30 | @@ -150,6 +150,13 @@ | ||
31 | { | ||
32 | bfd *nbfd; | ||
33 | const bfd_target *target_vec; | ||
34 | + struct stat s; | ||
35 | + | ||
36 | + if (stat (filename, &s) == 0) | ||
37 | + if (S_ISDIR(s.st_mode)) { | ||
38 | + bfd_set_error (bfd_error_file_not_recognized); | ||
39 | + return NULL; | ||
40 | + } | ||
41 | |||
42 | nbfd = _bfd_new_bfd (); | ||
43 | if (nbfd == NULL) | ||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..498651a90c --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/bin/sh -e | ||
2 | ## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org> | ||
3 | ## | ||
4 | ## All lines beginning with `## DP:' are a description of the patch. | ||
5 | ## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for | ||
6 | ## DP: cases where -rpath isn't specified. (#151024) | ||
7 | |||
8 | if [ $# -ne 1 ]; then | ||
9 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
10 | exit 1 | ||
11 | fi | ||
12 | |||
13 | [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts | ||
14 | patch_opts="${patch_opts:--f --no-backup-if-mismatch}" | ||
15 | |||
16 | case "$1" in | ||
17 | -patch) patch $patch_opts -p1 < $0;; | ||
18 | -unpatch) patch $patch_opts -p1 -R < $0;; | ||
19 | *) | ||
20 | echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" | ||
21 | exit 1;; | ||
22 | esac | ||
23 | |||
24 | exit 0 | ||
25 | |||
26 | @DPATCH@ | ||
27 | diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em | ||
28 | --- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 | ||
29 | +++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 | ||
30 | @@ -692,6 +692,8 @@ | ||
31 | && command_line.rpath == NULL) | ||
32 | { | ||
33 | lib_path = (const char *) getenv ("LD_RUN_PATH"); | ||
34 | + if ((lib_path) && (strlen (lib_path) == 0)) | ||
35 | + lib_path = NULL; | ||
36 | if (gld${EMULATION_NAME}_search_needed (lib_path, &n, | ||
37 | force)) | ||
38 | break; | ||
39 | @@ -871,6 +873,8 @@ | ||
40 | rpath = command_line.rpath; | ||
41 | if (rpath == NULL) | ||
42 | rpath = (const char *) getenv ("LD_RUN_PATH"); | ||
43 | + if ((rpath) && (strlen (rpath) == 0)) | ||
44 | + rpath = NULL; | ||
45 | if (! (bfd_elf_size_dynamic_sections | ||
46 | (output_bfd, command_line.soname, rpath, | ||
47 | command_line.filter_shlib, | ||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch new file mode 100644 index 0000000000..5959c718d2 --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | --- binutils/bfd/elf32-mips.c~ | ||
2 | +++ binutils/bfd/elf32-mips.c | ||
3 | @@ -1613,7 +1613,9 @@ | ||
4 | |||
5 | /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses | ||
6 | page sizes of up to that limit, so we need to respect it. */ | ||
7 | -#define ELF_MAXPAGESIZE 0x10000 | ||
8 | +/*#define ELF_MAXPAGESIZE 0x10000*/ | ||
9 | +/* Use 4K to shrink the elf header. NOT for general use! */ | ||
10 | +#define ELF_MAXPAGESIZE 0x1000 | ||
11 | #define elf32_bed elf32_tradbed | ||
12 | |||
13 | /* Include the target file again for this target. */ | ||
14 | --- binutils/bfd/elfn32-mips.c~ | ||
15 | +++ binutils/bfd/elfn32-mips.c | ||
16 | @@ -2399,7 +2399,9 @@ | ||
17 | |||
18 | /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses | ||
19 | page sizes of up to that limit, so we need to respect it. */ | ||
20 | -#define ELF_MAXPAGESIZE 0x10000 | ||
21 | +/*#define ELF_MAXPAGESIZE 0x10000*/ | ||
22 | +/* Use 4K to shrink the elf header. NOT for general use! */ | ||
23 | +#define ELF_MAXPAGESIZE 0x1000 | ||
24 | #define elf32_bed elf32_tradbed | ||
25 | |||
26 | /* Include the target file again for this target. */ | ||
diff --git a/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch new file mode 100644 index 0000000000..9ef7a7c9ec --- /dev/null +++ b/openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch | |||
@@ -0,0 +1,93 @@ | |||
1 | Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html | ||
2 | Fixes | ||
3 | localealias.s:544: Error: junk at end of line, first unrecognized character is `,' | ||
4 | when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3 | ||
5 | |||
6 | Paths adjusted to match crosstool's patcher. | ||
7 | |||
8 | Message-Id: m3n052qw2g.fsf@whitebox.m5r.de | ||
9 | From: Andreas Schwab <schwab at suse dot de> | ||
10 | To: Nathan Sidwell <nathan at codesourcery dot com> | ||
11 | Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com | ||
12 | Date: Fri, 23 Apr 2004 22:27:19 +0200 | ||
13 | Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line | ||
14 | |||
15 | Nathan Sidwell <nathan@codesourcery.com> writes: | ||
16 | |||
17 | > Index: read.c | ||
18 | > =================================================================== | ||
19 | > RCS file: /cvs/src/src/gas/read.c,v | ||
20 | > retrieving revision 1.76 | ||
21 | > diff -c -3 -p -r1.76 read.c | ||
22 | > *** read.c 12 Mar 2004 17:48:12 -0000 1.76 | ||
23 | > --- read.c 18 Mar 2004 09:56:05 -0000 | ||
24 | > *************** read_a_source_file (char *name) | ||
25 | > *** 1053,1059 **** | ||
26 | > #endif | ||
27 | > input_line_pointer--; | ||
28 | > /* Report unknown char as ignored. */ | ||
29 | > ! ignore_rest_of_line (); | ||
30 | > } | ||
31 | > | ||
32 | > #ifdef md_after_pass_hook | ||
33 | > --- 1053,1059 ---- | ||
34 | > #endif | ||
35 | > input_line_pointer--; | ||
36 | > /* Report unknown char as ignored. */ | ||
37 | > ! demand_empty_rest_of_line (); | ||
38 | > } | ||
39 | > | ||
40 | > #ifdef md_after_pass_hook | ||
41 | |||
42 | This means that the unknown character is no longer ignored, despite the | ||
43 | comment. As a side effect a line starting with a line comment character | ||
44 | not followed by APP in NO_APP mode now triggers an error instead of just a | ||
45 | warning, breaking builds of glibc on m68k-linux. Earlier in | ||
46 | read_a_source_file where #APP is handled there is another comment that | ||
47 | claims that unknown comments are ignored, when in fact they aren't (only | ||
48 | the initial line comment character is skipped). | ||
49 | |||
50 | Note that the presence of #APP will mess up the line counters, but | ||
51 | that appears to be difficult to fix. | ||
52 | |||
53 | Andreas. | ||
54 | |||
55 | 2004-04-23 Andreas Schwab <schwab@suse.de> | ||
56 | |||
57 | * read.c (read_a_source_file): Ignore unknown text after line | ||
58 | comment character. Fix misleading comment. | ||
59 | |||
60 | --- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200 | ||
61 | +++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200 | ||
62 | @@ -950,10 +950,14 @@ read_a_source_file (char *name) | ||
63 | unsigned int new_length; | ||
64 | char *tmp_buf = 0; | ||
65 | |||
66 | - bump_line_counters (); | ||
67 | s = input_line_pointer; | ||
68 | if (strncmp (s, "APP\n", 4)) | ||
69 | - continue; /* We ignore it */ | ||
70 | + { | ||
71 | + /* We ignore it */ | ||
72 | + ignore_rest_of_line (); | ||
73 | + continue; | ||
74 | + } | ||
75 | + bump_line_counters (); | ||
76 | s += 4; | ||
77 | |||
78 | sb_new (&sbuf); | ||
79 | @@ -1052,7 +1056,7 @@ read_a_source_file (char *name) | ||
80 | continue; | ||
81 | #endif | ||
82 | input_line_pointer--; | ||
83 | - /* Report unknown char as ignored. */ | ||
84 | + /* Report unknown char as error. */ | ||
85 | demand_empty_rest_of_line (); | ||
86 | } | ||
87 | |||
88 | |||
89 | -- | ||
90 | Andreas Schwab, SuSE Labs, schwab@suse.de | ||
91 | SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany | ||
92 | Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 | ||
93 | "And now for something completely different." | ||
diff --git a/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb b/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb new file mode 100644 index 0000000000..7e165271d7 --- /dev/null +++ b/openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb | |||
@@ -0,0 +1,32 @@ | |||
1 | SECTION = "devel" | ||
2 | include binutils_${PV}.bb | ||
3 | inherit cross | ||
4 | DEPENDS += "flex-native bison-native" | ||
5 | PROVIDES = "virtual/${TARGET_PREFIX}binutils" | ||
6 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}" | ||
7 | PACKAGES = "" | ||
8 | EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \ | ||
9 | --program-prefix=${TARGET_PREFIX}" | ||
10 | |||
11 | do_stage () { | ||
12 | oe_runmake install | ||
13 | |||
14 | # We don't really need these, so we'll remove them... | ||
15 | rm -rf ${CROSS_DIR}/lib/ldscripts | ||
16 | rm -rf ${CROSS_DIR}/share/info | ||
17 | rm -rf ${CROSS_DIR}/share/locale | ||
18 | rm -rf ${CROSS_DIR}/share/man | ||
19 | rmdir ${CROSS_DIR}/share || : | ||
20 | rmdir ${CROSS_DIR}/${libdir}/gcc-lib || : | ||
21 | rmdir ${CROSS_DIR}/${libdir} || : | ||
22 | rmdir ${CROSS_DIR}/${prefix} || : | ||
23 | |||
24 | # We want to move this into the target specific location | ||
25 | mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib | ||
26 | mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib | ||
27 | rmdir ${CROSS_DIR}/lib || : | ||
28 | } | ||
29 | |||
30 | do_install () { | ||
31 | : | ||
32 | } | ||
diff --git a/openembedded/packages/binutils/binutils_2.15.94.0.1.bb b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb index 5edf4548a3..2b2996abe6 100644 --- a/openembedded/packages/binutils/binutils_2.15.94.0.1.bb +++ b/openembedded/packages/binutils/binutils_2.15.94.0.1.bb | |||
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/" | |||
3 | SECTION = "devel" | 3 | SECTION = "devel" |
4 | LICENSE = "GPL" | 4 | LICENSE = "GPL" |
5 | MAINTAINER = "Gerald Britton <gbritton@doomcom.org>" | 5 | MAINTAINER = "Gerald Britton <gbritton@doomcom.org>" |
6 | PR = "r1" | 6 | PR = "r2" |
7 | 7 | ||
8 | inherit autotools gettext | 8 | inherit autotools gettext |
9 | 9 | ||
@@ -42,6 +42,7 @@ SRC_URI = \ | |||
42 | file://ld_makefile.patch;patch=1 \ | 42 | file://ld_makefile.patch;patch=1 \ |
43 | file://better_file_error.patch;patch=1 \ | 43 | file://better_file_error.patch;patch=1 \ |
44 | file://signed_char_fix.patch;patch=1 \ | 44 | file://signed_char_fix.patch;patch=1 \ |
45 | file://objdump_fix.patch;patch=1 \ | ||
45 | file://binutils-100_cflags_for_build.patch;patch=1 \ | 46 | file://binutils-100_cflags_for_build.patch;patch=1 \ |
46 | file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \ | 47 | file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \ |
47 | file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1" | 48 | file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1" |
diff --git a/openembedded/packages/binutils/binutils_2.16.91.0.7.bb b/openembedded/packages/binutils/binutils_2.16.91.0.7.bb new file mode 100644 index 0000000000..664fce8cb7 --- /dev/null +++ b/openembedded/packages/binutils/binutils_2.16.91.0.7.bb | |||
@@ -0,0 +1,123 @@ | |||
1 | DESCRIPTION = "A GNU collection of binary utilities" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/binutils/" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "GPL" | ||
5 | DEFAULT_PREFERENCE = "-1" | ||
6 | |||
7 | inherit autotools gettext | ||
8 | |||
9 | PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks" | ||
10 | |||
11 | FILES_${PN} = " \ | ||
12 | ${bindir}/${TARGET_PREFIX}* \ | ||
13 | ${libdir}/lib*-*.so \ | ||
14 | ${prefix}/${TARGET_SYS}/bin/*" | ||
15 | |||
16 | FILES_${PN}-dev = " \ | ||
17 | ${includedir} \ | ||
18 | ${libdir}/*.a \ | ||
19 | ${libdir}/*.la \ | ||
20 | ${libdir}/libbfd.so \ | ||
21 | ${libdir}/libopcodes.so" | ||
22 | |||
23 | FILES_${PN}-symlinks = " \ | ||
24 | ${bindir}/addr2line \ | ||
25 | ${bindir}/ar \ | ||
26 | ${bindir}/as \ | ||
27 | ${bindir}/c++filt \ | ||
28 | ${bindir}/gprof \ | ||
29 | ${bindir}/ld \ | ||
30 | ${bindir}/nm \ | ||
31 | ${bindir}/objcopy \ | ||
32 | ${bindir}/objdump \ | ||
33 | ${bindir}/ranlib \ | ||
34 | ${bindir}/readelf \ | ||
35 | ${bindir}/size \ | ||
36 | ${bindir}/strings \ | ||
37 | ${bindir}/strip" | ||
38 | |||
39 | SRC_URI = \ | ||
40 | "http://ftp.kernel.org/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \ | ||
41 | file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \ | ||
42 | file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \ | ||
43 | file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \ | ||
44 | file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \ | ||
45 | file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \ | ||
46 | file://binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \ | ||
47 | file://binutils-uclibc-702-binutils-skip-comments.patch;patch=1" | ||
48 | |||
49 | S = "${WORKDIR}/binutils-${PV}" | ||
50 | B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" | ||
51 | |||
52 | EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \ | ||
53 | --enable-shared" | ||
54 | |||
55 | # This is necessary due to a bug in the binutils Makefiles | ||
56 | EXTRA_OEMAKE = "configure-build-libiberty all" | ||
57 | |||
58 | export AR = "${HOST_PREFIX}ar" | ||
59 | export AS = "${HOST_PREFIX}as" | ||
60 | export LD = "${HOST_PREFIX}ld" | ||
61 | export NM = "${HOST_PREFIX}nm" | ||
62 | export RANLIB = "${HOST_PREFIX}ranlib" | ||
63 | export OBJCOPY = "${HOST_PREFIX}objcopy" | ||
64 | export OBJDUMP = "${HOST_PREFIX}objdump" | ||
65 | |||
66 | export AR_FOR_TARGET = "${TARGET_PREFIX}ar" | ||
67 | export AS_FOR_TARGET = "${TARGET_PREFIX}as" | ||
68 | export LD_FOR_TARGET = "${TARGET_PREFIX}ld" | ||
69 | export NM_FOR_TARGET = "${TARGET_PREFIX}nm" | ||
70 | export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib" | ||
71 | |||
72 | export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" | ||
73 | export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" | ||
74 | |||
75 | export CC_FOR_BUILD = "${BUILD_CC}" | ||
76 | export CPP_FOR_BUILD = "${BUILD_CPP}" | ||
77 | export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}" | ||
78 | |||
79 | export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}" | ||
80 | |||
81 | do_configure () { | ||
82 | (cd ${S}; gnu-configize) || die "Failed to run gnu-configize" | ||
83 | oe_runconf | ||
84 | } | ||
85 | |||
86 | do_stage () { | ||
87 | oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ | ||
88 | oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ | ||
89 | oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/ | ||
90 | install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ | ||
91 | install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ | ||
92 | install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ | ||
93 | install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ | ||
94 | install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ | ||
95 | install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ | ||
96 | } | ||
97 | |||
98 | do_install () { | ||
99 | autotools_do_install | ||
100 | |||
101 | # We don't really need these, so we'll remove them... | ||
102 | rm -rf ${D}${libdir}/ldscripts | ||
103 | |||
104 | # Fix the /usr/${TARGET_SYS}/bin/* links | ||
105 | for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do | ||
106 | rm -f $l | ||
107 | ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ | ||
108 | | tr -s / \ | ||
109 | | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l | ||
110 | done | ||
111 | |||
112 | # Install the libiberty header | ||
113 | install -d ${D}${includedir} | ||
114 | install -m 644 ${S}/include/ansidecl.h ${D}${includedir} | ||
115 | install -m 644 ${S}/include/libiberty.h ${D}${includedir} | ||
116 | |||
117 | cd ${D}${bindir} | ||
118 | |||
119 | # Symlinks for ease of running these on the native target | ||
120 | for p in ${TARGET_SYS}-* ; do | ||
121 | ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` | ||
122 | done | ||
123 | } | ||
diff --git a/openembedded/packages/binutils/files/objdump_fix.patch b/openembedded/packages/binutils/files/objdump_fix.patch new file mode 100644 index 0000000000..90ad732c06 --- /dev/null +++ b/openembedded/packages/binutils/files/objdump_fix.patch | |||
@@ -0,0 +1,134 @@ | |||
1 | From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005 | ||
2 | Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com> | ||
3 | Delivered-To: listarch-binutils at sources dot redhat dot com | ||
4 | Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000 | ||
5 | Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm | ||
6 | Precedence: bulk | ||
7 | List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com> | ||
8 | List-Archive: <http://sources.redhat.com/ml/binutils/> | ||
9 | List-Post: <mailto:binutils at sources dot redhat dot com> | ||
10 | List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs> | ||
11 | Sender: binutils-owner at sources dot redhat dot com | ||
12 | Delivered-To: mailing list binutils at sources dot redhat dot com | ||
13 | Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000 | ||
14 | Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94) | ||
15 | by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000 | ||
16 | Received: from bgo1sminn1.broadpark.no ([217.13.4.93]) | ||
17 | by bgo1smout1 dot broadpark dot no | ||
18 | (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004)) | ||
19 | with ESMTP id <0ICB007QZUZCC0C0 at bgo1smout1 dot broadpark dot no> for | ||
20 | binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:18:48 +0100 (CET) | ||
21 | Received: from [127.0.0.1] ([80.202.165.9]) by bgo1sminn1.broadpark.no | ||
22 | (Sun Java System Messaging Server 6 dot 1 HotFix 0 dot 05 (built Oct 21 2004)) | ||
23 | with ESMTP id <0ICB006NCVBVHE21 at bgo1sminn1 dot broadpark dot no> for | ||
24 | binutils at sources dot redhat dot com; Tue, 22 Feb 2005 20:26:20 +0100 (CET) | ||
25 | Date: Tue, 22 Feb 2005 20:24:08 +0100 | ||
26 | From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net> | ||
27 | Subject: [PATCH] objdump relocation fixes for ARM disassembly | ||
28 | To: binutils at sources dot redhat dot com | ||
29 | Message-id: <421B86D8.8080604@users.sourceforge.net> | ||
30 | MIME-version: 1.0 | ||
31 | Content-type: text/plain; charset=ISO-8859-1; format=flowed | ||
32 | Content-transfer-encoding: 7BIT | ||
33 | User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) | ||
34 | |||
35 | Hello, | ||
36 | |||
37 | objdump disassembly did not relocate correctly for the ARM processor. It seems | ||
38 | that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other, | ||
39 | since octets would always be zero) and all relocations would thus fail. I changed the test | ||
40 | so the flag is set when we are about to disassemble an insn that the current relocation | ||
41 | entry points to. I also changed objdump_print_addr to use the current relocation entry if | ||
42 | the insn has such an entry. This causes the symbol printed to be correct for both external | ||
43 | symbols (from the undefined section) and local symbols. | ||
44 | |||
45 | This has only been tested for the ARM processor, but I don't think it should break other | ||
46 | DISASSEMBLER_NEEDS_RELOCS processors either. | ||
47 | |||
48 | |||
49 | binutils/ | ||
50 | |||
51 | 2005-02-22 Stig Petter Olsroed <stigpo@users.sourceforge.net> | ||
52 | |||
53 | * objdump.c (disassemble_bytes): Fixed relocation check for | ||
54 | DISASSEMBLER_NEEDS_RELOCS platforms to properly trigger the | ||
55 | INSN_HAS_RELOC flag. Set the current relocation entry in | ||
56 | objdump_disasm_info to allow printing the proper symbol. | ||
57 | (objdump_print_addr): Use the relocation entry in | ||
58 | objdump_disasm_info to lookup the correct symbol for | ||
59 | DISASSEMBLER_NEEDS_RELOCS platforms. | ||
60 | |||
61 | --- 1/binutils/objdump.c 2005-02-22 01:50:06.000000000 +0100 | ||
62 | +++ 2/binutils/objdump.c 2005-02-22 14:27:33.066960900 +0100 | ||
63 | @@ -128,6 +128,7 @@ | ||
64 | arelent ** dynrelbuf; | ||
65 | long dynrelcount; | ||
66 | disassembler_ftype disassemble_fn; | ||
67 | + arelent * reloc; | ||
68 | }; | ||
69 | |||
70 | /* Architecture to disassemble for, or default if NULL. */ | ||
71 | @@ -852,6 +853,8 @@ | ||
72 | { | ||
73 | struct objdump_disasm_info *aux; | ||
74 | asymbol *sym; | ||
75 | + arelent *q; | ||
76 | + int skip_find = 0; | ||
77 | |||
78 | if (sorted_symcount < 1) | ||
79 | { | ||
80 | @@ -861,6 +864,22 @@ | ||
81 | } | ||
82 | |||
83 | aux = (struct objdump_disasm_info *) info->application_data; | ||
84 | + | ||
85 | + q = aux->reloc; | ||
86 | + if (q != NULL) | ||
87 | + { | ||
88 | + if (q->sym_ptr_ptr != NULL && *q->sym_ptr_ptr != NULL) | ||
89 | + { | ||
90 | + /* Adjust the vma to the reloc */ | ||
91 | + vma += bfd_asymbol_value (*q->sym_ptr_ptr); | ||
92 | + if (bfd_is_und_section (bfd_get_section (*q->sym_ptr_ptr))) | ||
93 | + { | ||
94 | + skip_find = 1; | ||
95 | + sym = *q->sym_ptr_ptr; | ||
96 | + } | ||
97 | + } | ||
98 | + } | ||
99 | + if (!skip_find) | ||
100 | sym = find_symbol_for_address (vma, info, NULL); | ||
101 | objdump_print_addr_with_sym (aux->abfd, aux->sec, sym, vma, info, | ||
102 | skip_zeroes); | ||
103 | @@ -1350,16 +1369,22 @@ | ||
104 | info->bytes_per_chunk = 0; | ||
105 | |||
106 | #ifdef DISASSEMBLER_NEEDS_RELOCS | ||
107 | - /* FIXME: This is wrong. It tests the number of octets | ||
108 | - in the last instruction, not the current one. */ | ||
109 | - if (*relppp < relppend | ||
110 | - && (**relppp)->address >= rel_offset + addr_offset | ||
111 | - && ((**relppp)->address | ||
112 | - < rel_offset + addr_offset + octets / opb)) | ||
113 | + /* Check if the current relocation entry applies to the | ||
114 | + instruction we are about to disassemble. | ||
115 | + This works for ARM at least. | ||
116 | + */ | ||
117 | + if ((*relppp) < relppend | ||
118 | + && ((**relppp)->address == rel_offset + addr_offset)) | ||
119 | + { | ||
120 | info->flags = INSN_HAS_RELOC; | ||
121 | + aux->reloc = **relppp; | ||
122 | + } | ||
123 | else | ||
124 | #endif | ||
125 | + { | ||
126 | info->flags = 0; | ||
127 | + aux->reloc = NULL; | ||
128 | + } | ||
129 | |||
130 | octets = (*disassemble_fn) (section->vma + addr_offset, info); | ||
131 | info->fprintf_func = (fprintf_ftype) fprintf; | ||
132 | |||
133 | |||
134 | |||
diff --git a/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb new file mode 100644 index 0000000000..48c80864e2 --- /dev/null +++ b/openembedded/packages/gcc/gcc-cross-initial_csl-arm-2005q3.bb | |||
@@ -0,0 +1,28 @@ | |||
1 | include gcc-cross_${PV}.bb | ||
2 | |||
3 | DEPENDS = "virtual/${TARGET_PREFIX}binutils" | ||
4 | DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}" | ||
5 | PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial" | ||
6 | PACKAGES = "" | ||
7 | |||
8 | # This is intended to be a -very- basic config | ||
9 | EXTRA_OECONF = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \ | ||
10 | --with-newlib \ | ||
11 | --disable-shared \ | ||
12 | --disable-threads \ | ||
13 | --disable-multilib \ | ||
14 | --disable-__cxa_atexit \ | ||
15 | --enable-languages=c \ | ||
16 | --enable-target-optspace \ | ||
17 | --program-prefix=${TARGET_PREFIX} \ | ||
18 | ${@get_gcc_fpu_setting(bb, d)}" | ||
19 | |||
20 | do_stage_prepend () { | ||
21 | mkdir -p ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV} | ||
22 | ln -sf libgcc.a ${CROSS_DIR}/lib/gcc/${TARGET_SYS}/${BINV}/libgcc_eh.a | ||
23 | } | ||
24 | |||
25 | # Override the method from gcc-cross so we don't try to install libgcc | ||
26 | do_install () { | ||
27 | oe_runmake 'DESTDIR=${D}' install | ||
28 | } | ||
diff --git a/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb new file mode 100644 index 0000000000..93c58aca53 --- /dev/null +++ b/openembedded/packages/gcc/gcc-cross_csl-arm-2005q3.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | include gcc_csl-arm-2005q3.bb | ||
2 | # path mangling, needed by the cross packaging | ||
3 | include gcc-paths-cross.inc | ||
4 | inherit cross | ||
5 | # NOTE: split PR. If the main .oe changes something that affects its *build* | ||
6 | # remember to increment this one too. | ||
7 | PR = "r0" | ||
8 | |||
9 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc" | ||
10 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | ||
11 | |||
12 | # cross build | ||
13 | include gcc3-cross-build.inc | ||
14 | # cross packaging | ||
15 | include gcc-package-cross.inc | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/15342.patch b/openembedded/packages/gcc/gcc-csl-arm/15342.patch new file mode 100644 index 0000000000..d0f3e72d47 --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/15342.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | --- gcc/gcc/regrename.c~ 2004-01-14 17:55:20.000000000 +0000 | ||
2 | +++ gcc/gcc/regrename.c 2005-02-28 07:24:25.893015200 +0000 | ||
3 | @@ -671,7 +671,8 @@ | ||
4 | |||
5 | case SET: | ||
6 | scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0); | ||
7 | - scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0); | ||
8 | + scan_rtx (insn, &SET_DEST (x), class, action, | ||
9 | + GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0); | ||
10 | return; | ||
11 | |||
12 | case STRICT_LOW_PART: | ||
13 | @@ -696,7 +697,8 @@ | ||
14 | abort (); | ||
15 | |||
16 | case CLOBBER: | ||
17 | - scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1); | ||
18 | + scan_rtx (insn, &SET_DEST (x), class, action, | ||
19 | + GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0); | ||
20 | return; | ||
21 | |||
22 | case EXPR_LIST: | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch new file mode 100644 index 0000000000..cf17da6a02 --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/gcc-3.4.0-arm-lib1asm.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | # Fixes errors like the following when building glibc (or any other executable | ||
2 | # or shared library) when using gcc 3.4.0 for ARM with softfloat: | ||
3 | # | ||
4 | # .../libc_pic.os(.text+0x15834): In function `__modf': undefined reference to `__subdf3' | ||
5 | # .../libc_pic.os(.text+0x158b8): In function `__modf': undefined reference to `__subdf3' | ||
6 | # .../libc_pic.os(.text+0x1590c): In function `scalbn': undefined reference to `__muldf3' | ||
7 | # .../libc_pic.os(.text+0x15e94): In function `__ldexpf': undefined reference to `__eqsf2' | ||
8 | # .../libc_pic.os(.text+0xcee4c): In function `monstartup': undefined reference to `__fixsfsi' | ||
9 | |||
10 | diff -urNd gcc-3.4.0-orig/gcc/config/arm/t-linux gcc-3.4.0/gcc/config/arm/t-linux | ||
11 | --- gcc-3.4.0-orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200 | ||
12 | +++ gcc-3.4.0/gcc/config/arm/t-linux 2004-05-01 20:31:59.102846400 +0200 | ||
13 | @@ -4,7 +4,10 @@ | ||
14 | LIBGCC2_DEBUG_CFLAGS = -g0 | ||
15 | |||
16 | LIB1ASMSRC = arm/lib1funcs.asm | ||
17 | -LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx | ||
18 | +LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \ | ||
19 | + _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \ | ||
20 | + _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \ | ||
21 | + _fixsfsi _fixunssfsi _floatdidf _floatdisf | ||
22 | |||
23 | # MULTILIB_OPTIONS = mhard-float/msoft-float | ||
24 | # MULTILIB_DIRNAMES = hard-float soft-float | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch new file mode 100644 index 0000000000..cdb20bef9b --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/gcc34-arm-tune.patch | |||
@@ -0,0 +1,9 @@ | |||
1 | --- gcc-3.4.0/gcc/config/arm/linux-elf.h.arm-tune 2004-01-31 01:18:11.000000000 -0500 | ||
2 | +++ gcc-3.4.0/gcc/config/arm/linux-elf.h 2004-04-24 18:19:10.000000000 -0400 | ||
3 | @@ -126,3 +126,6 @@ | ||
4 | |||
5 | #define LINK_GCC_C_SEQUENCE_SPEC \ | ||
6 | "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" | ||
7 | + | ||
8 | +/* Tune for XScale. */ | ||
9 | +#define TARGET_TUNE_DEFAULT TARGET_CPU_xscale | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch b/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch new file mode 100644 index 0000000000..fa21b26554 --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/gcc_optab_arm.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | ARM is the only architecture that has a helper function that returns | ||
2 | an unbiased result. This fix is trivial enough that we can show it | ||
3 | doesn't effect any of the other arches. Can we consider this a | ||
4 | regression fix since it used to work until the helper was added :} | ||
5 | |||
6 | Tested with no regressions on x86_64-pc-linux-gnu and arm-none-eabi. | ||
7 | |||
8 | Cheers, | ||
9 | Carlos. | ||
10 | -- | ||
11 | Carlos O'Donell | ||
12 | CodeSourcery | ||
13 | carlos@codesourcery.com | ||
14 | (650) 331-3385 x716 | ||
15 | |||
16 | gcc/ | ||
17 | |||
18 | 2006-01-27 Carlos O'Donell <carlos@codesourcery.com> | ||
19 | |||
20 | * optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias | ||
21 | the comparison routine return. | ||
22 | |||
23 | gcc/testsuite/ | ||
24 | |||
25 | 2006-01-27 Carlos O'Donell <carlos@codesourcery.com> | ||
26 | |||
27 | * gcc.dg/unsigned-long-compare.c: New test. | ||
28 | |||
29 | Index: gcc/optabs.c | ||
30 | =================================================================== | ||
31 | --- 1/gcc/optabs.c (revision 110300) | ||
32 | +++ 2/gcc/optabs.c (working copy) | ||
33 | @@ -3711,18 +3711,24 @@ | ||
34 | result = emit_library_call_value (libfunc, NULL_RTX, LCT_CONST_MAKE_BLOCK, | ||
35 | word_mode, 2, x, mode, y, mode); | ||
36 | |||
37 | + /* There are two kinds of comparison routines. Biased routines | ||
38 | + return 0/1/2, and unbiased routines return -1/0/1. Other parts | ||
39 | + of gcc expect that the comparison operation is equivalent | ||
40 | + to the modified comparison. For signed comparisons compare the | ||
41 | + result against 1 in the unbiased case, and zero in the biased | ||
42 | + case. For unsigned comparisons always compare against 1 after | ||
43 | + biasing the unbased result by adding 1. This gives us a way to | ||
44 | + represent LTU. */ | ||
45 | *px = result; | ||
46 | *pmode = word_mode; | ||
47 | - if (TARGET_LIB_INT_CMP_BIASED) | ||
48 | - /* Integer comparison returns a result that must be compared | ||
49 | - against 1, so that even if we do an unsigned compare | ||
50 | - afterward, there is still a value that can represent the | ||
51 | - result "less than". */ | ||
52 | - *py = const1_rtx; | ||
53 | - else | ||
54 | + *py = const1_rtx; | ||
55 | + | ||
56 | + if (!TARGET_LIB_INT_CMP_BIASED) | ||
57 | { | ||
58 | - *py = const0_rtx; | ||
59 | - *punsignedp = 1; | ||
60 | + if (*punsignedp) | ||
61 | + *px = plus_constant (result, 1); | ||
62 | + else | ||
63 | + *py = const0_rtx; | ||
64 | } | ||
65 | return; | ||
66 | } | ||
67 | Index: gcc/testsuite/gcc.dg/unsigned-long-compare.c | ||
68 | =================================================================== | ||
69 | --- 1/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0) | ||
70 | +++ 2/gcc/testsuite/gcc.dg/unsigned-long-compare.c (revision 0) | ||
71 | @@ -0,0 +1,24 @@ | ||
72 | +/* Copyright (C) 2006 Free Software Foundation, Inc. */ | ||
73 | +/* Contributed by Carlos O'Donell on 2006-01-27 */ | ||
74 | + | ||
75 | +/* Test a division corner case where the expression simplifies | ||
76 | + to a comparison, and the optab expansion is wrong. The optab | ||
77 | + expansion emits a function whose return is unbiased and needs | ||
78 | + adjustment. */ | ||
79 | +/* Origin: Carlos O'Donell <carlos@codesourcery.com> */ | ||
80 | +/* { dg-do run { target arm-*-*eabi* } } */ | ||
81 | +/* { dg-options "" } */ | ||
82 | +#include <stdlib.h> | ||
83 | + | ||
84 | +#define BIG_CONSTANT 0xFFFFFFFF80000000ULL | ||
85 | + | ||
86 | +int main (void) | ||
87 | +{ | ||
88 | + unsigned long long OneULL = 1ULL; | ||
89 | + unsigned long long result; | ||
90 | + | ||
91 | + result = OneULL / BIG_CONSTANT; | ||
92 | + if (result) | ||
93 | + abort (); | ||
94 | + exit (0); | ||
95 | +} | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch b/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch new file mode 100644 index 0000000000..e5d12cfb4f --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/no-libfloat.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- gcc/gcc/config/arm/linux-elf.h.old 2005-04-20 00:46:28.923375320 +0100 | ||
2 | +++ gcc/gcc/config/arm/linux-elf.h 2005-04-20 00:46:34.181575952 +0100 | ||
3 | @@ -56,7 +56,7 @@ | ||
4 | %{shared:-lc} \ | ||
5 | %{!shared:%{profile:-lc_p}%{!profile:-lc}}" | ||
6 | |||
7 | -#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" | ||
8 | +#define LIBGCC_SPEC "-lgcc" | ||
9 | |||
10 | /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add | ||
11 | the GNU/Linux magical crtbegin.o file (see crtstuff.c) which | ||
diff --git a/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch b/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch new file mode 100644 index 0000000000..9a49794da4 --- /dev/null +++ b/openembedded/packages/gcc/gcc-csl-arm/pic-without-sl.patch | |||
@@ -0,0 +1,303 @@ | |||
1 | Index: gcc/config/arm/arm-protos.h | ||
2 | =================================================================== | ||
3 | RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm-protos.h,v | ||
4 | retrieving revision 1.60.4.20 | ||
5 | diff -u -r1.60.4.20 arm-protos.h | ||
6 | --- gcc/config/arm/arm-protos.h 29 Mar 2005 03:00:11 -0000 1.60.4.20 | ||
7 | +++ gcc/config/arm/arm-protos.h 23 Apr 2005 04:41:06 -0000 | ||
8 | @@ -64,6 +64,7 @@ | ||
9 | extern enum reg_class vfp_secondary_reload_class (enum machine_mode, rtx); | ||
10 | extern int tls_symbolic_operand (rtx, enum machine_mode); | ||
11 | extern bool arm_tls_operand_p (rtx x); | ||
12 | +extern bool arm_pc_pic_operand_p (rtx x); | ||
13 | |||
14 | /* Predicates. */ | ||
15 | extern int s_register_operand (rtx, enum machine_mode); | ||
16 | Index: gcc/config/arm/arm.c | ||
17 | =================================================================== | ||
18 | RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.c,v | ||
19 | retrieving revision 1.303.2.79 | ||
20 | diff -u -r1.303.2.79 arm.c | ||
21 | --- gcc/config/arm/arm.c 12 Apr 2005 06:17:07 -0000 1.303.2.79 | ||
22 | +++ gcc/config/arm/arm.c 23 Apr 2005 04:41:09 -0000 | ||
23 | @@ -1003,7 +1003,7 @@ | ||
24 | |||
25 | /* If stack checking is disabled, we can use r10 as the PIC register, | ||
26 | which keeps r9 available. */ | ||
27 | - if (flag_pic) | ||
28 | + if (0 && flag_pic) | ||
29 | arm_pic_register = TARGET_APCS_STACK ? 9 : 10; | ||
30 | |||
31 | if (TARGET_APCS_FLOAT) | ||
32 | @@ -3120,6 +3120,10 @@ | ||
33 | rtx | ||
34 | legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) | ||
35 | { | ||
36 | + if (GET_CODE (orig) == UNSPEC | ||
37 | + && XINT (orig, 1) == UNSPEC_GOTSLOTPC) | ||
38 | + abort (); | ||
39 | + | ||
40 | if (GET_CODE (orig) == SYMBOL_REF | ||
41 | || GET_CODE (orig) == LABEL_REF) | ||
42 | { | ||
43 | @@ -3149,27 +3153,80 @@ | ||
44 | else | ||
45 | address = reg; | ||
46 | |||
47 | - if (TARGET_ARM) | ||
48 | - emit_insn (gen_pic_load_addr_arm (address, orig)); | ||
49 | - else | ||
50 | - emit_insn (gen_pic_load_addr_thumb (address, orig)); | ||
51 | + if (arm_pic_register != INVALID_REGNUM) | ||
52 | + { | ||
53 | + /* Using GP-based PIC addressing. */ | ||
54 | + if (TARGET_ARM) | ||
55 | + emit_insn (gen_pic_load_addr_arm (address, orig)); | ||
56 | + else | ||
57 | + emit_insn (gen_pic_load_addr_thumb (address, orig)); | ||
58 | + | ||
59 | + if ((GET_CODE (orig) == LABEL_REF | ||
60 | + || (GET_CODE (orig) == SYMBOL_REF && | ||
61 | + SYMBOL_REF_LOCAL_P (orig))) | ||
62 | + && NEED_GOT_RELOC) | ||
63 | + pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address); | ||
64 | + else | ||
65 | + { | ||
66 | + pic_ref = gen_rtx_MEM (Pmode, | ||
67 | + gen_rtx_PLUS (Pmode, pic_offset_table_rtx, | ||
68 | + address)); | ||
69 | + RTX_UNCHANGING_P (pic_ref) = 1; | ||
70 | + } | ||
71 | |||
72 | - if ((GET_CODE (orig) == LABEL_REF | ||
73 | - || (GET_CODE (orig) == SYMBOL_REF && | ||
74 | - SYMBOL_REF_LOCAL_P (orig))) | ||
75 | - && NEED_GOT_RELOC) | ||
76 | - pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, address); | ||
77 | + current_function_uses_pic_offset_table = 1; | ||
78 | + } | ||
79 | else | ||
80 | { | ||
81 | - pic_ref = gen_rtx_MEM (Pmode, | ||
82 | - gen_rtx_PLUS (Pmode, pic_offset_table_rtx, | ||
83 | - address)); | ||
84 | - RTX_UNCHANGING_P (pic_ref) = 1; | ||
85 | + /* Using PC-based PIC addressing. */ | ||
86 | + rtx label, tmp; | ||
87 | + int offset; | ||
88 | + | ||
89 | + label = gen_label_rtx (); | ||
90 | + offset = TARGET_ARM ? 8 : 4; | ||
91 | + | ||
92 | + if (GET_CODE (orig) == LABEL_REF | ||
93 | + || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig))) | ||
94 | + { | ||
95 | + /* This symbol is defined locally. We don't need a GOT entry. */ | ||
96 | + tmp = gen_rtx_MINUS (Pmode, gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_PIC_SYM), gen_rtx_PLUS (Pmode, | ||
97 | + gen_rtx_LABEL_REF (Pmode, label), | ||
98 | + GEN_INT (offset))); | ||
99 | + | ||
100 | + load_tls_operand (tmp, address); | ||
101 | + | ||
102 | + if (TARGET_ARM) | ||
103 | + emit_insn (gen_pic_add_dot_plus_eight (address, label)); | ||
104 | + else | ||
105 | + emit_insn (gen_pic_add_dot_plus_four (address, label)); | ||
106 | + } | ||
107 | + else | ||
108 | + { | ||
109 | + rtx x = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, orig), UNSPEC_GOTSLOTPC); | ||
110 | + rtx dummy_label; | ||
111 | + | ||
112 | + dummy_label = gen_label_rtx (); | ||
113 | + LABEL_PRESERVE_P (dummy_label) = 1; | ||
114 | + LABEL_NUSES (dummy_label) = 1; | ||
115 | + | ||
116 | + tmp = gen_rtx_MINUS (Pmode, x, gen_rtx_PLUS (Pmode, | ||
117 | + gen_rtx_LABEL_REF (Pmode, label), | ||
118 | + GEN_INT (offset))); | ||
119 | + | ||
120 | + load_tls_operand (tmp, address); | ||
121 | + | ||
122 | + if (TARGET_ARM) | ||
123 | + emit_insn (gen_tls_load_dot_plus_eight (address, address, label, dummy_label)); | ||
124 | + else | ||
125 | + emit_insn (gen_tls_load_dot_plus_four (address, address, label, dummy_label)); | ||
126 | + } | ||
127 | + | ||
128 | + pic_ref = address; | ||
129 | } | ||
130 | |||
131 | insn = emit_move_insn (reg, pic_ref); | ||
132 | #endif | ||
133 | - current_function_uses_pic_offset_table = 1; | ||
134 | + | ||
135 | /* Put a REG_EQUAL note on this insn, so that it can be optimized | ||
136 | by loop. */ | ||
137 | REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, orig, | ||
138 | @@ -3179,11 +3236,17 @@ | ||
139 | else if (GET_CODE (orig) == CONST) | ||
140 | { | ||
141 | rtx base, offset; | ||
142 | + bool minus = FALSE; | ||
143 | |||
144 | if (GET_CODE (XEXP (orig, 0)) == PLUS | ||
145 | && XEXP (XEXP (orig, 0), 0) == pic_offset_table_rtx) | ||
146 | return orig; | ||
147 | |||
148 | + if (GET_CODE (XEXP (orig, 0)) == MINUS | ||
149 | + && GET_CODE (XEXP (XEXP (orig, 0), 0)) == UNSPEC | ||
150 | + && XINT (XEXP (XEXP (orig, 0), 0), 1) == UNSPEC_GOTSLOTPC) | ||
151 | + return orig; | ||
152 | + | ||
153 | if (GET_CODE (XEXP (orig, 0)) == UNSPEC) | ||
154 | return orig; | ||
155 | |||
156 | @@ -3201,6 +3264,13 @@ | ||
157 | offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode, | ||
158 | base == reg ? 0 : reg); | ||
159 | } | ||
160 | + else if (GET_CODE (XEXP (orig, 0)) == MINUS) | ||
161 | + { | ||
162 | + minus = TRUE; | ||
163 | + base = legitimize_pic_address (XEXP (XEXP (orig, 0), 0), Pmode, reg); | ||
164 | + offset = legitimize_pic_address (XEXP (XEXP (orig, 0), 1), Pmode, | ||
165 | + base == reg ? 0 : reg); | ||
166 | + } | ||
167 | else | ||
168 | abort (); | ||
169 | |||
170 | @@ -3228,7 +3298,7 @@ | ||
171 | return reg; | ||
172 | } | ||
173 | |||
174 | - return gen_rtx_PLUS (Pmode, base, offset); | ||
175 | + return minus ? gen_rtx_MINUS (Pmode, base, offset) : gen_rtx_PLUS (Pmode, base, offset); | ||
176 | } | ||
177 | |||
178 | return orig; | ||
179 | @@ -3267,7 +3337,7 @@ | ||
180 | rtx l1, pic_tmp, pic_tmp2, pic_rtx; | ||
181 | rtx global_offset_table; | ||
182 | |||
183 | - if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE) | ||
184 | + if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE || arm_pic_register == INVALID_REGNUM) | ||
185 | return; | ||
186 | |||
187 | if (!flag_pic) | ||
188 | @@ -3341,8 +3411,11 @@ | ||
189 | static int | ||
190 | pcrel_constant_p (rtx x) | ||
191 | { | ||
192 | + if (GET_CODE (x) == CONST) | ||
193 | + return pcrel_constant_p (XEXP (x, 0)); | ||
194 | + | ||
195 | if (GET_CODE (x) == MINUS) | ||
196 | - return symbol_mentioned_p (XEXP (x, 0)) && label_mentioned_p (XEXP (x, 1)); | ||
197 | + return (((GET_CODE (XEXP (x, 0)) == UNSPEC && XINT (XEXP (x, 0), 1) == UNSPEC_PIC_SYM)) || symbol_mentioned_p (XEXP (x, 0))) && label_mentioned_p (XEXP (x, 1)); | ||
198 | |||
199 | if (GET_CODE (x) == UNSPEC | ||
200 | && XINT (x, 1) == UNSPEC_TLS | ||
201 | @@ -3946,12 +4019,32 @@ | ||
202 | return SYMBOL_REF_TLS_MODEL (op); | ||
203 | } | ||
204 | |||
205 | +bool | ||
206 | +arm_pc_pic_operand_p (rtx op) | ||
207 | +{ | ||
208 | + if (GET_CODE (op) == CONST | ||
209 | + && GET_CODE (XEXP (op, 0)) == MINUS | ||
210 | + && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC | ||
211 | + && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_GOTSLOTPC) | ||
212 | + return 1; | ||
213 | + | ||
214 | + if (GET_CODE (op) == CONST | ||
215 | + && GET_CODE (XEXP (op, 0)) == MINUS | ||
216 | + && GET_CODE (XEXP (XEXP (op, 0), 0)) == UNSPEC | ||
217 | + && XINT (XEXP (XEXP (op, 0), 0), 1) == UNSPEC_PIC_SYM) | ||
218 | + return 1; | ||
219 | + | ||
220 | + return 0; | ||
221 | +} | ||
222 | + | ||
223 | /* Valid input to a move instruction. */ | ||
224 | int | ||
225 | move_input_operand (rtx op, enum machine_mode mode) | ||
226 | { | ||
227 | if (tls_symbolic_operand (op, mode)) | ||
228 | return 0; | ||
229 | + if (pcrel_constant_p (op)) | ||
230 | + return 1; | ||
231 | return general_operand (op, mode); | ||
232 | } | ||
233 | |||
234 | @@ -15634,11 +15727,34 @@ | ||
235 | return TRUE; | ||
236 | } | ||
237 | |||
238 | +static bool | ||
239 | +arm_emit_got_decoration (FILE *fp, rtx x) | ||
240 | +{ | ||
241 | + rtx val; | ||
242 | + | ||
243 | + val = XVECEXP (x, 0, 0); | ||
244 | + | ||
245 | + fputs ("_gotslotpc_(", fp); | ||
246 | + | ||
247 | + output_addr_const (fp, val); | ||
248 | + | ||
249 | + fputc (')', fp); | ||
250 | + | ||
251 | + return TRUE; | ||
252 | +} | ||
253 | + | ||
254 | bool | ||
255 | arm_output_addr_const_extra (FILE *fp, rtx x) | ||
256 | { | ||
257 | if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_TLS) | ||
258 | return arm_emit_tls_decoration (fp, x); | ||
259 | + else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_GOTSLOTPC) | ||
260 | + return arm_emit_got_decoration (fp, x); | ||
261 | + else if (GET_CODE (x) == UNSPEC && XINT (x, 1) == UNSPEC_PIC_SYM) | ||
262 | + { | ||
263 | + output_addr_const (fp, XVECEXP (x, 0, 0)); | ||
264 | + return TRUE; | ||
265 | + } | ||
266 | else if (GET_CODE (x) == CONST_VECTOR) | ||
267 | return arm_emit_vector_const (fp, x); | ||
268 | |||
269 | Index: gcc/config/arm/arm.md | ||
270 | =================================================================== | ||
271 | RCS file: /cvsroot/gcc/gcc/gcc/config/arm/arm.md,v | ||
272 | retrieving revision 1.145.2.31 | ||
273 | diff -u -r1.145.2.31 arm.md | ||
274 | --- gcc/config/arm/arm.md 28 Mar 2005 19:04:37 -0000 1.145.2.31 | ||
275 | +++ gcc/config/arm/arm.md 23 Apr 2005 04:41:11 -0000 | ||
276 | @@ -88,6 +88,7 @@ | ||
277 | (UNSPEC_WMADDS 18) ; Used by the intrinsic form of the iWMMXt WMADDS instruction. | ||
278 | (UNSPEC_WMADDU 19) ; Used by the intrinsic form of the iWMMXt WMADDU instruction. | ||
279 | (UNSPEC_TLS 20) ; A symbol that has been treated properly for TLS usage. | ||
280 | + (UNSPEC_GOTSLOTPC 21) | ||
281 | ] | ||
282 | ) | ||
283 | |||
284 | @@ -4179,7 +4180,8 @@ | ||
285 | && (CONSTANT_P (operands[1]) | ||
286 | || symbol_mentioned_p (operands[1]) | ||
287 | || label_mentioned_p (operands[1])) | ||
288 | - && ! tls_mentioned_p (operands[1])) | ||
289 | + && ! tls_mentioned_p (operands[1]) | ||
290 | + && ! arm_pc_pic_operand_p (operands[1])) | ||
291 | operands[1] = legitimize_pic_address (operands[1], SImode, | ||
292 | (no_new_pseudos ? operands[0] : 0)); | ||
293 | } | ||
294 | @@ -4412,7 +4414,8 @@ | ||
295 | (mem:SI (unspec:SI [(plus:SI (match_dup 0) | ||
296 | (const (plus:SI (pc) (const_int 8))))] | ||
297 | UNSPEC_PIC_BASE))) | ||
298 | - (use (label_ref (match_operand 1 "" "")))])] | ||
299 | + (use (label_ref (match_operand 1 "" ""))) | ||
300 | + (use (label_ref (match_operand 1 "" "")))])] | ||
301 | "" | ||
302 | ) | ||
303 | |||
diff --git a/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb b/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb new file mode 100644 index 0000000000..62bacda147 --- /dev/null +++ b/openembedded/packages/gcc/gcc_csl-arm-2005q3.bb | |||
@@ -0,0 +1,27 @@ | |||
1 | DESCRIPTION = "The GNU cc and gcc C compilers." | ||
2 | HOMEPAGE = "http://www.gnu.org/software/gcc/" | ||
3 | SECTION = "devel" | ||
4 | LICENSE = "GPL" | ||
5 | BINV = "3.4.4" | ||
6 | PV = "3.4.4+csl-arm-2005q3" | ||
7 | PR = "r1" | ||
8 | |||
9 | FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm" | ||
10 | |||
11 | inherit autotools gettext | ||
12 | |||
13 | include gcc-package.inc | ||
14 | |||
15 | SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm/2005q3-2/arm-2005q3-2-arm-none-linux-gnueabi.src.tar.bz2 \ | ||
16 | file://gcc_optab_arm.patch;patch=1" | ||
17 | |||
18 | do_unpack2() { | ||
19 | cd ${WORKDIR} | ||
20 | tar -xvjf ./arm-2005q3-2-arm-none-linux-gnueabi/gcc-2005q3-2.tar.bz2 | ||
21 | } | ||
22 | |||
23 | addtask unpack2 after do_unpack before do_patch | ||
24 | |||
25 | include gcc3-build.inc | ||
26 | |||
27 | S = "${WORKDIR}/gcc-2005q3" | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/arm-longlong.patch b/openembedded/packages/glibc/glibc-2.4/arm-longlong.patch new file mode 100644 index 0000000000..320a55524c --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/arm-longlong.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | --- glibc-2.4/stdlib/longlong.h.ark 2006-03-11 22:49:27.000000000 +0100 | ||
2 | +++ glibc-2.4/stdlib/longlong.h 2006-03-11 22:55:12.000000000 +0100 | ||
3 | @@ -206,6 +206,14 @@ | ||
4 | "rI" ((USItype) (bh)), \ | ||
5 | "r" ((USItype) (al)), \ | ||
6 | "rI" ((USItype) (bl)) __CLOBBER_CC) | ||
7 | +/* v3m and all higher arches have long multiply support. */ | ||
8 | +#if !defined(__ARM_ARCH_2__) && !defined(__ARM_ARCH_3__) | ||
9 | +#define umul_ppmm(xh, xl, a, b) \ | ||
10 | + __asm__ ("umull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) | ||
11 | +#define UMUL_TIME 5 | ||
12 | +#define smul_ppmm(xh, xl, a, b) \ | ||
13 | + __asm__ ("smull %0,%1,%2,%3" : "=&r" (xl), "=&r" (xh) : "r" (a), "r" (b)) | ||
14 | +#else | ||
15 | #define umul_ppmm(xh, xl, a, b) \ | ||
16 | {register USItype __t0, __t1, __t2; \ | ||
17 | __asm__ ("%@ Inlined umul_ppmm\n" \ | ||
18 | @@ -227,7 +235,13 @@ | ||
19 | : "r" ((USItype) (a)), \ | ||
20 | "r" ((USItype) (b)) __CLOBBER_CC );} | ||
21 | #define UMUL_TIME 20 | ||
22 | +#endif | ||
23 | #define UDIV_TIME 100 | ||
24 | +#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) | ||
25 | +#define count_leading_zeros(COUNT,X) ((COUNT) = __builtin_clz (X)) | ||
26 | +#define COUNT_LEADING_ZEROS_0 32 | ||
27 | +#endif | ||
28 | + | ||
29 | #endif /* __arm__ */ | ||
30 | |||
31 | #if defined (__hppa) && W_TYPE_SIZE == 32 | ||
32 | --- glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c.ark 2006-03-11 22:56:43.000000000 +0100 | ||
33 | +++ glibc-2.4/ports/sysdeps/arm/mp_clz_tab.c 2006-03-11 22:58:19.000000000 +0100 | ||
34 | @@ -0,0 +1,24 @@ | ||
35 | +/* __clz_tab -- support for longlong.h | ||
36 | + Copyright (C) 2004 Free Software Foundation, Inc. | ||
37 | + This file is part of the GNU C Library. | ||
38 | + | ||
39 | + The GNU C Library is free software; you can redistribute it and/or | ||
40 | + modify it under the terms of the GNU Lesser General Public | ||
41 | + License as published by the Free Software Foundation; either | ||
42 | + version 2.1 of the License, or (at your option) any later version. | ||
43 | + | ||
44 | + The GNU C Library is distributed in the hope that it will be useful, | ||
45 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
46 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
47 | + Lesser General Public License for more details. | ||
48 | + | ||
49 | + You should have received a copy of the GNU Lesser General Public | ||
50 | + License along with the GNU C Library; if not, write to the Free | ||
51 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
52 | + 02111-1307 USA. */ | ||
53 | + | ||
54 | +#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) | ||
55 | +/* Nothing required. */ | ||
56 | +#else | ||
57 | +#include <sysdeps/generic/mp_clz_tab.c> | ||
58 | +#endif | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch b/openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch new file mode 100644 index 0000000000..bc2b3dab84 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/arm-memcpy.patch | |||
@@ -0,0 +1,758 @@ | |||
1 | --- /dev/null 2004-02-02 20:32:13.000000000 +0000 | ||
2 | +++ sysdeps/arm/memmove.S 2004-03-20 18:37:23.000000000 +0000 | ||
3 | @@ -0,0 +1,251 @@ | ||
4 | +/* | ||
5 | + * Optimized memmove implementation for ARM processors | ||
6 | + * | ||
7 | + * Author: Nicolas Pitre | ||
8 | + * Created: Dec 23, 2003 | ||
9 | + * Copyright: (C) MontaVista Software, Inc. | ||
10 | + * | ||
11 | + * This file is free software; you can redistribute it and/or | ||
12 | + * modify it under the terms of the GNU Lesser General Public | ||
13 | + * License as published by the Free Software Foundation; either | ||
14 | + * version 2.1 of the License, or (at your option) any later version. | ||
15 | + * | ||
16 | + * This file is distributed in the hope that it will be useful, | ||
17 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
18 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
19 | + * Lesser General Public License for more details. | ||
20 | + */ | ||
21 | + | ||
22 | +#include <sysdep.h> | ||
23 | + | ||
24 | + | ||
25 | +/* | ||
26 | + * Endian independent macros for shifting bytes within registers. | ||
27 | + */ | ||
28 | +#ifndef __ARMEB__ | ||
29 | +#define pull lsr | ||
30 | +#define push lsl | ||
31 | +#else | ||
32 | +#define pull lsl | ||
33 | +#define push lsr | ||
34 | +#endif | ||
35 | + | ||
36 | +/* | ||
37 | + * Enable data preload for architectures that support it (ARMv5 and above) | ||
38 | + */ | ||
39 | +#if defined(__ARM_ARCH_5__) || \ | ||
40 | + defined(__ARM_ARCH_5T__) || \ | ||
41 | + defined(__ARM_ARCH_5TE__) | ||
42 | +#define PLD(code...) code | ||
43 | +#else | ||
44 | +#define PLD(code...) | ||
45 | +#endif | ||
46 | + | ||
47 | + | ||
48 | +/* char * memmove (char *dst, const char *src) */ | ||
49 | +ENTRY(memmove) | ||
50 | + subs ip, r0, r1 | ||
51 | + cmphi r2, ip | ||
52 | + bls memcpy(PLT) | ||
53 | + | ||
54 | + stmfd sp!, {r0, r4, lr} | ||
55 | + add r1, r1, r2 | ||
56 | + add r0, r0, r2 | ||
57 | + subs r2, r2, #4 | ||
58 | + blt 25f | ||
59 | + ands ip, r0, #3 | ||
60 | + PLD( pld [r1, #-4] ) | ||
61 | + bne 26f | ||
62 | + ands ip, r1, #3 | ||
63 | + bne 27f | ||
64 | + | ||
65 | +19: subs r2, r2, #4 | ||
66 | + blt 24f | ||
67 | + subs r2, r2, #8 | ||
68 | + blt 23f | ||
69 | + subs r2, r2, #16 | ||
70 | + blt 22f | ||
71 | + | ||
72 | + PLD( pld [r1, #-32] ) | ||
73 | + PLD( subs r2, r2, #96 ) | ||
74 | + stmfd sp!, {r5 - r8} | ||
75 | + PLD( blt 21f ) | ||
76 | + | ||
77 | + PLD( @ cache alignment ) | ||
78 | + PLD( ands ip, r1, #31 ) | ||
79 | + PLD( pld [r1, #-64] ) | ||
80 | + PLD( beq 20f ) | ||
81 | + PLD( cmp r2, ip ) | ||
82 | + PLD( pld [r1, #-96] ) | ||
83 | + PLD( blt 20f ) | ||
84 | + PLD( cmp ip, #16 ) | ||
85 | + PLD( sub r2, r2, ip ) | ||
86 | + PLD( ldmgedb r1!, {r3 - r6} ) | ||
87 | + PLD( stmgedb r0!, {r3 - r6} ) | ||
88 | + PLD( beq 20f ) | ||
89 | + PLD( and ip, ip, #15 ) | ||
90 | + PLD( cmp ip, #8 ) | ||
91 | + PLD( ldr r3, [r1, #-4]! ) | ||
92 | + PLD( ldrge r4, [r1, #-4]! ) | ||
93 | + PLD( ldrgt r5, [r1, #-4]! ) | ||
94 | + PLD( str r3, [r0, #-4]! ) | ||
95 | + PLD( strge r4, [r0, #-4]! ) | ||
96 | + PLD( strgt r5, [r0, #-4]! ) | ||
97 | + | ||
98 | +20: PLD( pld [r1, #-96] ) | ||
99 | + PLD( pld [r1, #-128] ) | ||
100 | +21: ldmdb r1!, {r3, r4, ip, lr} | ||
101 | + subs r2, r2, #32 | ||
102 | + stmdb r0!, {r3, r4, ip, lr} | ||
103 | + ldmdb r1!, {r3, r4, ip, lr} | ||
104 | + stmgedb r0!, {r3, r4, ip, lr} | ||
105 | + ldmgedb r1!, {r3, r4, ip, lr} | ||
106 | + stmgedb r0!, {r3, r4, ip, lr} | ||
107 | + ldmgedb r1!, {r3, r4, ip, lr} | ||
108 | + subges r2, r2, #32 | ||
109 | + stmdb r0!, {r3, r4, ip, lr} | ||
110 | + bge 20b | ||
111 | + PLD( cmn r2, #96 ) | ||
112 | + PLD( bge 21b ) | ||
113 | + PLD( add r2, r2, #96 ) | ||
114 | + tst r2, #31 | ||
115 | + ldmfd sp!, {r5 - r8} | ||
116 | + ldmeqfd sp!, {r0, r4, pc} | ||
117 | + | ||
118 | + tst r2, #16 | ||
119 | +22: ldmnedb r1!, {r3, r4, ip, lr} | ||
120 | + stmnedb r0!, {r3, r4, ip, lr} | ||
121 | + | ||
122 | + tst r2, #8 | ||
123 | +23: ldmnedb r1!, {r3, r4} | ||
124 | + stmnedb r0!, {r3, r4} | ||
125 | + | ||
126 | + tst r2, #4 | ||
127 | +24: ldrne r3, [r1, #-4]! | ||
128 | + strne r3, [r0, #-4]! | ||
129 | + | ||
130 | +25: ands r2, r2, #3 | ||
131 | + ldmeqfd sp!, {r0, r4, pc} | ||
132 | + | ||
133 | + cmp r2, #2 | ||
134 | + ldrb r3, [r1, #-1] | ||
135 | + ldrgeb r4, [r1, #-2] | ||
136 | + ldrgtb ip, [r1, #-3] | ||
137 | + strb r3, [r0, #-1] | ||
138 | + strgeb r4, [r0, #-2] | ||
139 | + strgtb ip, [r0, #-3] | ||
140 | + ldmfd sp!, {r0, r4, pc} | ||
141 | + | ||
142 | +26: cmp ip, #2 | ||
143 | + ldrb r3, [r1, #-1]! | ||
144 | + ldrgeb r4, [r1, #-1]! | ||
145 | + ldrgtb lr, [r1, #-1]! | ||
146 | + strb r3, [r0, #-1]! | ||
147 | + strgeb r4, [r0, #-1]! | ||
148 | + strgtb lr, [r0, #-1]! | ||
149 | + subs r2, r2, ip | ||
150 | + blt 25b | ||
151 | + ands ip, r1, #3 | ||
152 | + beq 19b | ||
153 | + | ||
154 | +27: bic r1, r1, #3 | ||
155 | + cmp ip, #2 | ||
156 | + ldr r3, [r1] | ||
157 | + beq 35f | ||
158 | + blt 36f | ||
159 | + | ||
160 | + | ||
161 | + .macro backward_copy_shift push pull | ||
162 | + | ||
163 | + cmp r2, #12 | ||
164 | + PLD( pld [r1, #-4] ) | ||
165 | + blt 33f | ||
166 | + subs r2, r2, #28 | ||
167 | + stmfd sp!, {r5 - r9} | ||
168 | + blt 31f | ||
169 | + | ||
170 | + PLD( subs r2, r2, #96 ) | ||
171 | + PLD( pld [r1, #-32] ) | ||
172 | + PLD( blt 30f ) | ||
173 | + PLD( pld [r1, #-64] ) | ||
174 | + | ||
175 | + PLD( @ cache alignment ) | ||
176 | + PLD( ands ip, r1, #31 ) | ||
177 | + PLD( pld [r1, #-96] ) | ||
178 | + PLD( beq 29f ) | ||
179 | + PLD( cmp r2, ip ) | ||
180 | + PLD( pld [r1, #-128] ) | ||
181 | + PLD( blt 29f ) | ||
182 | + PLD( sub r2, r2, ip ) | ||
183 | +28: PLD( mov r4, r3, push #\push ) | ||
184 | + PLD( ldr r3, [r1, #-4]! ) | ||
185 | + PLD( subs ip, ip, #4 ) | ||
186 | + PLD( orr r4, r4, r3, pull #\pull ) | ||
187 | + PLD( str r4, [r0, #-4]! ) | ||
188 | + PLD( bgt 28b ) | ||
189 | + | ||
190 | +29: PLD( pld [r1, #-128] ) | ||
191 | +30: mov lr, r3, push #\push | ||
192 | + ldmdb r1!, {r3 - r9, ip} | ||
193 | + subs r2, r2, #32 | ||
194 | + orr lr, lr, ip, pull #\pull | ||
195 | + mov ip, ip, push #\push | ||
196 | + orr ip, ip, r9, pull #\pull | ||
197 | + mov r9, r9, push #\push | ||
198 | + orr r9, r9, r8, pull #\pull | ||
199 | + mov r8, r8, push #\push | ||
200 | + orr r8, r8, r7, pull #\pull | ||
201 | + mov r7, r7, push #\push | ||
202 | + orr r7, r7, r6, pull #\pull | ||
203 | + mov r6, r6, push #\push | ||
204 | + orr r6, r6, r5, pull #\pull | ||
205 | + mov r5, r5, push #\push | ||
206 | + orr r5, r5, r4, pull #\pull | ||
207 | + mov r4, r4, push #\push | ||
208 | + orr r4, r4, r3, pull #\pull | ||
209 | + stmdb r0!, {r4 - r9, ip, lr} | ||
210 | + bge 29b | ||
211 | + PLD( cmn r2, #96 ) | ||
212 | + PLD( bge 30b ) | ||
213 | + PLD( add r2, r2, #96 ) | ||
214 | + cmn r2, #16 | ||
215 | + blt 32f | ||
216 | +31: mov r7, r3, push #\push | ||
217 | + ldmdb r1!, {r3 - r6} | ||
218 | + sub r2, r2, #16 | ||
219 | + orr r7, r7, r6, pull #\pull | ||
220 | + mov r6, r6, push #\push | ||
221 | + orr r6, r6, r5, pull #\pull | ||
222 | + mov r5, r5, push #\push | ||
223 | + orr r5, r5, r4, pull #\pull | ||
224 | + mov r4, r4, push #\push | ||
225 | + orr r4, r4, r3, pull #\pull | ||
226 | + stmdb r0!, {r4 - r7} | ||
227 | +32: adds r2, r2, #28 | ||
228 | + ldmfd sp!, {r5 - r9} | ||
229 | + blt 34f | ||
230 | +33: mov r4, r3, push #\push | ||
231 | + ldr r3, [r1, #-4]! | ||
232 | + subs r2, r2, #4 | ||
233 | + orr r4, r4, r3, pull #\pull | ||
234 | + str r4, [r0, #-4]! | ||
235 | + bge 33b | ||
236 | +34: | ||
237 | + .endm | ||
238 | + | ||
239 | + | ||
240 | + backward_copy_shift push=8 pull=24 | ||
241 | + add r1, r1, #3 | ||
242 | + b 25b | ||
243 | + | ||
244 | +35: backward_copy_shift push=16 pull=16 | ||
245 | + add r1, r1, #2 | ||
246 | + b 25b | ||
247 | + | ||
248 | +36: backward_copy_shift push=24 pull=8 | ||
249 | + add r1, r1, #1 | ||
250 | + b 25b | ||
251 | + | ||
252 | + .size memmove, . - memmove | ||
253 | +END(memmove) | ||
254 | +libc_hidden_builtin_def (memmove) | ||
255 | --- /dev/null 2004-02-02 20:32:13.000000000 +0000 | ||
256 | +++ sysdeps/arm/bcopy.S 2004-03-20 18:37:48.000000000 +0000 | ||
257 | @@ -0,0 +1,255 @@ | ||
258 | +/* | ||
259 | + * Optimized memmove implementation for ARM processors | ||
260 | + * | ||
261 | + * Author: Nicolas Pitre | ||
262 | + * Created: Dec 23, 2003 | ||
263 | + * Copyright: (C) MontaVista Software, Inc. | ||
264 | + * | ||
265 | + * This file is free software; you can redistribute it and/or | ||
266 | + * modify it under the terms of the GNU Lesser General Public | ||
267 | + * License as published by the Free Software Foundation; either | ||
268 | + * version 2.1 of the License, or (at your option) any later version. | ||
269 | + * | ||
270 | + * This file is distributed in the hope that it will be useful, | ||
271 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
272 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
273 | + * Lesser General Public License for more details. | ||
274 | + */ | ||
275 | + | ||
276 | +#include <sysdep.h> | ||
277 | + | ||
278 | + | ||
279 | +/* | ||
280 | + * Endian independent macros for shifting bytes within registers. | ||
281 | + */ | ||
282 | +#ifndef __ARMEB__ | ||
283 | +#define pull lsr | ||
284 | +#define push lsl | ||
285 | +#else | ||
286 | +#define pull lsl | ||
287 | +#define push lsr | ||
288 | +#endif | ||
289 | + | ||
290 | +/* | ||
291 | + * Enable data preload for architectures that support it (ARMv5 and above) | ||
292 | + */ | ||
293 | +#if defined(__ARM_ARCH_5__) || \ | ||
294 | + defined(__ARM_ARCH_5T__) || \ | ||
295 | + defined(__ARM_ARCH_5TE__) | ||
296 | +#define PLD(code...) code | ||
297 | +#else | ||
298 | +#define PLD(code...) | ||
299 | +#endif | ||
300 | + | ||
301 | +dst .req r1 | ||
302 | +src .req r0 | ||
303 | + | ||
304 | +/* void *bcopy (const char *src, char *dst, size_t size) */ | ||
305 | +ENTRY(bcopy) | ||
306 | + subs ip, dst, src | ||
307 | + cmphi r2, ip | ||
308 | + movls r3, r0 | ||
309 | + movls r0, r1 | ||
310 | + movls r1, r3 | ||
311 | + bls memcpy(PLT) | ||
312 | + | ||
313 | + stmfd sp!, {r4, lr} | ||
314 | + add src, src, r2 | ||
315 | + add dst, dst, r2 | ||
316 | + subs r2, r2, #4 | ||
317 | + blt 25f | ||
318 | + ands ip, dst, #3 | ||
319 | + PLD( pld [src, #-4] ) | ||
320 | + bne 26f | ||
321 | + ands ip, src, #3 | ||
322 | + bne 27f | ||
323 | + | ||
324 | +19: subs r2, r2, #4 | ||
325 | + blt 24f | ||
326 | + subs r2, r2, #8 | ||
327 | + blt 23f | ||
328 | + subs r2, r2, #16 | ||
329 | + blt 22f | ||
330 | + | ||
331 | + PLD( pld [src, #-32] ) | ||
332 | + PLD( subs r2, r2, #96 ) | ||
333 | + stmfd sp!, {r5 - r8} | ||
334 | + PLD( blt 21f ) | ||
335 | + | ||
336 | + PLD( @ cache alignment ) | ||
337 | + PLD( ands ip, src, #31 ) | ||
338 | + PLD( pld [src, #-64] ) | ||
339 | + PLD( beq 20f ) | ||
340 | + PLD( cmp r2, ip ) | ||
341 | + PLD( pld [src, #-96] ) | ||
342 | + PLD( blt 20f ) | ||
343 | + PLD( cmp ip, #16 ) | ||
344 | + PLD( sub r2, r2, ip ) | ||
345 | + PLD( ldmgedb src!, {r3 - r6} ) | ||
346 | + PLD( stmgedb dst!, {r3 - r6} ) | ||
347 | + PLD( beq 20f ) | ||
348 | + PLD( and ip, ip, #15 ) | ||
349 | + PLD( cmp ip, #8 ) | ||
350 | + PLD( ldr r3, [src, #-4]! ) | ||
351 | + PLD( ldrge r4, [src, #-4]! ) | ||
352 | + PLD( ldrgt r5, [src, #-4]! ) | ||
353 | + PLD( str r3, [dst, #-4]! ) | ||
354 | + PLD( strge r4, [dst, #-4]! ) | ||
355 | + PLD( strgt r5, [dst, #-4]! ) | ||
356 | + | ||
357 | +20: PLD( pld [src, #-96] ) | ||
358 | + PLD( pld [src, #-128] ) | ||
359 | +21: ldmdb src!, {r3, r4, ip, lr} | ||
360 | + subs r2, r2, #32 | ||
361 | + stmdb dst!, {r3, r4, ip, lr} | ||
362 | + ldmdb src!, {r3, r4, ip, lr} | ||
363 | + stmgedb dst!, {r3, r4, ip, lr} | ||
364 | + ldmgedb src!, {r3, r4, ip, lr} | ||
365 | + stmgedb dst!, {r3, r4, ip, lr} | ||
366 | + ldmgedb src!, {r3, r4, ip, lr} | ||
367 | + subges r2, r2, #32 | ||
368 | + stmdb dst!, {r3, r4, ip, lr} | ||
369 | + bge 20b | ||
370 | + PLD( cmn r2, #96 ) | ||
371 | + PLD( bge 21b ) | ||
372 | + PLD( add r2, r2, #96 ) | ||
373 | + tst r2, #31 | ||
374 | + ldmfd sp!, {r5 - r8} | ||
375 | + ldmeqfd sp!, {r4, pc} | ||
376 | + | ||
377 | + tst r2, #16 | ||
378 | +22: ldmnedb src!, {r3, r4, ip, lr} | ||
379 | + stmnedb dst!, {r3, r4, ip, lr} | ||
380 | + | ||
381 | + tst r2, #8 | ||
382 | +23: ldmnedb src!, {r3, r4} | ||
383 | + stmnedb dst!, {r3, r4} | ||
384 | + | ||
385 | + tst r2, #4 | ||
386 | +24: ldrne r3, [src, #-4]! | ||
387 | + strne r3, [dst, #-4]! | ||
388 | + | ||
389 | +25: ands r2, r2, #3 | ||
390 | + ldmeqfd sp!, {dst, r4, pc} | ||
391 | + | ||
392 | + cmp r2, #2 | ||
393 | + ldrb r3, [src, #-1] | ||
394 | + ldrgeb r4, [src, #-2] | ||
395 | + ldrgtb ip, [src, #-3] | ||
396 | + strb r3, [dst, #-1] | ||
397 | + strgeb r4, [dst, #-2] | ||
398 | + strgtb ip, [dst, #-3] | ||
399 | + ldmfd sp!, {dst, r4, pc} | ||
400 | + | ||
401 | +26: cmp ip, #2 | ||
402 | + ldrb r3, [src, #-1]! | ||
403 | + ldrgeb r4, [src, #-1]! | ||
404 | + ldrgtb lr, [src, #-1]! | ||
405 | + strb r3, [dst, #-1]! | ||
406 | + strgeb r4, [dst, #-1]! | ||
407 | + strgtb lr, [dst, #-1]! | ||
408 | + subs r2, r2, ip | ||
409 | + blt 25b | ||
410 | + ands ip, src, #3 | ||
411 | + beq 19b | ||
412 | + | ||
413 | +27: bic src, src, #3 | ||
414 | + cmp ip, #2 | ||
415 | + ldr r3, [src] | ||
416 | + beq 35f | ||
417 | + blt 36f | ||
418 | + | ||
419 | + | ||
420 | + .macro backward_copy_shift push pull | ||
421 | + | ||
422 | + cmp r2, #12 | ||
423 | + PLD( pld [src, #-4] ) | ||
424 | + blt 33f | ||
425 | + subs r2, r2, #28 | ||
426 | + stmfd sp!, {r5 - r9} | ||
427 | + blt 31f | ||
428 | + | ||
429 | + PLD( subs r2, r2, #96 ) | ||
430 | + PLD( pld [src, #-32] ) | ||
431 | + PLD( blt 30f ) | ||
432 | + PLD( pld [src, #-64] ) | ||
433 | + | ||
434 | + PLD( @ cache alignment ) | ||
435 | + PLD( ands ip, src, #31 ) | ||
436 | + PLD( pld [src, #-96] ) | ||
437 | + PLD( beq 29f ) | ||
438 | + PLD( cmp r2, ip ) | ||
439 | + PLD( pld [src, #-128] ) | ||
440 | + PLD( blt 29f ) | ||
441 | + PLD( sub r2, r2, ip ) | ||
442 | +28: PLD( mov r4, r3, push #\push ) | ||
443 | + PLD( ldr r3, [src, #-4]! ) | ||
444 | + PLD( subs ip, ip, #4 ) | ||
445 | + PLD( orr r4, r4, r3, pull #\pull ) | ||
446 | + PLD( str r4, [dst, #-4]! ) | ||
447 | + PLD( bgt 28b ) | ||
448 | + | ||
449 | +29: PLD( pld [src, #-128] ) | ||
450 | +30: mov lr, r3, push #\push | ||
451 | + ldmdb src!, {r3 - r9, ip} | ||
452 | + subs r2, r2, #32 | ||
453 | + orr lr, lr, ip, pull #\pull | ||
454 | + mov ip, ip, push #\push | ||
455 | + orr ip, ip, r9, pull #\pull | ||
456 | + mov r9, r9, push #\push | ||
457 | + orr r9, r9, r8, pull #\pull | ||
458 | + mov r8, r8, push #\push | ||
459 | + orr r8, r8, r7, pull #\pull | ||
460 | + mov r7, r7, push #\push | ||
461 | + orr r7, r7, r6, pull #\pull | ||
462 | + mov r6, r6, push #\push | ||
463 | + orr r6, r6, r5, pull #\pull | ||
464 | + mov r5, r5, push #\push | ||
465 | + orr r5, r5, r4, pull #\pull | ||
466 | + mov r4, r4, push #\push | ||
467 | + orr r4, r4, r3, pull #\pull | ||
468 | + stmdb dst!, {r4 - r9, ip, lr} | ||
469 | + bge 29b | ||
470 | + PLD( cmn r2, #96 ) | ||
471 | + PLD( bge 30b ) | ||
472 | + PLD( add r2, r2, #96 ) | ||
473 | + cmn r2, #16 | ||
474 | + blt 32f | ||
475 | +31: mov r7, r3, push #\push | ||
476 | + ldmdb src!, {r3 - r6} | ||
477 | + sub r2, r2, #16 | ||
478 | + orr r7, r7, r6, pull #\pull | ||
479 | + mov r6, r6, push #\push | ||
480 | + orr r6, r6, r5, pull #\pull | ||
481 | + mov r5, r5, push #\push | ||
482 | + orr r5, r5, r4, pull #\pull | ||
483 | + mov r4, r4, push #\push | ||
484 | + orr r4, r4, r3, pull #\pull | ||
485 | + stmdb dst!, {r4 - r7} | ||
486 | +32: adds r2, r2, #28 | ||
487 | + ldmfd sp!, {r5 - r9} | ||
488 | + blt 34f | ||
489 | +33: mov r4, r3, push #\push | ||
490 | + ldr r3, [src, #-4]! | ||
491 | + subs r2, r2, #4 | ||
492 | + orr r4, r4, r3, pull #\pull | ||
493 | + str r4, [dst, #-4]! | ||
494 | + bge 33b | ||
495 | +34: | ||
496 | + .endm | ||
497 | + | ||
498 | + | ||
499 | + backward_copy_shift push=8 pull=24 | ||
500 | + add src, src, #3 | ||
501 | + b 25b | ||
502 | + | ||
503 | +35: backward_copy_shift push=16 pull=16 | ||
504 | + add src, src, #2 | ||
505 | + b 25b | ||
506 | + | ||
507 | +36: backward_copy_shift push=24 pull=8 | ||
508 | + add src, src, #1 | ||
509 | + b 25b | ||
510 | + | ||
511 | + .size bcopy, . - bcopy | ||
512 | +END(bcopy) | ||
513 | |||
514 | --- /dev/null 2004-02-02 20:32:13.000000000 +0000 | ||
515 | +++ sysdeps/arm/memcpy.S 2004-05-02 14:33:22.000000000 +0100 | ||
516 | @@ -0,0 +1,242 @@ | ||
517 | +/* | ||
518 | + * Optimized memcpy implementation for ARM processors | ||
519 | + * | ||
520 | + * Author: Nicolas Pitre | ||
521 | + * Created: Dec 23, 2003 | ||
522 | + * Copyright: (C) MontaVista Software, Inc. | ||
523 | + * | ||
524 | + * This file is free software; you can redistribute it and/or | ||
525 | + * modify it under the terms of the GNU Lesser General Public | ||
526 | + * License as published by the Free Software Foundation; either | ||
527 | + * version 2.1 of the License, or (at your option) any later version. | ||
528 | + * | ||
529 | + * This file is distributed in the hope that it will be useful, | ||
530 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
531 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
532 | + * Lesser General Public License for more details. | ||
533 | + */ | ||
534 | + | ||
535 | +#include <sysdep.h> | ||
536 | + | ||
537 | + | ||
538 | +/* | ||
539 | + * Endian independent macros for shifting bytes within registers. | ||
540 | + */ | ||
541 | +#ifndef __ARMEB__ | ||
542 | +#define pull lsr | ||
543 | +#define push lsl | ||
544 | +#else | ||
545 | +#define pull lsl | ||
546 | +#define push lsr | ||
547 | +#endif | ||
548 | + | ||
549 | +/* | ||
550 | + * Enable data preload for architectures that support it (ARMv5 and above) | ||
551 | + */ | ||
552 | +#if defined(__ARM_ARCH_5__) || \ | ||
553 | + defined(__ARM_ARCH_5T__) || \ | ||
554 | + defined(__ARM_ARCH_5TE__) | ||
555 | +#define PLD(code...) code | ||
556 | +#else | ||
557 | +#define PLD(code...) | ||
558 | +#endif | ||
559 | + | ||
560 | + | ||
561 | +/* char * memcpy (char *dst, const char *src) */ | ||
562 | + | ||
563 | +ENTRY(memcpy) | ||
564 | + subs r2, r2, #4 | ||
565 | + stmfd sp!, {r0, r4, lr} | ||
566 | + blt 7f | ||
567 | + ands ip, r0, #3 | ||
568 | + PLD( pld [r1, #0] ) | ||
569 | + bne 8f | ||
570 | + ands ip, r1, #3 | ||
571 | + bne 9f | ||
572 | + | ||
573 | +1: subs r2, r2, #4 | ||
574 | + blt 6f | ||
575 | + subs r2, r2, #8 | ||
576 | + blt 5f | ||
577 | + subs r2, r2, #16 | ||
578 | + blt 4f | ||
579 | + | ||
580 | + PLD( subs r2, r2, #65 ) | ||
581 | + stmfd sp!, {r5 - r8} | ||
582 | + PLD( blt 3f ) | ||
583 | + PLD( pld [r1, #32] ) | ||
584 | + | ||
585 | + PLD( @ cache alignment ) | ||
586 | + PLD( ands ip, r1, #31 ) | ||
587 | + PLD( pld [r1, #64] ) | ||
588 | + PLD( beq 2f ) | ||
589 | + PLD( rsb ip, ip, #32 ) | ||
590 | + PLD( cmp r2, ip ) | ||
591 | + PLD( pld [r1, #96] ) | ||
592 | + PLD( blt 2f ) | ||
593 | + PLD( cmp ip, #16 ) | ||
594 | + PLD( sub r2, r2, ip ) | ||
595 | + PLD( ldmgeia r1!, {r3 - r6} ) | ||
596 | + PLD( stmgeia r0!, {r3 - r6} ) | ||
597 | + PLD( beq 2f ) | ||
598 | + PLD( and ip, ip, #15 ) | ||
599 | + PLD( cmp ip, #8 ) | ||
600 | + PLD( ldr r3, [r1], #4 ) | ||
601 | + PLD( ldrge r4, [r1], #4 ) | ||
602 | + PLD( ldrgt r5, [r1], #4 ) | ||
603 | + PLD( str r3, [r0], #4 ) | ||
604 | + PLD( strge r4, [r0], #4 ) | ||
605 | + PLD( strgt r5, [r0], #4 ) | ||
606 | + | ||
607 | +2: PLD( pld [r1, #96] ) | ||
608 | +3: ldmia r1!, {r3 - r8, ip, lr} | ||
609 | + subs r2, r2, #32 | ||
610 | + stmia r0!, {r3 - r8, ip, lr} | ||
611 | + bge 2b | ||
612 | + PLD( cmn r2, #65 ) | ||
613 | + PLD( bge 3b ) | ||
614 | + PLD( add r2, r2, #65 ) | ||
615 | + tst r2, #31 | ||
616 | + ldmfd sp!, {r5 - r8} | ||
617 | + ldmeqfd sp!, {r0, r4, pc} | ||
618 | + | ||
619 | + tst r2, #16 | ||
620 | +4: ldmneia r1!, {r3, r4, ip, lr} | ||
621 | + stmneia r0!, {r3, r4, ip, lr} | ||
622 | + | ||
623 | + tst r2, #8 | ||
624 | +5: ldmneia r1!, {r3, r4} | ||
625 | + stmneia r0!, {r3, r4} | ||
626 | + | ||
627 | + tst r2, #4 | ||
628 | +6: ldrne r3, [r1], #4 | ||
629 | + strne r3, [r0], #4 | ||
630 | + | ||
631 | +7: ands r2, r2, #3 | ||
632 | + ldmeqfd sp!, {r0, r4, pc} | ||
633 | + | ||
634 | + cmp r2, #2 | ||
635 | + ldrb r3, [r1], #1 | ||
636 | + ldrgeb r4, [r1], #1 | ||
637 | + ldrgtb ip, [r1] | ||
638 | + strb r3, [r0], #1 | ||
639 | + strgeb r4, [r0], #1 | ||
640 | + strgtb ip, [r0] | ||
641 | + ldmfd sp!, {r0, r4, pc} | ||
642 | + | ||
643 | +8: rsb ip, ip, #4 | ||
644 | + cmp ip, #2 | ||
645 | + ldrb r3, [r1], #1 | ||
646 | + ldrgeb r4, [r1], #1 | ||
647 | + ldrgtb lr, [r1], #1 | ||
648 | + strb r3, [r0], #1 | ||
649 | + strgeb r4, [r0], #1 | ||
650 | + strgtb lr, [r0], #1 | ||
651 | + subs r2, r2, ip | ||
652 | + blt 7b | ||
653 | + ands ip, r1, #3 | ||
654 | + beq 1b | ||
655 | + | ||
656 | +9: bic r1, r1, #3 | ||
657 | + cmp ip, #2 | ||
658 | + ldr lr, [r1], #4 | ||
659 | + beq 17f | ||
660 | + bgt 18f | ||
661 | + | ||
662 | + | ||
663 | + .macro forward_copy_shift pull push | ||
664 | + | ||
665 | + cmp r2, #12 | ||
666 | + PLD( pld [r1, #0] ) | ||
667 | + blt 15f | ||
668 | + subs r2, r2, #28 | ||
669 | + stmfd sp!, {r5 - r9} | ||
670 | + blt 13f | ||
671 | + | ||
672 | + PLD( subs r2, r2, #97 ) | ||
673 | + PLD( blt 12f ) | ||
674 | + PLD( pld [r1, #32] ) | ||
675 | + | ||
676 | + PLD( @ cache alignment ) | ||
677 | + PLD( rsb ip, r1, #36 ) | ||
678 | + PLD( pld [r1, #64] ) | ||
679 | + PLD( ands ip, ip, #31 ) | ||
680 | + PLD( pld [r1, #96] ) | ||
681 | + PLD( beq 11f ) | ||
682 | + PLD( cmp r2, ip ) | ||
683 | + PLD( pld [r1, #128] ) | ||
684 | + PLD( blt 11f ) | ||
685 | + PLD( sub r2, r2, ip ) | ||
686 | +10: PLD( mov r3, lr, pull #\pull ) | ||
687 | + PLD( ldr lr, [r1], #4 ) | ||
688 | + PLD( subs ip, ip, #4 ) | ||
689 | + PLD( orr r3, r3, lr, push #\push ) | ||
690 | + PLD( str r3, [r0], #4 ) | ||
691 | + PLD( bgt 10b ) | ||
692 | + | ||
693 | +11: PLD( pld [r1, #128] ) | ||
694 | +12: mov r3, lr, pull #\pull | ||
695 | + ldmia r1!, {r4 - r9, ip, lr} | ||
696 | + subs r2, r2, #32 | ||
697 | + orr r3, r3, r4, push #\push | ||
698 | + mov r4, r4, pull #\pull | ||
699 | + orr r4, r4, r5, push #\push | ||
700 | + mov r5, r5, pull #\pull | ||
701 | + orr r5, r5, r6, push #\push | ||
702 | + mov r6, r6, pull #\pull | ||
703 | + orr r6, r6, r7, push #\push | ||
704 | + mov r7, r7, pull #\pull | ||
705 | + orr r7, r7, r8, push #\push | ||
706 | + mov r8, r8, pull #\pull | ||
707 | + orr r8, r8, r9, push #\push | ||
708 | + mov r9, r9, pull #\pull | ||
709 | + orr r9, r9, ip, push #\push | ||
710 | + mov ip, ip, pull #\pull | ||
711 | + orr ip, ip, lr, push #\push | ||
712 | + stmia r0!, {r3 - r9, ip} | ||
713 | + bge 11b | ||
714 | + PLD( cmn r2, #97 ) | ||
715 | + PLD( bge 12b ) | ||
716 | + PLD( add r2, r2, #97 ) | ||
717 | + cmn r2, #16 | ||
718 | + blt 14f | ||
719 | +13: mov r3, lr, pull #\pull | ||
720 | + ldmia r1!, {r4 - r6, lr} | ||
721 | + sub r2, r2, #16 | ||
722 | + orr r3, r3, r4, push #\push | ||
723 | + mov r4, r4, pull #\pull | ||
724 | + orr r4, r4, r5, push #\push | ||
725 | + mov r5, r5, pull #\pull | ||
726 | + orr r5, r5, r6, push #\push | ||
727 | + mov r6, r6, pull #\pull | ||
728 | + orr r6, r6, lr, push #\push | ||
729 | + stmia r0!, {r3 - r6} | ||
730 | +14: adds r2, r2, #28 | ||
731 | + ldmfd sp!, {r5 - r9} | ||
732 | + blt 16f | ||
733 | +15: mov r3, lr, pull #\pull | ||
734 | + ldr lr, [r1], #4 | ||
735 | + subs r2, r2, #4 | ||
736 | + orr r3, r3, lr, push #\push | ||
737 | + str r3, [r0], #4 | ||
738 | + bge 15b | ||
739 | +16: | ||
740 | + .endm | ||
741 | + | ||
742 | + | ||
743 | + forward_copy_shift pull=8 push=24 | ||
744 | + sub r1, r1, #3 | ||
745 | + b 7b | ||
746 | + | ||
747 | +17: forward_copy_shift pull=16 push=16 | ||
748 | + sub r1, r1, #2 | ||
749 | + b 7b | ||
750 | + | ||
751 | +18: forward_copy_shift pull=24 push=8 | ||
752 | + sub r1, r1, #1 | ||
753 | + b 7b | ||
754 | + | ||
755 | + .size memcpy, . - memcpy | ||
756 | +END(memcpy) | ||
757 | +libc_hidden_builtin_def (memcpy) | ||
758 | + | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch b/openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch new file mode 100644 index 0000000000..2fedfa6db0 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/dl-cache-libcmp.patch | |||
@@ -0,0 +1,10 @@ | |||
1 | --- glibc-2.4/elf/Versions.ark 2006-03-11 23:30:09.000000000 +0100 | ||
2 | +++ glibc-2.4/elf/Versions 2006-03-11 23:31:44.000000000 +0100 | ||
3 | @@ -63,5 +63,7 @@ | ||
4 | _dl_debug_state; | ||
5 | # Pointer protection. | ||
6 | __pointer_chk_guard; | ||
7 | + # for ldconfig | ||
8 | + _dl_cache_libcmp; | ||
9 | } | ||
10 | } | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch new file mode 100644 index 0000000000..451b6d4afc --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig-20041128.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- libc/elf/Makefile~dyn-ldconfig-20041128 | ||
7 | +++ libc/elf/Makefile | ||
8 | @@ -118,12 +118,13 @@ | ||
9 | |||
10 | ifeq (yes,$(use-ldconfig)) | ||
11 | ifeq (yes,$(build-shared)) | ||
12 | -others-static += ldconfig | ||
13 | +#others-static += ldconfig | ||
14 | others += ldconfig | ||
15 | install-rootsbin += ldconfig | ||
16 | |||
17 | ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon | ||
18 | extra-objs += $(ldconfig-modules:=.o) | ||
19 | +CPPFLAGS-readlib.c = -DNOT_IN_libc=1 | ||
20 | |||
21 | # To find xmalloc.c and xstrdup.c | ||
22 | vpath %.c ../locale/programs | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch new file mode 100644 index 0000000000..1041965d05 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/dyn-ldconfig.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | --- elf/Makefile 13 Mar 2003 21:50:57 -0000 1.258 | ||
2 | +++ elf/Makefile 27 Mar 2003 20:36:07 -0000 | ||
3 | @@ -109,12 +109,13 @@ | ||
4 | |||
5 | ifeq (yes,$(use-ldconfig)) | ||
6 | ifeq (yes,$(build-shared)) | ||
7 | -others-static += ldconfig | ||
8 | +#others-static += ldconfig | ||
9 | others += ldconfig | ||
10 | install-rootsbin += ldconfig | ||
11 | |||
12 | ldconfig-modules := cache readlib xmalloc xstrdup chroot_canon | ||
13 | extra-objs += $(ldconfig-modules:=.o) | ||
14 | +CPPFLAGS-readlib.c = -DNOT_IN_libc=1 | ||
15 | |||
16 | # To find xmalloc.c and xstrdup.c | ||
17 | vpath %.c ../locale/programs | ||
18 | --- elf/ldconfig.c 13 Jan 2003 08:53:14 -0000 1.31 | ||
19 | +++ elf/ldconfig.c 27 Mar 2003 20:36:09 -0000 | ||
20 | @@ -149,6 +149,9 @@ | ||
21 | static int | ||
22 | is_hwcap_platform (const char *name) | ||
23 | { | ||
24 | +#if 1 | ||
25 | + return 0; | ||
26 | +#else | ||
27 | int hwcap_idx = _dl_string_hwcap (name); | ||
28 | |||
29 | if (hwcap_idx != -1 && ((1 << hwcap_idx) & hwcap_mask)) | ||
30 | @@ -164,6 +167,7 @@ | ||
31 | #endif | ||
32 | |||
33 | return 0; | ||
34 | +#endif | ||
35 | } | ||
36 | |||
37 | /* Get hwcap (including platform) encoding of path. */ | ||
38 | @@ -175,6 +179,7 @@ | ||
39 | uint64_t hwcap = 0; | ||
40 | uint64_t h; | ||
41 | |||
42 | +#if 0 | ||
43 | size_t len; | ||
44 | |||
45 | len = strlen (str); | ||
46 | @@ -210,6 +215,7 @@ | ||
47 | *ptr = '\0'; | ||
48 | } | ||
49 | |||
50 | +#endif | ||
51 | free (str); | ||
52 | return hwcap; | ||
53 | } | ||
54 | --- elf/Versions.old 2004-06-26 13:18:35.000000000 +0100 | ||
55 | +++ elf/Versions 2004-06-26 14:41:09.000000000 +0100 | ||
56 | @@ -54,5 +54,6 @@ | ||
57 | _dl_get_tls_static_info; _dl_allocate_tls_init; | ||
58 | _dl_tls_setup; _dl_rtld_di_serinfo; | ||
59 | _dl_make_stack_executable; | ||
60 | + _dl_cache_libcmp; | ||
61 | } | ||
62 | } | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf b/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf new file mode 100644 index 0000000000..3f9b41aabb --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/etc/ld.so.conf | |||
@@ -0,0 +1,3 @@ | |||
1 | /usr/local/lib | ||
2 | /opt/QtPalmtop/lib | ||
3 | |||
diff --git a/openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch b/openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch new file mode 100644 index 0000000000..fb733b9194 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch | |||
@@ -0,0 +1,329 @@ | |||
1 | Fix up ARM EABI for removed syscalls | ||
2 | http://sourceware.org/ml/libc-ports/2006-03/msg00029.html | ||
3 | |||
4 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S | ||
5 | =================================================================== | ||
6 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2006-03-21 15:58:10.000000000 -0500 | ||
7 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
8 | @@ -1,131 +0,0 @@ | ||
9 | -/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005 | ||
10 | - Free Software Foundation, Inc. | ||
11 | - This file is part of the GNU C Library. | ||
12 | - | ||
13 | - The GNU C Library is free software; you can redistribute it and/or | ||
14 | - modify it under the terms of the GNU Lesser General Public | ||
15 | - License as published by the Free Software Foundation; either | ||
16 | - version 2.1 of the License, or (at your option) any later version. | ||
17 | - | ||
18 | - The GNU C Library is distributed in the hope that it will be useful, | ||
19 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | - Lesser General Public License for more details. | ||
22 | - | ||
23 | - You should have received a copy of the GNU Lesser General Public | ||
24 | - License along with the GNU C Library; if not, write to the Free | ||
25 | - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
26 | - 02111-1307 USA. */ | ||
27 | - | ||
28 | -#include <sysdep-cancel.h> | ||
29 | -#include <socketcall.h> | ||
30 | - | ||
31 | -#define P(a, b) P2(a, b) | ||
32 | -#define P2(a, b) a##b | ||
33 | - | ||
34 | - .text | ||
35 | -/* The socket-oriented system calls are handled unusally in Linux. | ||
36 | - They are all gated through the single `socketcall' system call number. | ||
37 | - `socketcall' takes two arguments: the first is the subcode, specifying | ||
38 | - which socket function is being called; and the second is a pointer to | ||
39 | - the arguments to the specific function. | ||
40 | - | ||
41 | - The .S files for the other calls just #define socket and #include this. */ | ||
42 | - | ||
43 | -#ifndef __socket | ||
44 | -# ifndef NO_WEAK_ALIAS | ||
45 | -# define __socket P(__,socket) | ||
46 | -# else | ||
47 | -# define __socket socket | ||
48 | -# endif | ||
49 | -#endif | ||
50 | - | ||
51 | -#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8 | ||
52 | -#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8 | ||
53 | -#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */ | ||
54 | -#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16 | ||
55 | -#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */ | ||
56 | -#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16 | ||
57 | - | ||
58 | -#define POPARGS_1 add sp, sp, #8 | ||
59 | -#define POPARGS_2 add sp, sp, #8 | ||
60 | -#define POPARGS_3 add sp, sp, #16 | ||
61 | -#define POPARGS_4 add sp, sp, #16 | ||
62 | -#define POPARGS_5 add sp, sp, #16 | ||
63 | -#define POPARGS_6 add sp, sp, #16 | ||
64 | - | ||
65 | -#ifndef NARGS | ||
66 | -#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ | ||
67 | -#endif | ||
68 | - | ||
69 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
70 | - PSEUDO_PROLOGUE | ||
71 | -#endif | ||
72 | - | ||
73 | -.globl __socket | ||
74 | -ENTRY (__socket) | ||
75 | - .fnstart | ||
76 | - | ||
77 | - /* This code previously moved sp into ip and stored the args using | ||
78 | - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had | ||
79 | - to be restored after the syscall completed. It saved an | ||
80 | - instruction and meant no stack cleanup work was required. | ||
81 | - | ||
82 | - This will not work in the case of a socket call being interrupted | ||
83 | - by a signal. If the signal handler uses any stack the arguments | ||
84 | - to socket will be trashed. The results of a restart of any | ||
85 | - socket call are then unpredictable. */ | ||
86 | - | ||
87 | - /* Push args onto the stack. */ | ||
88 | - P(PUSHARGS_,NARGS) | ||
89 | - | ||
90 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
91 | - SINGLE_THREAD_P | ||
92 | - bne 1f | ||
93 | -#endif | ||
94 | - | ||
95 | - /* Do the system call trap. */ | ||
96 | - mov a1, $P(SOCKOP_,socket) | ||
97 | - mov a2, sp | ||
98 | - DO_CALL (socketcall, 0) | ||
99 | - | ||
100 | - /* Pop args off the stack */ | ||
101 | - P(POPARGS_,NARGS) | ||
102 | - | ||
103 | - /* r0 is < 0 if there was an error. */ | ||
104 | - cmn r0, $124 | ||
105 | - RETINSTR(cc, r14) | ||
106 | - b PLTJMP(SYSCALL_ERROR) | ||
107 | - | ||
108 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
109 | -1: | ||
110 | - stmfd sp!, {r7, lr} | ||
111 | - .save {r7, lr} | ||
112 | - CENABLE | ||
113 | - mov ip, r0 | ||
114 | - | ||
115 | - mov r0, #P(SOCKOP_,socket) | ||
116 | - add r1, sp, #8 | ||
117 | - mov r7, #SYS_ify(socketcall) | ||
118 | - swi 0x0 | ||
119 | - | ||
120 | - mov r7, r0 | ||
121 | - mov r0, ip | ||
122 | - CDISABLE | ||
123 | - mov r0, r7 | ||
124 | - ldmfd sp!, {r7, lr} | ||
125 | - | ||
126 | - P(POPARGS_,NARGS) | ||
127 | - | ||
128 | - /* r0 is < 0 if there was an error. */ | ||
129 | - cmn r0, $124 | ||
130 | - RETINSTR(cc, r14) | ||
131 | - b PLTJMP(SYSCALL_ERROR) | ||
132 | -#endif | ||
133 | - | ||
134 | - .fnend | ||
135 | -PSEUDO_END (__socket) | ||
136 | - | ||
137 | -#ifndef NO_WEAK_ALIAS | ||
138 | -weak_alias (__socket, socket) | ||
139 | -#endif | ||
140 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list | ||
141 | =================================================================== | ||
142 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
143 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 2006-03-21 15:58:46.000000000 -0500 | ||
144 | @@ -0,0 +1,34 @@ | ||
145 | +# File name Caller Syscall name # args Strong name Weak names | ||
146 | + | ||
147 | +# semaphore and shm system calls | ||
148 | +msgctl - msgctl i:iip __msgctl msgctl | ||
149 | +msgget - msgget i:ii __msgget msgget | ||
150 | +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv | ||
151 | +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd | ||
152 | +shmat - shmat i:ipi __shmat shmat | ||
153 | +shmctl - shmctl i:iip __shmctl shmctl | ||
154 | +shmdt - shmdt i:s __shmdt shmdt | ||
155 | +shmget - shmget i:iii __shmget shmget | ||
156 | +semop - semop i:ipi __semop semop | ||
157 | +semtimedop - semtimedop i:ipip semtimedop | ||
158 | +semget - semget i:iii __semget semget | ||
159 | +semctl - semctl i:iiii __semctl semctl | ||
160 | + | ||
161 | +# proper socket implementations: | ||
162 | +accept - accept Ci:iBN __libc_accept __accept accept | ||
163 | +bind - bind i:ipi __bind bind | ||
164 | +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect | ||
165 | +getpeername - getpeername i:ipp __getpeername getpeername | ||
166 | +getsockname - getsockname i:ipp __getsockname getsockname | ||
167 | +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt | ||
168 | +listen - listen i:ii __listen listen | ||
169 | +recv - recv Ci:ibni __libc_recv __recv recv | ||
170 | +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom | ||
171 | +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg | ||
172 | +send - send Ci:ibni __libc_send __send send | ||
173 | +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg | ||
174 | +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto | ||
175 | +setsockopt - setsockopt i:iiibn __setsockopt setsockopt | ||
176 | +shutdown - shutdown i:ii __shutdown shutdown | ||
177 | +socket - socket i:iii __socket socket | ||
178 | +socketpair - socketpair i:iiif __socketpair socketpair | ||
179 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h | ||
180 | =================================================================== | ||
181 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500 | ||
182 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500 | ||
183 | @@ -53,9 +53,9 @@ | ||
184 | UNDOARGS_##args; \ | ||
185 | cmn r0, $4096; | ||
186 | |||
187 | -/* DOARGS pushes four bytes on the stack for five arguments, and nothing | ||
188 | - otherwise. In order to preserve doubleword alignment, sometimes we must | ||
189 | - save an extra register. */ | ||
190 | +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for | ||
191 | + six arguments, and nothing for fewer. In order to preserve doubleword | ||
192 | + alignment, sometimes we must save an extra register. */ | ||
193 | |||
194 | # define DOCARGS_0 stmfd sp!, {r7, lr} | ||
195 | # define UNDOCARGS_0 | ||
196 | @@ -81,6 +81,10 @@ | ||
197 | # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3} | ||
198 | # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} | ||
199 | |||
200 | +# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr} | ||
201 | +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3} | ||
202 | +# define RESTORE_LR_6 RESTORE_LR_0 | ||
203 | + | ||
204 | # ifdef IS_IN_libpthread | ||
205 | # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) | ||
206 | # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) | ||
207 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | ||
208 | =================================================================== | ||
209 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500 | ||
210 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500 | ||
211 | @@ -64,9 +64,9 @@ | ||
212 | UNDOARGS_##args; \ | ||
213 | cmn r0, $4096; | ||
214 | |||
215 | -/* DOARGS pushes four bytes on the stack for five arguments, and nothing | ||
216 | - otherwise. In order to preserve doubleword alignment, sometimes we must | ||
217 | - save an extra register. */ | ||
218 | +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for | ||
219 | + six arguments, and nothing for fewer. In order to preserve doubleword | ||
220 | + alignment, sometimes we must save an extra register. */ | ||
221 | |||
222 | # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr} | ||
223 | |||
224 | @@ -94,6 +94,10 @@ | ||
225 | # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 | ||
226 | # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} | ||
227 | |||
228 | +# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20 | ||
229 | +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr} | ||
230 | +# define RESTORE_LR_6 RESTORE_LR_0 | ||
231 | + | ||
232 | # ifdef IS_IN_libpthread | ||
233 | # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) | ||
234 | # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) | ||
235 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | ||
236 | =================================================================== | ||
237 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:10.000000000 -0500 | ||
238 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:46.000000000 -0500 | ||
239 | @@ -1,4 +1,4 @@ | ||
240 | -/* Copyright (C) 2005 | ||
241 | +/* Copyright (C) 2005, 2006 | ||
242 | Free Software Foundation, Inc. | ||
243 | |||
244 | This file is part of the GNU C Library. | ||
245 | @@ -29,6 +29,12 @@ | ||
246 | # error Kernel headers are too old | ||
247 | #endif | ||
248 | |||
249 | +/* Don't use stime, even if the kernel headers define it. We have | ||
250 | + settimeofday, and some EABI kernels have removed stime. Similarly | ||
251 | + use setitimer to implement alarm. */ | ||
252 | +#undef __NR_stime | ||
253 | +#undef __NR_alarm | ||
254 | + | ||
255 | /* The ARM EABI user interface passes the syscall number in r7, instead | ||
256 | of in the swi. This is more efficient, because the kernel does not need | ||
257 | to fetch the swi from memory to find out the number; which can be painful | ||
258 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c | ||
259 | =================================================================== | ||
260 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
261 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c 2006-03-21 15:58:46.000000000 -0500 | ||
262 | @@ -0,0 +1,31 @@ | ||
263 | +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. | ||
264 | + This file is part of the GNU C Library. | ||
265 | + Contributed by David Huggins-Daines <dhd@debian.org>, 2000. | ||
266 | + | ||
267 | + The GNU C Library is free software; you can redistribute it and/or | ||
268 | + modify it under the terms of the GNU Lesser General Public | ||
269 | + License as published by the Free Software Foundation; either | ||
270 | + version 2.1 of the License, or (at your option) any later version. | ||
271 | + | ||
272 | + The GNU C Library is distributed in the hope that it will be useful, | ||
273 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
274 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
275 | + Lesser General Public License for more details. | ||
276 | + | ||
277 | + You should have received a copy of the GNU Lesser General Public | ||
278 | + License along with the GNU C Library; if not, write to the Free | ||
279 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
280 | + 02111-1307 USA. */ | ||
281 | + | ||
282 | +/* Since we don't have an oldumount system call, do what the kernel | ||
283 | + does down here. */ | ||
284 | + | ||
285 | +extern long int __umount2 (const char *name, int flags); | ||
286 | + | ||
287 | +long int | ||
288 | +__umount (const char *name) | ||
289 | +{ | ||
290 | + return __umount2 (name, 0); | ||
291 | +} | ||
292 | + | ||
293 | +weak_alias (__umount, umount); | ||
294 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
295 | =================================================================== | ||
296 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
297 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-03-20 17:26:58.000000000 -0500 | ||
298 | @@ -0,0 +1,31 @@ | ||
299 | +/* Set flags signalling availability of kernel features based on given | ||
300 | + kernel version number. | ||
301 | + Copyright (C) 2006 Free Software Foundation, Inc. | ||
302 | + This file is part of the GNU C Library. | ||
303 | + | ||
304 | + The GNU C Library is free software; you can redistribute it and/or | ||
305 | + modify it under the terms of the GNU Lesser General Public | ||
306 | + License as published by the Free Software Foundation; either | ||
307 | + version 2.1 of the License, or (at your option) any later version. | ||
308 | + | ||
309 | + The GNU C Library is distributed in the hope that it will be useful, | ||
310 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
311 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
312 | + Lesser General Public License for more details. | ||
313 | + | ||
314 | + You should have received a copy of the GNU Lesser General Public | ||
315 | + License along with the GNU C Library; if not, write to the Free | ||
316 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
317 | + 02111-1307 USA. */ | ||
318 | + | ||
319 | +/* The utimes syscall was added before 2.6.1. */ | ||
320 | +#if __LINUX_KERNEL_VERSION >= 132609 | ||
321 | +# define __ASSUME_UTIMES 1 | ||
322 | +#endif | ||
323 | + | ||
324 | +/* The new getrlimit syscall was added sometime before 2.4.6. */ | ||
325 | +#if __LINUX_KERNEL_VERSION >= 132102 | ||
326 | +#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 | ||
327 | +#endif | ||
328 | + | ||
329 | +#include_next <kernel-features.h> | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/generic-bits_select.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_select.h new file mode 100644 index 0000000000..47e7dedc30 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/generic-bits_select.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc. | ||
2 | This file is part of the GNU C Library. | ||
3 | |||
4 | The GNU C Library is free software; you can redistribute it and/or | ||
5 | modify it under the terms of the GNU Lesser General Public | ||
6 | License as published by the Free Software Foundation; either | ||
7 | version 2.1 of the License, or (at your option) any later version. | ||
8 | |||
9 | The GNU C Library is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | Lesser General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU Lesser General Public | ||
15 | License along with the GNU C Library; if not, write to the Free | ||
16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
17 | 02111-1307 USA. */ | ||
18 | |||
19 | #ifndef _SYS_SELECT_H | ||
20 | # error "Never use <bits/select.h> directly; include <sys/select.h> instead." | ||
21 | #endif | ||
22 | |||
23 | |||
24 | /* We don't use `memset' because this would require a prototype and | ||
25 | the array isn't too big. */ | ||
26 | #define __FD_ZERO(s) \ | ||
27 | do { \ | ||
28 | unsigned int __i; \ | ||
29 | fd_set *__arr = (s); \ | ||
30 | for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ | ||
31 | __FDS_BITS (__arr)[__i] = 0; \ | ||
32 | } while (0) | ||
33 | #define __FD_SET(d, s) (__FDS_BITS (s)[__FDELT(d)] |= __FDMASK(d)) | ||
34 | #define __FD_CLR(d, s) (__FDS_BITS (s)[__FDELT(d)] &= ~__FDMASK(d)) | ||
35 | #define __FD_ISSET(d, s) ((__FDS_BITS (s)[__FDELT(d)] & __FDMASK(d)) != 0) | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/generic-bits_time.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_time.h new file mode 100644 index 0000000000..b3184d1de9 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/generic-bits_time.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* System-dependent timing definitions. Generic version. | ||
2 | Copyright (C) 1996,1997,1999-2002,2003 Free Software Foundation, Inc. | ||
3 | This file is part of the GNU C Library. | ||
4 | |||
5 | The GNU C Library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Lesser General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2.1 of the License, or (at your option) any later version. | ||
9 | |||
10 | The GNU C Library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with the GNU C Library; if not, write to the Free | ||
17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
18 | 02111-1307 USA. */ | ||
19 | |||
20 | /* | ||
21 | * Never include this file directly; use <time.h> instead. | ||
22 | */ | ||
23 | |||
24 | #ifndef __need_timeval | ||
25 | # ifndef _BITS_TIME_H | ||
26 | # define _BITS_TIME_H 1 | ||
27 | |||
28 | /* ISO/IEC 9899:1990 7.12.1: <time.h> | ||
29 | The macro `CLOCKS_PER_SEC' is the number per second of the value | ||
30 | returned by the `clock' function. */ | ||
31 | /* CAE XSH, Issue 4, Version 2: <time.h> | ||
32 | The value of CLOCKS_PER_SEC is required to be 1 million on all | ||
33 | XSI-conformant systems. */ | ||
34 | # define CLOCKS_PER_SEC 1000000l | ||
35 | |||
36 | # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K | ||
37 | /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK | ||
38 | presents the real value for clock ticks per second for the system. */ | ||
39 | # include <bits/types.h> | ||
40 | extern long int __sysconf (int); | ||
41 | # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ | ||
42 | # endif | ||
43 | |||
44 | # ifdef __USE_POSIX199309 | ||
45 | /* Identifier for system-wide realtime clock. */ | ||
46 | # define CLOCK_REALTIME 0 | ||
47 | /* Monotonic system-wide clock. */ | ||
48 | # define CLOCK_MONOTONIC 1 | ||
49 | /* High-resolution timer from the CPU. */ | ||
50 | # define CLOCK_PROCESS_CPUTIME_ID 2 | ||
51 | /* Thread-specific CPU-time clock. */ | ||
52 | # define CLOCK_THREAD_CPUTIME_ID 3 | ||
53 | |||
54 | /* Flag to indicate time is absolute. */ | ||
55 | # define TIMER_ABSTIME 1 | ||
56 | # endif | ||
57 | |||
58 | # endif /* bits/time.h */ | ||
59 | #endif | ||
60 | |||
61 | #ifdef __need_timeval | ||
62 | # undef __need_timeval | ||
63 | # ifndef _STRUCT_TIMEVAL | ||
64 | # define _STRUCT_TIMEVAL 1 | ||
65 | # include <bits/types.h> | ||
66 | |||
67 | /* A time value that is accurate to the nearest | ||
68 | microsecond but also has a range of years. */ | ||
69 | struct timeval | ||
70 | { | ||
71 | __time_t tv_sec; /* Seconds. */ | ||
72 | __suseconds_t tv_usec; /* Microseconds. */ | ||
73 | }; | ||
74 | # endif /* struct timeval */ | ||
75 | #endif /* need timeval */ | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/generic-bits_types.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_types.h new file mode 100644 index 0000000000..65c8a9fe90 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/generic-bits_types.h | |||
@@ -0,0 +1,200 @@ | |||
1 | /* bits/types.h -- definitions of __*_t types underlying *_t types. | ||
2 | Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | ||
3 | This file is part of the GNU C Library. | ||
4 | |||
5 | The GNU C Library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Lesser General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2.1 of the License, or (at your option) any later version. | ||
9 | |||
10 | The GNU C Library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with the GNU C Library; if not, write to the Free | ||
17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
18 | 02111-1307 USA. */ | ||
19 | |||
20 | /* | ||
21 | * Never include this file directly; use <sys/types.h> instead. | ||
22 | */ | ||
23 | |||
24 | #ifndef _BITS_TYPES_H | ||
25 | #define _BITS_TYPES_H 1 | ||
26 | |||
27 | #include <features.h> | ||
28 | #include <bits/wordsize.h> | ||
29 | |||
30 | #define __need_size_t | ||
31 | #include <stddef.h> | ||
32 | |||
33 | /* Convenience types. */ | ||
34 | typedef unsigned char __u_char; | ||
35 | typedef unsigned short int __u_short; | ||
36 | typedef unsigned int __u_int; | ||
37 | typedef unsigned long int __u_long; | ||
38 | |||
39 | /* Fixed-size types, underlying types depend on word size and compiler. */ | ||
40 | typedef signed char __int8_t; | ||
41 | typedef unsigned char __uint8_t; | ||
42 | typedef signed short int __int16_t; | ||
43 | typedef unsigned short int __uint16_t; | ||
44 | typedef signed int __int32_t; | ||
45 | typedef unsigned int __uint32_t; | ||
46 | #if __WORDSIZE == 64 | ||
47 | typedef signed long int __int64_t; | ||
48 | typedef unsigned long int __uint64_t; | ||
49 | #elif defined __GLIBC_HAVE_LONG_LONG | ||
50 | __extension__ typedef signed long long int __int64_t; | ||
51 | __extension__ typedef unsigned long long int __uint64_t; | ||
52 | #endif | ||
53 | |||
54 | /* quad_t is also 64 bits. */ | ||
55 | #if __WORDSIZE == 64 | ||
56 | typedef long int __quad_t; | ||
57 | typedef unsigned long int __u_quad_t; | ||
58 | #elif defined __GLIBC_HAVE_LONG_LONG | ||
59 | __extension__ typedef long long int __quad_t; | ||
60 | __extension__ typedef unsigned long long int __u_quad_t; | ||
61 | #else | ||
62 | typedef struct | ||
63 | { | ||
64 | long __val[2]; | ||
65 | } __quad_t; | ||
66 | typedef struct | ||
67 | { | ||
68 | __u_long __val[2]; | ||
69 | } __u_quad_t; | ||
70 | #endif | ||
71 | |||
72 | |||
73 | /* The machine-dependent file <bits/typesizes.h> defines __*_T_TYPE | ||
74 | macros for each of the OS types we define below. The definitions | ||
75 | of those macros must use the following macros for underlying types. | ||
76 | We define __S<SIZE>_TYPE and __U<SIZE>_TYPE for the signed and unsigned | ||
77 | variants of each of the following integer types on this machine. | ||
78 | |||
79 | 16 -- "natural" 16-bit type (always short) | ||
80 | 32 -- "natural" 32-bit type (always int) | ||
81 | 64 -- "natural" 64-bit type (long or long long) | ||
82 | LONG32 -- 32-bit type, traditionally long | ||
83 | QUAD -- 64-bit type, always long long | ||
84 | WORD -- natural type of __WORDSIZE bits (int or long) | ||
85 | LONGWORD -- type of __WORDSIZE bits, traditionally long | ||
86 | |||
87 | We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the | ||
88 | conventional uses of `long' or `long long' type modifiers match the | ||
89 | types we define, even when a less-adorned type would be the same size. | ||
90 | This matters for (somewhat) portably writing printf/scanf formats for | ||
91 | these types, where using the appropriate l or ll format modifiers can | ||
92 | make the typedefs and the formats match up across all GNU platforms. If | ||
93 | we used `long' when it's 64 bits where `long long' is expected, then the | ||
94 | compiler would warn about the formats not matching the argument types, | ||
95 | and the programmer changing them to shut up the compiler would break the | ||
96 | program's portability. | ||
97 | |||
98 | Here we assume what is presently the case in all the GCC configurations | ||
99 | we support: long long is always 64 bits, long is always word/address size, | ||
100 | and int is always 32 bits. */ | ||
101 | |||
102 | #define __S16_TYPE short int | ||
103 | #define __U16_TYPE unsigned short int | ||
104 | #define __S32_TYPE int | ||
105 | #define __U32_TYPE unsigned int | ||
106 | #define __SLONGWORD_TYPE long int | ||
107 | #define __ULONGWORD_TYPE unsigned long int | ||
108 | #if __WORDSIZE == 32 | ||
109 | # define __SQUAD_TYPE __quad_t | ||
110 | # define __UQUAD_TYPE __u_quad_t | ||
111 | # define __SWORD_TYPE int | ||
112 | # define __UWORD_TYPE unsigned int | ||
113 | # define __SLONG32_TYPE long int | ||
114 | # define __ULONG32_TYPE unsigned long int | ||
115 | # define __S64_TYPE __quad_t | ||
116 | # define __U64_TYPE __u_quad_t | ||
117 | /* We want __extension__ before typedef's that use nonstandard base types | ||
118 | such as `long long' in C89 mode. */ | ||
119 | # define __STD_TYPE __extension__ typedef | ||
120 | #elif __WORDSIZE == 64 | ||
121 | # define __SQUAD_TYPE long int | ||
122 | # define __UQUAD_TYPE unsigned long int | ||
123 | # define __SWORD_TYPE long int | ||
124 | # define __UWORD_TYPE unsigned long int | ||
125 | # define __SLONG32_TYPE int | ||
126 | # define __ULONG32_TYPE unsigned int | ||
127 | # define __S64_TYPE long int | ||
128 | # define __U64_TYPE unsigned long int | ||
129 | /* No need to mark the typedef with __extension__. */ | ||
130 | # define __STD_TYPE typedef | ||
131 | #else | ||
132 | # error | ||
133 | #endif | ||
134 | #include <bits/typesizes.h> /* Defines __*_T_TYPE macros. */ | ||
135 | |||
136 | |||
137 | __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ | ||
138 | __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ | ||
139 | __STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */ | ||
140 | __STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */ | ||
141 | __STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/ | ||
142 | __STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */ | ||
143 | __STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */ | ||
144 | __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */ | ||
145 | __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */ | ||
146 | __STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */ | ||
147 | __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ | ||
148 | __STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */ | ||
149 | __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ | ||
150 | __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ | ||
151 | __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ | ||
152 | __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ | ||
153 | __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ | ||
154 | __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ | ||
155 | |||
156 | __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ | ||
157 | __STD_TYPE __SWBLK_T_TYPE __swblk_t; /* Type of a swap block maybe? */ | ||
158 | __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ | ||
159 | |||
160 | /* Clock ID used in clock and timer functions. */ | ||
161 | __STD_TYPE __CLOCKID_T_TYPE __clockid_t; | ||
162 | |||
163 | /* Timer ID returned by `timer_create'. */ | ||
164 | __STD_TYPE __TIMER_T_TYPE __timer_t; | ||
165 | |||
166 | /* Type to represent block size. */ | ||
167 | __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; | ||
168 | |||
169 | /* Types from the Large File Support interface. */ | ||
170 | |||
171 | /* Type to count number of disk blocks. */ | ||
172 | __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; | ||
173 | __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; | ||
174 | |||
175 | /* Type to count file system blocks. */ | ||
176 | __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; | ||
177 | __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; | ||
178 | |||
179 | /* Type to count file system nodes. */ | ||
180 | __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; | ||
181 | __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; | ||
182 | |||
183 | __STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */ | ||
184 | |||
185 | /* These few don't really vary by system, they always correspond | ||
186 | to one of the other defined types. */ | ||
187 | typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ | ||
188 | typedef __quad_t *__qaddr_t; | ||
189 | typedef char *__caddr_t; | ||
190 | |||
191 | /* Duplicates info from stdint.h but this is used in unistd.h. */ | ||
192 | __STD_TYPE __SWORD_TYPE __intptr_t; | ||
193 | |||
194 | /* Duplicate info from sys/socket.h. */ | ||
195 | __STD_TYPE __U32_TYPE __socklen_t; | ||
196 | |||
197 | |||
198 | #undef __STD_TYPE | ||
199 | |||
200 | #endif /* bits/types.h */ | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h b/openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h new file mode 100644 index 0000000000..e9226c4174 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/generic-bits_typesizes.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* bits/typesizes.h -- underlying types for *_t. Generic version. | ||
2 | Copyright (C) 2002, 2003 Free Software Foundation, Inc. | ||
3 | This file is part of the GNU C Library. | ||
4 | |||
5 | The GNU C Library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Lesser General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2.1 of the License, or (at your option) any later version. | ||
9 | |||
10 | The GNU C Library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Lesser General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU Lesser General Public | ||
16 | License along with the GNU C Library; if not, write to the Free | ||
17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
18 | 02111-1307 USA. */ | ||
19 | |||
20 | #ifndef _BITS_TYPES_H | ||
21 | # error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead." | ||
22 | #endif | ||
23 | |||
24 | #ifndef _BITS_TYPESIZES_H | ||
25 | #define _BITS_TYPESIZES_H 1 | ||
26 | |||
27 | /* See <bits/types.h> for the meaning of these macros. This file exists so | ||
28 | that <bits/types.h> need not vary across different GNU platforms. */ | ||
29 | |||
30 | #define __DEV_T_TYPE __UQUAD_TYPE | ||
31 | #define __UID_T_TYPE __U32_TYPE | ||
32 | #define __GID_T_TYPE __U32_TYPE | ||
33 | #define __INO_T_TYPE __ULONGWORD_TYPE | ||
34 | #define __INO64_T_TYPE __UQUAD_TYPE | ||
35 | #define __MODE_T_TYPE __U32_TYPE | ||
36 | #define __NLINK_T_TYPE __UWORD_TYPE | ||
37 | #define __OFF_T_TYPE __SLONGWORD_TYPE | ||
38 | #define __OFF64_T_TYPE __SQUAD_TYPE | ||
39 | #define __PID_T_TYPE __S32_TYPE | ||
40 | #define __RLIM_T_TYPE __ULONGWORD_TYPE | ||
41 | #define __RLIM64_T_TYPE __UQUAD_TYPE | ||
42 | #define __BLKCNT_T_TYPE __SLONGWORD_TYPE | ||
43 | #define __BLKCNT64_T_TYPE __SQUAD_TYPE | ||
44 | #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE | ||
45 | #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE | ||
46 | #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE | ||
47 | #define __FSFILCNT64_T_TYPE __UQUAD_TYPE | ||
48 | #define __ID_T_TYPE __U32_TYPE | ||
49 | #define __CLOCK_T_TYPE __SLONGWORD_TYPE | ||
50 | #define __TIME_T_TYPE __SLONGWORD_TYPE | ||
51 | #define __USECONDS_T_TYPE __U32_TYPE | ||
52 | #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE | ||
53 | #define __DADDR_T_TYPE __S32_TYPE | ||
54 | #define __SWBLK_T_TYPE __SLONGWORD_TYPE | ||
55 | #define __KEY_T_TYPE __S32_TYPE | ||
56 | #define __CLOCKID_T_TYPE __S32_TYPE | ||
57 | #define __TIMER_T_TYPE void * | ||
58 | #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE | ||
59 | #define __FSID_T_TYPE struct { int __val[2]; } | ||
60 | #define __SSIZE_T_TYPE __SWORD_TYPE | ||
61 | |||
62 | /* Number of descriptors that can fit in an `fd_set'. */ | ||
63 | #define __FD_SETSIZE 1024 | ||
64 | |||
65 | |||
66 | #endif /* bits/typesizes.h */ | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch b/openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch new file mode 100644 index 0000000000..ea9f55ae7f --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/glibc-2.4-compile.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | --- glibc-2.4/csu/libc-start.c.ark 2006-03-13 03:07:15.000000000 +0100 | ||
2 | +++ glibc-2.4/csu/libc-start.c 2006-03-13 03:08:51.000000000 +0100 | ||
3 | @@ -59,6 +59,11 @@ | ||
4 | # define LIBC_START_MAIN BP_SYM (__libc_start_main) | ||
5 | #endif | ||
6 | |||
7 | +#ifdef SHARED | ||
8 | +#include <pthread-functions.h> | ||
9 | +extern struct pthread_functions __libc_pthread_functions; | ||
10 | +#endif | ||
11 | + | ||
12 | #ifdef MAIN_AUXVEC_ARG | ||
13 | /* main gets passed a pointer to the auxiliary. */ | ||
14 | # define MAIN_AUXVEC_DECL , void * | ||
15 | --- glibc-2.4/nscd/Makefile.ark 2006-03-13 14:05:47.000000000 +0100 | ||
16 | +++ glibc-2.4/nscd/Makefile 2006-03-13 14:06:12.000000000 +0100 | ||
17 | @@ -67,8 +67,10 @@ | ||
18 | # contains only the basic kernel interface headers, not something like | ||
19 | # libselinux. So the simplest thing is to presume that the standard | ||
20 | # system headers will be ok for this file. | ||
21 | -$(objpfx)nscd_stat.o: sysincludes = # nothing | ||
22 | -$(objpfx)selinux.o: sysincludes = # nothing | ||
23 | +# Except, of course, this breaks crosscompiling with kernel headers in | ||
24 | +# a nonstandard location... | ||
25 | +#$(objpfx)nscd_stat.o: sysincludes = # nothing | ||
26 | +#$(objpfx)selinux.o: sysincludes = # nothing | ||
27 | |||
28 | distribute := nscd.h nscd-client.h dbg_log.h \ | ||
29 | $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \ | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch b/openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch new file mode 100644 index 0000000000..9994d4f879 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/ldsocache-varrun.patch | |||
@@ -0,0 +1,18 @@ | |||
1 | This patch moves ld.so.cache from /etc to /var/run. This is for devices | ||
2 | where /etc is JFFS2 or CRAMFS but /var is a ramdisk. | ||
3 | |||
4 | # | ||
5 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
6 | # | ||
7 | |||
8 | --- libc/sysdeps/generic/dl-cache.h~ldsocache-varrun | ||
9 | +++ libc/sysdeps/generic/dl-cache.h | ||
10 | @@ -29,7 +29,7 @@ | ||
11 | #endif | ||
12 | |||
13 | #ifndef LD_SO_CACHE | ||
14 | -# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache" | ||
15 | +# define LD_SO_CACHE "/var/run/ld.so.cache" | ||
16 | #endif | ||
17 | |||
18 | #ifndef add_system_dir | ||
diff --git a/openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch b/openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch new file mode 100644 index 0000000000..18a46ad4f1 --- /dev/null +++ b/openembedded/packages/glibc/glibc-2.4/nptl-crosscompile.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | --- glibc-2.4/nptl/sysdeps/pthread/configure.in.ark 2006-03-12 00:41:40.000000000 +0100 | ||
2 | +++ glibc-2.4/nptl/sysdeps/pthread/configure.in 2006-03-12 00:44:08.000000000 +0100 | ||
3 | @@ -45,5 +45,6 @@ | ||
4 | AC_MSG_ERROR([the compiler must support C cleanup handling]) | ||
5 | fi | ||
6 | else | ||
7 | - AC_MSG_ERROR(forced unwind support is required) | ||
8 | + AC_MSG_WARN([forced unwind support is required, can't be verified while crosscompiling]) | ||
9 | + AC_DEFINE(HAVE_FORCED_UNWIND) | ||
10 | fi | ||
11 | --- glibc-2.4/nptl/sysdeps/pthread/configure.ark 2006-03-12 00:42:47.000000000 +0100 | ||
12 | +++ glibc-2.4/nptl/sysdeps/pthread/configure 2006-03-12 00:44:08.000000000 +0100 | ||
13 | @@ -153,7 +153,10 @@ | ||
14 | { (exit 1); exit 1; }; } | ||
15 | fi | ||
16 | else | ||
17 | - { { echo "$as_me:$LINENO: error: forced unwind support is required" >&5 | ||
18 | -echo "$as_me: error: forced unwind support is required" >&2;} | ||
19 | - { (exit 1); exit 1; }; } | ||
20 | + { echo "$as_me:$LINENO: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&5 | ||
21 | +echo "$as_me: WARNING: forced unwind support is required, can't be verified while crosscompiling" >&2;} | ||
22 | + cat >>confdefs.h <<\_ACEOF | ||
23 | +#define HAVE_FORCED_UNWIND 1 | ||
24 | +_ACEOF | ||
25 | + | ||
26 | fi | ||
diff --git a/openembedded/packages/glibc/glibc-initial_2.4.bb b/openembedded/packages/glibc/glibc-initial_2.4.bb new file mode 100644 index 0000000000..422e8b7110 --- /dev/null +++ b/openembedded/packages/glibc/glibc-initial_2.4.bb | |||
@@ -0,0 +1,46 @@ | |||
1 | SECTION = "libs" | ||
2 | include glibc_${PV}.bb | ||
3 | |||
4 | DEPENDS = "linux-libc-headers" | ||
5 | PROVIDES = "virtual/${TARGET_PREFIX}libc-initial" | ||
6 | FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-cvs', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}" | ||
7 | |||
8 | PACKAGES = "" | ||
9 | |||
10 | do_configure () { | ||
11 | sed -ie 's,{ (exit 1); exit 1; }; },{ (exit 0); }; },g' ${S}/configure | ||
12 | chmod +x ${S}/configure | ||
13 | CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \ | ||
14 | --without-cvs --disable-sanity-checks \ | ||
15 | --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \ | ||
16 | --enable-hacker-mode | ||
17 | if grep -q GLIBC_2.3 ${S}/ChangeLog; then | ||
18 | # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler. | ||
19 | # Fortunately, we don't need errlist-compat.c, since we just need .h files, | ||
20 | # so work around this by creating a fake errlist-compat.c and satisfying its dependencies. | ||
21 | # Another workaround might be to tell configure to not use any cross options to $(CC). | ||
22 | # The real fix would be to get install-headers to not generate errlist-compat.c. | ||
23 | make sysdeps/gnu/errlist.c | ||
24 | mkdir -p stdio-common | ||
25 | touch stdio-common/errlist-compat.c | ||
26 | fi | ||
27 | } | ||
28 | |||
29 | do_compile () { | ||
30 | : | ||
31 | } | ||
32 | |||
33 | do_stage () { | ||
34 | oe_runmake cross-compiling=yes install_root=${CROSS_DIR}/${TARGET_SYS} prefix="" install-headers | ||
35 | |||
36 | # Two headers -- stubs.h and features.h -- aren't installed by install-headers, | ||
37 | # so do them by hand. We can tolerate an empty stubs.h for the moment. | ||
38 | # See e.g. http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html | ||
39 | mkdir -p ${CROSS_DIR}/${TARGET_SYS}/include/gnu | ||
40 | touch ${CROSS_DIR}/${TARGET_SYS}/include/gnu/stubs.h | ||
41 | cp ${S}/include/features.h ${CROSS_DIR}/${TARGET_SYS}/include/features.h | ||
42 | } | ||
43 | |||
44 | do_install () { | ||
45 | : | ||
46 | } | ||
diff --git a/openembedded/packages/glibc/glibc-intermediate_2.4.bb b/openembedded/packages/glibc/glibc-intermediate_2.4.bb new file mode 100644 index 0000000000..819cd0950f --- /dev/null +++ b/openembedded/packages/glibc/glibc-intermediate_2.4.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | SECTION = "libs" | ||
2 | include glibc_${PV}.bb | ||
3 | |||
4 | DEFAULT_PREFERENCE = "-1" | ||
5 | |||
6 | do_install () { | ||
7 | : | ||
8 | } | ||
9 | |||
10 | PACKAGES = "" | ||
11 | PROVIDES = "virtual/${TARGET_PREFIX}libc-for-gcc" | ||
12 | DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial linux-libc-headers" | ||
13 | GLIBC_ADDONS = "nptl,ports" | ||
14 | GLIBC_EXTRA_OECONF = "" | ||
diff --git a/openembedded/packages/glibc/glibc_2.4.bb b/openembedded/packages/glibc/glibc_2.4.bb new file mode 100644 index 0000000000..faaf27ced3 --- /dev/null +++ b/openembedded/packages/glibc/glibc_2.4.bb | |||
@@ -0,0 +1,201 @@ | |||
1 | DESCRIPTION = "GNU C Library" | ||
2 | HOMEPAGE = "http://www.gnu.org/software/libc/libc.html" | ||
3 | LICENSE = "LGPL" | ||
4 | SECTION = "libs" | ||
5 | PRIORITY = "required" | ||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | PR = "r4" | ||
8 | |||
9 | FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/glibc-2.4" | ||
10 | |||
11 | GLIBC_ADDONS ?= "ports,nptl,libidn" | ||
12 | GLIBC_EXTRA_OECONF ?= "" | ||
13 | |||
14 | GLIBC_BROKEN_LOCALES = "sid_ET tr_TR mn_MN" | ||
15 | |||
16 | # | ||
17 | # For now, we will skip building of a gcc package if it is a uclibc one | ||
18 | # and our build is not a uclibc one, and we skip a glibc one if our build | ||
19 | # is a uclibc build. | ||
20 | # | ||
21 | # See the note in gcc/gcc_3.4.0.oe | ||
22 | # | ||
23 | |||
24 | python __anonymous () { | ||
25 | import bb, re | ||
26 | uc_os = (re.match('.*uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None) | ||
27 | if uc_os: | ||
28 | raise bb.parse.SkipPackage("incompatible with target %s" % | ||
29 | bb.data.getVar('TARGET_OS', d, 1)) | ||
30 | } | ||
31 | |||
32 | # nptl needs unwind support in gcc, which can't be built without glibc. | ||
33 | PROVIDES = "virtual/libc ${@['virtual/${TARGET_PREFIX}libc-for-gcc', '']['nptl' in '${GLIBC_ADDONS}']}" | ||
34 | PROVIDES += "virtual/libintl virtual/libiconv" | ||
35 | DEPENDS = "${@['virtual/${TARGET_PREFIX}gcc-initial', 'virtual/${TARGET_PREFIX}gcc']['nptl' in '${GLIBC_ADDONS}']} linux-libc-headers" | ||
36 | RDEPENDS_${PN}-dev = "linux-libc-headers-dev" | ||
37 | INHIBIT_DEFAULT_DEPS = "1" | ||
38 | |||
39 | # file://noinfo.patch;patch=1 | ||
40 | # file://ldconfig.patch;patch=1;pnum=0 | ||
41 | # file://arm-machine-gmon.patch;patch=1;pnum=0 \ | ||
42 | # \ | ||
43 | # file://arm-ioperm.patch;patch=1;pnum=0 \ | ||
44 | # file://ldd.patch;patch=1;pnum=0 \ | ||
45 | SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.4.tar.bz2 \ | ||
46 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.4.tar.bz2 \ | ||
47 | ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-2.4.tar.bz2 \ | ||
48 | file://arm-memcpy.patch;patch=1 \ | ||
49 | file://arm-longlong.patch;patch=1 \ | ||
50 | file://fhs-linux-paths.patch;patch=1 \ | ||
51 | file://dl-cache-libcmp.patch;patch=1 \ | ||
52 | file://ldsocache-varrun.patch;patch=1 \ | ||
53 | file://nptl-crosscompile.patch;patch=1 \ | ||
54 | file://glibc-2.4-compile.patch;patch=1 \ | ||
55 | file://fixup-aeabi-syscalls.patch;patch=1 \ | ||
56 | file://generic-bits_select.h \ | ||
57 | file://generic-bits_types.h \ | ||
58 | file://generic-bits_typesizes.h \ | ||
59 | file://generic-bits_time.h \ | ||
60 | file://etc/ld.so.conf \ | ||
61 | file://generate-supported.mk" | ||
62 | |||
63 | S = "${WORKDIR}/glibc-2.4" | ||
64 | B = "${WORKDIR}/build-${TARGET_SYS}" | ||
65 | |||
66 | inherit autotools | ||
67 | |||
68 | EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \ | ||
69 | --without-cvs --disable-profile --disable-debug --without-gd \ | ||
70 | --enable-clocale=gnu \ | ||
71 | --enable-add-ons=${GLIBC_ADDONS} \ | ||
72 | --with-headers=${STAGING_INCDIR} \ | ||
73 | --without-selinux \ | ||
74 | ${GLIBC_EXTRA_OECONF}" | ||
75 | |||
76 | EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}" | ||
77 | |||
78 | def get_glibc_fpu_setting(bb, d): | ||
79 | if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]: | ||
80 | return "--without-fp" | ||
81 | return "" | ||
82 | |||
83 | do_munge() { | ||
84 | # Integrate ports and libidn into tree | ||
85 | mv ${WORKDIR}/glibc-ports-${PV} ${S}/ports | ||
86 | mv ${WORKDIR}/glibc-libidn-${PV} ${S}/libidn | ||
87 | |||
88 | # Ports isn't really working... Fix it | ||
89 | # Some of this is rather dirty, but it seems to be the only | ||
90 | # quick way to get this cruft to compile | ||
91 | rm -rf ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
92 | ln -s nptl ${S}/ports/sysdeps/unix/sysv/linux/arm/linuxthreads | ||
93 | cp ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
94 | cp ${S}/sysdeps/wordsize-32/bits/wordsize.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
95 | cp ${WORKDIR}/generic-bits_select.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/select.h | ||
96 | cp ${WORKDIR}/generic-bits_types.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/types.h | ||
97 | cp ${WORKDIR}/generic-bits_typesizes.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/typesizes.h | ||
98 | cp ${WORKDIR}/generic-bits_time.h ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/time.h | ||
99 | # Copy in generic stuff for not yet implemented headers | ||
100 | for i in ${S}/bits/*.h; do | ||
101 | F=`basename $i` | ||
102 | [ "$F" = "local_lim.h" ] && continue | ||
103 | [ "$F" = "errno.h" ] && continue | ||
104 | test -e ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/$F || test -e ${S}/ports/sysdeps/arm/bits/$F || test -e ${S}/sysdeps/unix/sysv/linux/bits/$F || test -e ${S}/sysdeps/ieee754/bits/$F || cp $i ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/ | ||
105 | done | ||
106 | # This is harmful; we need to get the one from nptl/sysdeps/pthreads | ||
107 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/libc-lock.h | ||
108 | # Obsoleted by sysdeps/arm/{fpu,eabi}/bits/fenv.h | ||
109 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/fenv.h | ||
110 | # Obsoleted by sysdeps/gnu/bits/utmp.h | ||
111 | rm -f ${S}/ports/sysdeps/unix/sysv/linux/arm/bits/utmp.h | ||
112 | |||
113 | # http://www.handhelds.org/hypermail/oe/51/5135.html | ||
114 | # Some files were moved around between directories on | ||
115 | # 2005-12-21, which means that any attempt to check out | ||
116 | # from CVS using a datestamp older than that will be doomed. | ||
117 | # | ||
118 | # This is a workaround for that problem. | ||
119 | rm -rf ${S}/bits | ||
120 | } | ||
121 | |||
122 | addtask munge before do_patch after do_unpack | ||
123 | |||
124 | do_configure () { | ||
125 | # override this function to avoid the autoconf/automake/aclocal/autoheader | ||
126 | # calls for now | ||
127 | # don't pass CPPFLAGS into configure, since it upsets the kernel-headers | ||
128 | # version check and doesn't really help with anything | ||
129 | if [ -z "`which rpcgen`" ]; then | ||
130 | echo "rpcgen not found. Install glibc-devel." | ||
131 | exit 1 | ||
132 | fi | ||
133 | (cd ${S} && gnu-configize) || die "failure in running gnu-configize" | ||
134 | CPPFLAGS="" oe_runconf | ||
135 | } | ||
136 | |||
137 | rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \ | ||
138 | yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \ | ||
139 | rusers.x spray.x nfs_prot.x rquota.x key_prot.x" | ||
140 | |||
141 | do_compile () { | ||
142 | # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging | ||
143 | unset LDFLAGS | ||
144 | base_do_compile | ||
145 | ( | ||
146 | cd ${S}/sunrpc/rpcsvc | ||
147 | for r in ${rpcsvc}; do | ||
148 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
149 | rpcgen -h $r -o $h || oewarn "unable to generate header for $r" | ||
150 | done | ||
151 | ) | ||
152 | } | ||
153 | |||
154 | do_stage() { | ||
155 | rm -f ${STAGING_LIBDIR}/libc.so.6 | ||
156 | oe_runmake 'install_root=${STAGING_DIR}/${HOST_SYS}' \ | ||
157 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
158 | '${STAGING_LIBDIR}/libc.so.6' \ | ||
159 | install-headers install-lib | ||
160 | |||
161 | install -d ${STAGING_INCDIR}/gnu \ | ||
162 | ${STAGING_INCDIR}/bits \ | ||
163 | ${STAGING_INCDIR}/rpcsvc | ||
164 | install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/ | ||
165 | install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/ | ||
166 | install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h | ||
167 | for r in ${rpcsvc}; do | ||
168 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
169 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/ | ||
170 | done | ||
171 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
172 | install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i" | ||
173 | done | ||
174 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so | ||
175 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so | ||
176 | |||
177 | rm -f ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6 | ||
178 | oe_runmake 'install_root=${CROSS_DIR}/${TARGET_SYS}' \ | ||
179 | 'includedir=/include' 'libdir=/lib' 'slibdir=/lib' \ | ||
180 | '${CROSS_DIR}/${TARGET_SYS}/lib/libc.so.6' \ | ||
181 | install-headers install-lib | ||
182 | |||
183 | install -d ${CROSS_DIR}/${TARGET_SYS}/include/gnu \ | ||
184 | ${CROSS_DIR}/${TARGET_SYS}/include/bits \ | ||
185 | ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc | ||
186 | install -m 0644 ${S}/include/gnu/stubs.h ${CROSS_DIR}/${TARGET_SYS}/include/gnu/ | ||
187 | install -m 0644 ${B}/bits/stdio_lim.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/ | ||
188 | install -m 0644 misc/syscall-list.h ${CROSS_DIR}/${TARGET_SYS}/include/bits/syscall.h | ||
189 | for r in ${rpcsvc}; do | ||
190 | h=`echo $r|sed -e's,\.x$,.h,'` | ||
191 | install -m 0644 ${S}/sunrpc/rpcsvc/$h ${CROSS_DIR}/${TARGET_SYS}/include/rpcsvc/ | ||
192 | done | ||
193 | |||
194 | for i in libc.a libc_pic.a libc_nonshared.a; do | ||
195 | install -m 0644 ${B}/$i ${CROSS_DIR}/${TARGET_SYS}/lib/ || die "failed to install $i" | ||
196 | done | ||
197 | echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libpthread.so | ||
198 | echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${CROSS_DIR}/${TARGET_SYS}/lib/libc.so | ||
199 | } | ||
200 | |||
201 | include glibc-package.bbclass | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch new file mode 100644 index 0000000000..1b207b3cd9 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/3477-1.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From: Nicolas Pitre <nico@cam.org> | ||
2 | Date: Sat, 15 Apr 2006 15:10:43 +0000 (+0100) | ||
3 | Subject: [ARM] 3477/1: ARM EABI: undefine removed syscalls | ||
4 | X-Git-Url: http://git.infradead.org/?p=mtd-2.6.git;a=commitdiff;h=463b158aab247b600e4e93614b7b8f42a66331c9 | ||
5 | |||
6 | [ARM] 3477/1: ARM EABI: undefine removed syscalls | ||
7 | |||
8 | Patch from Nicolas Pitre | ||
9 | |||
10 | Avoid confusion for libraries assuming that a given syscall is available | ||
11 | when corresponding symbol is defined. | ||
12 | |||
13 | Signed-off-by: Nicolas Pitre <nico@cam.org> | ||
14 | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> | ||
15 | --- | ||
16 | |||
17 | --- a/include/asm-arm/unistd.h | ||
18 | +++ b/include/asm-arm/unistd.h | ||
19 | @@ -360,6 +360,24 @@ | ||
20 | #define __ARM_NR_usr32 (__ARM_NR_BASE+4) | ||
21 | #define __ARM_NR_set_tls (__ARM_NR_BASE+5) | ||
22 | |||
23 | +/* | ||
24 | + * The following syscalls are obsolete and no longer available for EABI. | ||
25 | + */ | ||
26 | +#if defined(__ARM_EABI__) | ||
27 | +#undef __NR_time | ||
28 | +#undef __NR_umount | ||
29 | +#undef __NR_stime | ||
30 | +#undef __NR_alarm | ||
31 | +#undef __NR_utime | ||
32 | +#undef __NR_getrlimit | ||
33 | +#undef __NR_select | ||
34 | +#undef __NR_readdir | ||
35 | +#undef __NR_mmap | ||
36 | +#undef __NR_socketcall | ||
37 | +#undef __NR_syscall | ||
38 | +#undef __NR_ipc | ||
39 | +#endif | ||
40 | + | ||
41 | #define __sys2(x) #x | ||
42 | #define __sys1(x) __sys2(x) | ||
43 | |||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch new file mode 100644 index 0000000000..4785275db4 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/asm-arch-irqs.patch | |||
@@ -0,0 +1,19 @@ | |||
1 | --- linux-libc-headers-2.6.15.99/include/asm-arm/arch-ebsa285/irqs.h.orig 2006-03-19 17:01:59.000000000 +0100 | ||
2 | +++ linux-libc-headers-2.6.15.99/include/asm-arm/arch-ebsa285/irqs.h 2006-03-19 17:02:50.000000000 +0100 | ||
3 | @@ -8,7 +8,6 @@ | ||
4 | * 20-Jan-1998 RMK Started merge of EBSA286, CATS and NetWinder | ||
5 | * 01-Feb-1999 PJB ISA IRQs start at 0 not 16 | ||
6 | */ | ||
7 | -#include <asm/mach-types.h> | ||
8 | |||
9 | #define NR_IRQS 36 | ||
10 | #define NR_DC21285_IRQS 16 | ||
11 | @@ -92,7 +91,7 @@ | ||
12 | #undef RTC_IRQ | ||
13 | #define RTC_IRQ IRQ_ISA_RTC_ALARM | ||
14 | #define I8042_KBD_IRQ IRQ_ISA_KEYBOARD | ||
15 | -#define I8042_AUX_IRQ (machine_is_netwinder() ? IRQ_NETWINDER_PS2MOUSE : IRQ_ISA_PS2MOUSE) | ||
16 | +#define I8042_AUX_IRQ IRQ_ISA_PS2MOUSE | ||
17 | #define IRQ_FLOPPYDISK IRQ_ISA_FLOPPY | ||
18 | |||
19 | #define irq_canonicalize(_i) (((_i) == IRQ_ISA_CASCADE) ? IRQ_ISA_2 : _i) | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch new file mode 100644 index 0000000000..588aea4ba8 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netdevice.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- linux-libc-headers-2.6.15.99/include/linux/netdevice.h.orig 2006-04-29 14:10:39.245687500 +0200 | ||
2 | +++ linux-libc-headers-2.6.15.99/include/linux/netdevice.h 2006-04-29 14:11:08.819535750 +0200 | ||
3 | @@ -100,8 +100,6 @@ | ||
4 | unsigned long tx_compressed; | ||
5 | }; | ||
6 | |||
7 | -extern int __init netdev_boot_setup(char *str); | ||
8 | - | ||
9 | /* Media selection options. */ | ||
10 | enum { | ||
11 | IF_PORT_UNKNOWN = 0, | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch new file mode 100644 index 0000000000..f7f77af0de --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-netfilter_ipv4.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | iptables 1.3.3 assumes that ipt_scpt.h defines ELEMCOUNT, but ipt_scpt.h | ||
2 | moved to ARRAY_SIZE (which would be defined in linux/kernel.h). | ||
3 | The ip_conntrack_dir definition now resides in linux/netfilter/ip_conntrack_common.h | ||
4 | |||
5 | --- linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ipt_sctp.h.orig 2006-03-20 22:03:04.000000000 +0100 | ||
6 | +++ linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ipt_sctp.h 2006-03-20 22:07:09.000000000 +0100 | ||
7 | @@ -7,6 +7,8 @@ | ||
8 | |||
9 | #define IPT_SCTP_VALID_FLAGS 0x07 | ||
10 | |||
11 | +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
12 | +#define ELEMCOUNT(x) (sizeof(x) / sizeof((x)[0])) | ||
13 | |||
14 | struct ipt_sctp_flag_info { | ||
15 | u_int8_t chunktype; | ||
16 | --- linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ip_conntrack_tuple.h.orig 2006-03-20 21:51:10.000000000 +0100 | ||
17 | +++ linux-libc-headers-2.6.15.99/include/linux/netfilter_ipv4/ip_conntrack_tuple.h 2006-03-20 21:51:12.000000000 +0100 | ||
18 | @@ -89,13 +89,6 @@ | ||
19 | (tuple)->dst.u.all = 0; \ | ||
20 | } while (0) | ||
21 | |||
22 | -enum ip_conntrack_dir | ||
23 | -{ | ||
24 | - IP_CT_DIR_ORIGINAL, | ||
25 | - IP_CT_DIR_REPLY, | ||
26 | - IP_CT_DIR_MAX | ||
27 | -}; | ||
28 | - | ||
29 | static inline int ip_ct_tuple_src_equal(const struct ip_conntrack_tuple *t1, | ||
30 | const struct ip_conntrack_tuple *t2) | ||
31 | { | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch new file mode 100644 index 0000000000..36b80fb9d2 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-rtc.patch | |||
@@ -0,0 +1,11 @@ | |||
1 | --- linux-libc-headers-2.6.15.99/include/linux/rtc.h.orig 2006-03-19 12:31:07.000000000 +0100 | ||
2 | +++ linux-libc-headers-2.6.15.99/include/linux/rtc.h 2006-03-19 12:31:14.000000000 +0100 | ||
3 | @@ -11,8 +11,6 @@ | ||
4 | #ifndef _LINUX_RTC_H_ | ||
5 | #define _LINUX_RTC_H_ | ||
6 | |||
7 | -#include <linux/interrupt.h> | ||
8 | - | ||
9 | /* | ||
10 | * The struct used to pass data via the following ioctl. Similar to the | ||
11 | * struct tm in <time.h>, but it needs to be here so that the kernel | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch new file mode 100644 index 0000000000..95335c99b6 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers-2.6.15.99/linux-videodev2.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | --- linux-libc-headers-2.6.15.99/include/linux/videodev2.h.orig 2006-03-20 11:14:35.000000000 +0100 | ||
2 | +++ linux-libc-headers-2.6.15.99/include/linux/videodev2.h 2006-03-20 11:14:37.000000000 +0100 | ||
3 | @@ -15,7 +15,32 @@ | ||
4 | */ | ||
5 | #include <sys/time.h> /* need struct timeval */ | ||
6 | #include <asm/types.h> /* needed __u64 */ | ||
7 | - | ||
8 | + | ||
9 | +#define OBSOLETE_OWNER 1 /* It will be removed for 2.6.15 */ | ||
10 | +#define HAVE_V4L2 1 | ||
11 | + | ||
12 | +/* | ||
13 | + * Common stuff for both V4L1 and V4L2 | ||
14 | + * Moved from videodev.h | ||
15 | + */ | ||
16 | + | ||
17 | +#define VIDEO_MAX_FRAME 32 | ||
18 | + | ||
19 | +#define VID_TYPE_CAPTURE 1 /* Can capture */ | ||
20 | +#define VID_TYPE_TUNER 2 /* Can tune */ | ||
21 | +#define VID_TYPE_TELETEXT 4 /* Does teletext */ | ||
22 | +#define VID_TYPE_OVERLAY 8 /* Overlay onto frame buffer */ | ||
23 | +#define VID_TYPE_CHROMAKEY 16 /* Overlay by chromakey */ | ||
24 | +#define VID_TYPE_CLIPPING 32 /* Can clip */ | ||
25 | +#define VID_TYPE_FRAMERAM 64 /* Uses the frame buffer memory */ | ||
26 | +#define VID_TYPE_SCALES 128 /* Scalable */ | ||
27 | +#define VID_TYPE_MONOCHROME 256 /* Monochrome only */ | ||
28 | +#define VID_TYPE_SUBCAPTURE 512 /* Can capture subareas of the image */ | ||
29 | +#define VID_TYPE_MPEG_DECODER 1024 /* Can decode MPEG streams */ | ||
30 | +#define VID_TYPE_MPEG_ENCODER 2048 /* Can encode MPEG streams */ | ||
31 | +#define VID_TYPE_MJPEG_DECODER 4096 /* Can decode MJPEG streams */ | ||
32 | +#define VID_TYPE_MJPEG_ENCODER 8192 /* Can encode MJPEG streams */ | ||
33 | + | ||
34 | /* | ||
35 | * M I S C E L L A N E O U S | ||
36 | */ | ||
37 | @@ -464,7 +489,7 @@ | ||
38 | struct v4l2_clip | ||
39 | { | ||
40 | struct v4l2_rect c; | ||
41 | - struct v4l2_clip __user *next; | ||
42 | + struct v4l2_clip *next; | ||
43 | }; | ||
44 | |||
45 | struct v4l2_window | ||
diff --git a/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb b/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb new file mode 100644 index 0000000000..28926f0264 --- /dev/null +++ b/openembedded/packages/linux-libc-headers/linux-libc-headers_2.6.15.99.bb | |||
@@ -0,0 +1,80 @@ | |||
1 | SECTION = "devel" | ||
2 | DESCRIPTION = "Sanitized set of 2.6 kernel headers for the C library's use." | ||
3 | # This package is derived from the original linux-libc-headers at | ||
4 | # http://ep09.pld-linux.org/~mmazur/linux-libc-headers/ | ||
5 | # More specifically, llh-2.6.12.0 was patched up to 2.6.16-rc6 with | ||
6 | # the official linux patches (where applicable) and then fixed up just | ||
7 | # enough to build glibc-2.4. BEWARE! | ||
8 | # | ||
9 | # license note from the linux-libc-headers package: | ||
10 | # Linux-libc-headers are derived from linux kernel headers. For license of a | ||
11 | # particular header, check it's content, and if copyright notice isn't present, | ||
12 | # standard linux kernel license applies. | ||
13 | # since we assume GPL for linux i think we can also assume it here | ||
14 | LICENSE = "GPL" | ||
15 | DEFAULT_PREFERENCE = "-1" | ||
16 | INHIBIT_DEFAULT_DEPS = "1" | ||
17 | PR = "r4" | ||
18 | |||
19 | SRC_URI = "http://ewi546.ewi.utwente.nl/OE/eabi/linux-libc-headers-${PV}.tar.bz2 \ | ||
20 | file://keyboard.patch;patch=1 \ | ||
21 | file://asm-arch-irqs.patch;patch=1 \ | ||
22 | file://linux-netdevice.patch;patch=1 \ | ||
23 | file://linux-netfilter_ipv4.patch;patch=1 \ | ||
24 | file://linux-rtc.patch;patch=1 \ | ||
25 | file://linux-videodev2.patch;patch=1 \ | ||
26 | file://3477-1.patch;patch=1" | ||
27 | |||
28 | S = "${WORKDIR}/linux-libc-headers-${PV}" | ||
29 | |||
30 | do_configure () { | ||
31 | case ${TARGET_ARCH} in | ||
32 | alpha*) ARCH=alpha ;; | ||
33 | arm*) ARCH=arm ;; | ||
34 | cris*) ARCH=cris ;; | ||
35 | hppa*) ARCH=parisc ;; | ||
36 | i*86*) ARCH=i386 ;; | ||
37 | ia64*) ARCH=ia64 ;; | ||
38 | mips*) ARCH=mips ;; | ||
39 | m68k*) ARCH=m68k ;; | ||
40 | powerpc*) ARCH=ppc ;; | ||
41 | s390*) ARCH=s390 ;; | ||
42 | sh*) ARCH=sh ;; | ||
43 | sparc64*) ARCH=sparc64 ;; | ||
44 | sparc*) ARCH=sparc ;; | ||
45 | x86_64*) ARCH=x86_64 ;; | ||
46 | esac | ||
47 | if test ! -e include/asm-$ARCH; then | ||
48 | oefatal unable to create asm symlink in kernel headers | ||
49 | fi | ||
50 | rm "include/asm" | ||
51 | cp -pPR "include/asm-$ARCH" "include/asm" | ||
52 | if test "$ARCH" = "arm"; then | ||
53 | cp -pPR include/asm/arch-ebsa285 include/asm/arch | ||
54 | elif test "$ARCH" = "sh"; then | ||
55 | cp -pPR include/asm/cpu-${TARGET_ARCH} include/asm/cpu || die "unable to create include/asm/cpu" | ||
56 | fi | ||
57 | } | ||
58 | |||
59 | do_stage () { | ||
60 | install -d ${STAGING_INCDIR} | ||
61 | rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm ${STAGING_INCDIR}/asm-generic | ||
62 | cp -pfLR include/linux ${STAGING_INCDIR}/ | ||
63 | cp -pfLR include/asm ${STAGING_INCDIR}/ | ||
64 | cp -pfLR include/asm-generic ${STAGING_INCDIR}/ | ||
65 | rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/linux | ||
66 | rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm | ||
67 | rm -rf ${CROSS_DIR}/${TARGET_SYS}/include/asm-generic | ||
68 | install -d ${CROSS_DIR}/${TARGET_SYS}/include | ||
69 | cp -pfLR include/linux ${CROSS_DIR}/${TARGET_SYS}/include/ | ||
70 | cp -pfLR include/asm ${CROSS_DIR}/${TARGET_SYS}/include/ | ||
71 | cp -pfLR include/asm-generic ${CROSS_DIR}/${TARGET_SYS}/include/ | ||
72 | } | ||
73 | |||
74 | do_install() { | ||
75 | install -d ${D}${includedir} | ||
76 | cp -pfLR include/linux ${D}${includedir}/ | ||
77 | cp -pfLR include/asm ${D}${includedir}/ | ||
78 | cp -pfLR include/asm-generic ${D}${includedir}/ | ||
79 | } | ||
80 | |||