summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/binutils
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-05-09 16:35:43 +0000
committerRichard Purdie <richard@openedhand.com>2006-05-09 16:35:43 +0000
commit8e898fe29b4b621df383b49b4a1df8d7d12b9a8f (patch)
tree383d65ec1202a8bb5891e9c68ed5e681b1b8e53e /openembedded/packages/binutils
parent8100c3dbd30a3c28306c9d176323b4a69d101a6a (diff)
downloadpoky-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/binutils')
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch31
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-100-uclibc-conf.patch139
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch26
-rw-r--r--openembedded/packages/binutils/binutils-2.16.91.0.7/binutils-uclibc-702-binutils-skip-comments.patch93
-rw-r--r--openembedded/packages/binutils/binutils-cross_2.16.91.0.7.bb32
-rw-r--r--openembedded/packages/binutils/binutils_2.15.94.0.1.bb3
-rw-r--r--openembedded/packages/binutils/binutils_2.16.91.0.7.bb123
-rw-r--r--openembedded/packages/binutils/files/objdump_fix.patch134
11 files changed, 720 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
10if [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14
15[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
16patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
17
18case "$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;;
24esac
25
26exit 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
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$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;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -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
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$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;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -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 @@
1Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
2Fixes
3localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
4when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
5
6Paths adjusted to match crosstool's patcher.
7
8Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
9From: Andreas Schwab <schwab at suse dot de>
10To: Nathan Sidwell <nathan at codesourcery dot com>
11Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
12Date: Fri, 23 Apr 2004 22:27:19 +0200
13Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
14
15Nathan 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
42This means that the unknown character is no longer ignored, despite the
43comment. As a side effect a line starting with a line comment character
44not followed by APP in NO_APP mode now triggers an error instead of just a
45warning, breaking builds of glibc on m68k-linux. Earlier in
46read_a_source_file where #APP is handled there is another comment that
47claims that unknown comments are ignored, when in fact they aren't (only
48the initial line comment character is skipped).
49
50Note that the presence of #APP will mess up the line counters, but
51that appears to be difficult to fix.
52
53Andreas.
54
552004-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--
90Andreas Schwab, SuSE Labs, schwab@suse.de
91SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
92Key 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 @@
1SECTION = "devel"
2include binutils_${PV}.bb
3inherit cross
4DEPENDS += "flex-native bison-native"
5PROVIDES = "virtual/${TARGET_PREFIX}binutils"
6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
7PACKAGES = ""
8EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
9 --program-prefix=${TARGET_PREFIX}"
10
11do_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
30do_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/"
3SECTION = "devel" 3SECTION = "devel"
4LICENSE = "GPL" 4LICENSE = "GPL"
5MAINTAINER = "Gerald Britton <gbritton@doomcom.org>" 5MAINTAINER = "Gerald Britton <gbritton@doomcom.org>"
6PR = "r1" 6PR = "r2"
7 7
8inherit autotools gettext 8inherit 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 @@
1DESCRIPTION = "A GNU collection of binary utilities"
2HOMEPAGE = "http://www.gnu.org/software/binutils/"
3SECTION = "devel"
4LICENSE = "GPL"
5DEFAULT_PREFERENCE = "-1"
6
7inherit autotools gettext
8
9PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
10
11FILES_${PN} = " \
12 ${bindir}/${TARGET_PREFIX}* \
13 ${libdir}/lib*-*.so \
14 ${prefix}/${TARGET_SYS}/bin/*"
15
16FILES_${PN}-dev = " \
17 ${includedir} \
18 ${libdir}/*.a \
19 ${libdir}/*.la \
20 ${libdir}/libbfd.so \
21 ${libdir}/libopcodes.so"
22
23FILES_${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
39SRC_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
49S = "${WORKDIR}/binutils-${PV}"
50B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
51
52EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
53 --enable-shared"
54
55# This is necessary due to a bug in the binutils Makefiles
56EXTRA_OEMAKE = "configure-build-libiberty all"
57
58export AR = "${HOST_PREFIX}ar"
59export AS = "${HOST_PREFIX}as"
60export LD = "${HOST_PREFIX}ld"
61export NM = "${HOST_PREFIX}nm"
62export RANLIB = "${HOST_PREFIX}ranlib"
63export OBJCOPY = "${HOST_PREFIX}objcopy"
64export OBJDUMP = "${HOST_PREFIX}objdump"
65
66export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
67export AS_FOR_TARGET = "${TARGET_PREFIX}as"
68export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
69export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
70export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
71
72export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
73export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
74
75export CC_FOR_BUILD = "${BUILD_CC}"
76export CPP_FOR_BUILD = "${BUILD_CPP}"
77export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
78
79export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
80
81do_configure () {
82 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
83 oe_runconf
84}
85
86do_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
98do_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 @@
1From binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com Tue Feb 22 19:24:15 2005
2Return-Path: <binutils-return-38148-listarch-binutils=sources dot redhat dot com at sources dot redhat dot com>
3Delivered-To: listarch-binutils at sources dot redhat dot com
4Received: (qmail 4446 invoked by alias); 22 Feb 2005 19:24:15 -0000
5Mailing-List: contact binutils-help at sources dot redhat dot com; run by ezmlm
6Precedence: bulk
7List-Subscribe: <mailto:binutils-subscribe at sources dot redhat dot com>
8List-Archive: <http://sources.redhat.com/ml/binutils/>
9List-Post: <mailto:binutils at sources dot redhat dot com>
10List-Help: <mailto:binutils-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
11Sender: binutils-owner at sources dot redhat dot com
12Delivered-To: mailing list binutils at sources dot redhat dot com
13Received: (qmail 4401 invoked from network); 22 Feb 2005 19:24:08 -0000
14Received: from unknown (HELO bgo1smout1.broadpark.no) (217.13.4.94)
15 by sourceware dot org with SMTP; 22 Feb 2005 19:24:08 -0000
16Received: 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)
21Received: 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)
25Date: Tue, 22 Feb 2005 20:24:08 +0100
26From: =?ISO-8859-1?Q?Stig_Petter_Olsr=F8d?= <stigpo at users dot sourceforge dot net>
27Subject: [PATCH] objdump relocation fixes for ARM disassembly
28To: binutils at sources dot redhat dot com
29Message-id: <421B86D8.8080604@users.sourceforge.net>
30MIME-version: 1.0
31Content-type: text/plain; charset=ISO-8859-1; format=flowed
32Content-transfer-encoding: 7BIT
33User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
34
35Hello,
36
37objdump disassembly did not relocate correctly for the ARM processor. It seems
38that the test for triggering the INSN_HAS_RELOC flag was void (one test killed the other,
39since octets would always be zero) and all relocations would thus fail. I changed the test
40so the flag is set when we are about to disassemble an insn that the current relocation
41entry points to. I also changed objdump_print_addr to use the current relocation entry if
42the insn has such an entry. This causes the symbol printed to be correct for both external
43symbols (from the undefined section) and local symbols.
44
45This has only been tested for the ARM processor, but I don't think it should break other
46DISASSEMBLER_NEEDS_RELOCS processors either.
47
48
49binutils/
50
512005-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