]> git.pld-linux.org Git - packages/crossppc-binutils.git/blame - binutils-absolute-gnu_debuglink-path.patch
- strip rpm's install root.
[packages/crossppc-binutils.git] / binutils-absolute-gnu_debuglink-path.patch
CommitLineData
da39e285 1--- binutils-2.17.50.0.3/bfd/opncls.c.orig 2006-07-15 20:23:49.000000000 +0200
92c64343 2+++ binutils-2.17.50.0.3/bfd/opncls.c 2006-09-02 15:14:01.443277250 +0200
da39e285
PS
3@@ -1215,6 +1215,10 @@
4 return NULL;
5 }
6
92c64343 7+ /* PLD: check the possible absolute debuginfo path (e.g. /tmp/.../usr/lib/debug/... */
da39e285
PS
8+ if (separate_debug_file_exists (basename, crc32))
9+ return basename;
10+
11 dir = strdup (abfd->filename);
12 if (dir == NULL)
13 {
14@@ -1353,9 +1357,6 @@
15 return NULL;
16 }
17
18- /* Strip off any path components in filename. */
19- filename = lbasename (filename);
20-
21 sect = bfd_get_section_by_name (abfd, GNU_DEBUGLINK);
22 if (sect)
23 {
92c64343 24@@ -1439,9 +1440,10 @@
da39e285
PS
25 crc32 = bfd_calc_gnu_debuglink_crc32 (crc32, buffer, count);
26 fclose (handle);
27
28- /* Strip off any path components in filename,
29- now that we no longer need them. */
30- filename = lbasename (filename);
92c64343
PS
31+ /* PLD: for files installed in rpm's build root strip the install prefix */
32+ char const* relaxed_filename = strstr( filename, "/usr/lib/debug/" );
33+ if ( relaxed_filename != NULL )
34+ filename = relaxed_filename;
35
da39e285
PS
36 debuglink_size = strlen (filename) + 1;
37 debuglink_size += 3;
This page took 0.469468 seconds and 4 git commands to generate.