rename GPL to LICENSE
[openwrt/svn-archive/archive.git] / openwrt / toolchain / binutils / 2.14.90.0.8 / 001-debian.patch
1 diff -urN binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c binutils-2.14.90.0.8/bfd/elf64-alpha.c
2 --- binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c 2004-01-14 15:07:43.000000000 -0600
3 +++ binutils-2.14.90.0.8/bfd/elf64-alpha.c 2004-02-11 03:42:05.000000000 -0600
4 @@ -4144,9 +4144,12 @@
5
6 loc = srel->contents;
7 loc += srel->reloc_count++ * sizeof (Elf64_External_Rela);
8 - bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
9 - BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
10 - <= srel->_cooked_size);
11 + if (loc)
12 + {
13 + bfd_elf64_swap_reloca_out (abfd, &outrel, loc);
14 + BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count
15 + <= srel->_cooked_size);
16 + }
17 }
18
19 /* Relocate an Alpha ELF section for a relocatable link.
20 diff -urN binutils-2.14.90.0.8-dist/bfd/opncls.c binutils-2.14.90.0.8/bfd/opncls.c
21 --- binutils-2.14.90.0.8-dist/bfd/opncls.c 2004-01-14 15:07:43.000000000 -0600
22 +++ binutils-2.14.90.0.8/bfd/opncls.c 2004-02-11 03:42:01.000000000 -0600
23 @@ -150,6 +150,13 @@
24 {
25 bfd *nbfd;
26 const bfd_target *target_vec;
27 + struct stat s;
28 +
29 + if (stat (filename, &s) == 0)
30 + if (S_ISDIR(s.st_mode)) {
31 + bfd_set_error (bfd_error_file_not_recognized);
32 + return NULL;
33 + }
34
35 nbfd = _bfd_new_bfd ();
36 if (nbfd == NULL)
37 diff -urN binutils-2.14.90.0.8-dist/gprof/gprof.texi binutils-2.14.90.0.8/gprof/gprof.texi
38 --- binutils-2.14.90.0.8-dist/gprof/gprof.texi 2004-01-14 15:07:51.000000000 -0600
39 +++ binutils-2.14.90.0.8/gprof/gprof.texi 2004-02-11 03:42:01.000000000 -0600
40 @@ -138,6 +138,10 @@
41 If more than one profile file is specified, the @code{gprof}
42 output shows the sum of the profile information in the given profile files.
43
44 +If you use gcc 2.95.x or 3.0 to compile your binaries, you may need
45 +to add the @samp{-fprofile-arcs} to the compile command line in order
46 +for the call graphs to be properly stored in gmon.out.
47 +
48 @code{Gprof} calculates the amount of time spent in each routine.
49 Next, these times are propagated along the edges of the call graph.
50 Cycles are discovered, and calls into a cycle are made to share the time
51 @@ -182,7 +186,7 @@
52 @c man end
53
54 @c man begin SEEALSO
55 -monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
56 +profil(2), cc(1), prof(1), and the Info entry for @file{gprof}.
57
58 ``An Execution Profiler for Modular Programs'',
59 by S. Graham, P. Kessler, M. McKusick;
60 @@ -268,6 +272,11 @@
61 options. The same option, @samp{-pg}, alters either compilation or linking
62 to do what is necessary for profiling. Here are examples:
63
64 +If you use gcc 2.95.x or 3.0.x, you may need to add the
65 +@samp{-fprofile-arcs} option to the compile line along with @samp{-pg}
66 +in order to allow the call-graphs to be properly included in the gmon.out
67 +file.
68 +
69 @example
70 cc -g -c myprog.c utils.c -pg
71 cc -o myprog myprog.o utils.o -pg
72 diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.am binutils-2.14.90.0.8/ld/Makefile.am
73 --- binutils-2.14.90.0.8-dist/ld/Makefile.am 2004-01-14 15:07:52.000000000 -0600
74 +++ binutils-2.14.90.0.8/ld/Makefile.am 2004-02-11 03:42:01.000000000 -0600
75 @@ -19,7 +19,7 @@
76 # We put the scripts in the directory $(scriptdir)/ldscripts.
77 # We can't put the scripts in $(datadir) because the SEARCH_DIR
78 # directives need to be different for native and cross linkers.
79 -scriptdir = $(tooldir)/lib
80 +scriptdir = $(libdir)
81
82 EMUL = @EMUL@
83 EMULATION_OFILES = @EMULATION_OFILES@
84 diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.in binutils-2.14.90.0.8/ld/Makefile.in
85 --- binutils-2.14.90.0.8-dist/ld/Makefile.in 2004-01-14 15:07:52.000000000 -0600
86 +++ binutils-2.14.90.0.8/ld/Makefile.in 2004-02-11 03:42:01.000000000 -0600
87 @@ -128,7 +128,7 @@
88 # We put the scripts in the directory $(scriptdir)/ldscripts.
89 # We can't put the scripts in $(datadir) because the SEARCH_DIR
90 # directives need to be different for native and cross linkers.
91 -scriptdir = $(tooldir)/lib
92 +scriptdir = $(libdir)
93
94 EMUL = @EMUL@
95 EMULATION_OFILES = @EMULATION_OFILES@
96 diff -urN binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em binutils-2.14.90.0.8/ld/emultempl/elf32.em
97 --- binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em 2004-01-14 15:07:53.000000000 -0600
98 +++ binutils-2.14.90.0.8/ld/emultempl/elf32.em 2004-02-11 03:42:01.000000000 -0600
99 @@ -671,6 +671,8 @@
100 && command_line.rpath == NULL)
101 {
102 lib_path = (const char *) getenv ("LD_RUN_PATH");
103 + if ((lib_path) && (strlen (lib_path) == 0))
104 + lib_path = NULL;
105 if (gld${EMULATION_NAME}_search_needed (lib_path, l->name,
106 force))
107 break;
108 @@ -850,6 +852,8 @@
109 rpath = command_line.rpath;
110 if (rpath == NULL)
111 rpath = (const char *) getenv ("LD_RUN_PATH");
112 + if ((rpath) && (strlen (rpath) == 0))
113 + rpath = NULL;
114 if (! (bfd_elf${ELFSIZE}_size_dynamic_sections
115 (output_bfd, command_line.soname, rpath,
116 command_line.filter_shlib,
117 diff -urN binutils-2.14.90.0.8-dist/ltmain.sh binutils-2.14.90.0.8/ltmain.sh
118 --- binutils-2.14.90.0.8-dist/ltmain.sh 2002-03-22 16:06:16.000000000 -0600
119 +++ binutils-2.14.90.0.8/ltmain.sh 2004-02-11 03:42:05.000000000 -0600
120 @@ -4413,6 +4413,10 @@
121 # LD_LIBRARY_PATH before the program is installed.
122 $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
123 $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
124 + if test -n "$linkname"; then
125 + $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)"
126 + $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $?
127 + fi
128 ;;
129 esac
130 exit 0
131 diff -urN binutils-2.14.90.0.8-dist/opcodes/i386-dis.c binutils-2.14.90.0.8/opcodes/i386-dis.c
132 --- binutils-2.14.90.0.8-dist/opcodes/i386-dis.c 2004-01-14 15:07:55.000000000 -0600
133 +++ binutils-2.14.90.0.8/opcodes/i386-dis.c 2004-02-11 03:42:01.000000000 -0600
134 @@ -1879,7 +1879,7 @@
135 * The function returns the length of this instruction in bytes.
136 */
137
138 -static char intel_syntax;
139 +static signed char intel_syntax;
140 static char open_char;
141 static char close_char;
142 static char separator_char;