binutils/binutils.patch

Wed, 14 Jan 2009 15:59:12 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 14 Jan 2009 15:59:12 +0100
changeset 86
78e7deb1d6ab
parent 68
49e9fb8edd05
child 331
44acfa481149
permissions
-rw-r--r--

Correct and improve many buildconf and code logic blocks. In particular:
1. Document potential problems building with current binutils releases.
2. Document the flawed webkit and explain its temporary exclusion.
3. Document the edition of Qt which is built and installed.
4. Remove the Solaris x11_supdir logic as it is no longer found.
5. Correct several .pr[io] files including QMAKE_CXXFLAGS and INCPATH,
which previously caused preexisting Qt installations to deliver
erroneous old include and library logic instead of relying on
that of the currently building package. -I/opkg/include is now
placed at the end of the compile statements.
6. Don't trust the QMAKE_[INC|LIB]DIR_X11 identifiers in qmake.conf.
7. Allow more 64-bit builds and more properly identify the platform.
8. Place plugins (which are shared objects) in lib instead of share.
9. Build components as plugins when possible if with_shared is enabled.
10. Translate German text to English to be more consistent.
11. Instead of removing the pkgconfig directory of with_shared builds,
place it in a child directory useful for shared building.
12. Document the nonstandard shared build directory structure,
including using the hidden pkgconfig directory (PKG_CONFIG_PATH.)
13. Change %doc to specify files rather than directories in the RPM DB.

michael@68 1 Use the platform specific ELF branding expected under FreeBSD.
michael@68 2 This is similar to what the vendor ld(1) does on this platform.
michael@68 3
michael@68 4 Additionally, recognize and ignore Solaris 10's "Solaris Cryptographic
michael@68 5 Framework" ELF header type "SUNW_signature", Solaris 10 "Symbol
michael@68 6 information" ELF header type "SUNW_syminfo" and Solaris 10 "DTrace
michael@68 7 Object Format" ELF header type. Also, fix the path to the dynamic
michael@68 8 linker under Solaris 10/amd64.
michael@68 9
michael@68 10 Index: include/elf/common.h
michael@68 11 --- include/elf/common.h.orig 2007-08-28 19:19:40 +0200
michael@68 12 +++ include/elf/common.h 2007-08-29 09:30:04 +0200
michael@68 13 @@ -353,6 +353,9 @@
michael@68 14 #define SHT_SUNW_verdef 0x6ffffffd /* Versions defined by file */
michael@68 15 #define SHT_SUNW_verneed 0x6ffffffe /* Versions needed by file */
michael@68 16 #define SHT_SUNW_versym 0x6fffffff /* Symbol versions */
michael@68 17 +#define SHT_SUNW_syminfo 0x6ffffffc /* Symbol information */
michael@68 18 +#define SHT_SUNW_signature 0x6ffffff6 /* Solaris Cryptographic Framework: Digital Signature */
michael@68 19 +#define SHT_SUNW_dof 0x6ffffff4 /* Solaris DTrace Object Format */
michael@68 20
michael@68 21 #define SHT_GNU_verdef SHT_SUNW_verdef
michael@68 22 #define SHT_GNU_verneed SHT_SUNW_verneed
michael@68 23 Index: bfd/elf.c
michael@68 24 --- bfd/elf.c.orig 2007-08-28 19:19:33 +0200
michael@68 25 +++ bfd/elf.c 2007-08-29 09:30:04 +0200
michael@68 26 @@ -1793,6 +1793,11 @@
michael@68 27 elf_tdata (abfd)->dynverref_hdr = *hdr;
michael@68 28 return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
michael@68 29
michael@68 30 + case SHT_SUNW_syminfo:
michael@68 31 + /* case SHT_SUNW_signature: conflicts with new SHT_GNU_HASH in Binutils 2.18 */
michael@68 32 + case SHT_SUNW_dof:
michael@68 33 + return TRUE;
michael@68 34 +
michael@68 35 case SHT_SHLIB:
michael@68 36 return TRUE;
michael@68 37
michael@68 38 @@ -4682,6 +4687,12 @@
michael@68 39 else
michael@68 40 i_ehdrp->e_type = ET_REL;
michael@68 41
michael@68 42 + /* OpenPKG platform branding BEGIN */
michael@68 43 +#if defined(OPENPKG_OS_FREEBSD)
michael@68 44 + i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
michael@68 45 +#endif
michael@68 46 + /* OpenPKG platform branding END */
michael@68 47 +
michael@68 48 switch (bfd_get_arch (abfd))
michael@68 49 {
michael@68 50 case bfd_arch_unknown:
michael@68 51 Index: bfd/elf64-x86-64.c
michael@68 52 --- bfd/elf64-x86-64.c.orig 2007-08-06 21:59:33 +0200
michael@68 53 +++ bfd/elf64-x86-64.c 2007-08-29 09:30:04 +0200
michael@68 54 @@ -345,7 +345,11 @@
michael@68 55 /* The name of the dynamic interpreter. This is put in the .interp
michael@68 56 section. */
michael@68 57
michael@68 58 +#if defined(OPENPKG_OS_SOLARIS)
michael@68 59 +#define ELF_DYNAMIC_INTERPRETER "/lib/amd64/ld.so.1"
michael@68 60 +#else
michael@68 61 #define ELF_DYNAMIC_INTERPRETER "/lib/ld64.so.1"
michael@68 62 +#endif
michael@68 63
michael@68 64 /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
michael@68 65 copying dynamic variables from a shared lib into an app's dynbss
michael@68 66
michael@68 67 -----------------------------------------------------------------------------
michael@68 68
michael@68 69 Support FreeBSD >= 4.10 by fixing platform detection.
michael@68 70
michael@68 71 Index: bfd/configure
michael@68 72 --- bfd/configure.orig 2007-08-28 22:19:51 +0200
michael@68 73 +++ bfd/configure 2007-08-29 09:30:04 +0200
michael@68 74 @@ -17459,6 +17459,10 @@
michael@68 75 i[3-7]86-*-bsdi)
michael@68 76 COREFILE=
michael@68 77 ;;
michael@68 78 + i[3456]86-*-freebsd4.1[0-9]*)
michael@68 79 + COREFILE=''
michael@68 80 + TRAD_HEADER='"hosts/i386bsd.h"'
michael@68 81 + ;;
michael@68 82 i[3-7]86-*-bsd* | i[3-7]86-*-freebsd[123] | i[3-7]86-*-freebsd[123]\.* | i[3-7]86-*-freebsd4\.[01234] | i[3-7]86-*-freebsd4\.[01234]\.* | i[3-7]86-*-freebsd*aout*)
michael@68 83 COREFILE=trad-core.lo
michael@68 84 TRAD_HEADER='"hosts/i386bsd.h"'
michael@68 85
michael@68 86 -----------------------------------------------------------------------------
michael@68 87
michael@68 88 Fight problems with --disable-nls under Solaris
michael@68 89
michael@68 90 Index: gas/asintl.h
michael@68 91 --- gas/asintl.h.orig 2007-08-06 21:59:49 +0200
michael@68 92 +++ gas/asintl.h 2007-08-29 09:30:04 +0200
michael@68 93 @@ -20,6 +20,11 @@
michael@68 94 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
michael@68 95 02110-1301, USA. */
michael@68 96
michael@68 97 +#ifndef ENABLE_NLS
michael@68 98 +# define _LIBINTL_H
michael@68 99 +# define _LIBGETTEXT_H
michael@68 100 +#endif
michael@68 101 +
michael@68 102 #ifdef HAVE_LOCALE_H
michael@68 103 # ifndef ENABLE_NLS
michael@68 104 /* The Solaris version of locale.h always includes libintl.h. If we have
michael@68 105 Index: ld/ld.h
michael@68 106 --- ld/ld.h.orig 2007-08-06 22:00:19 +0200
michael@68 107 +++ ld/ld.h 2007-08-29 09:30:04 +0200
michael@68 108 @@ -23,6 +23,11 @@
michael@68 109 #ifndef LD_H
michael@68 110 #define LD_H
michael@68 111
michael@68 112 +#ifndef ENABLE_NLS
michael@68 113 +# define _LIBINTL_H
michael@68 114 +# define _LIBGETTEXT_H
michael@68 115 +#endif
michael@68 116 +
michael@68 117 #ifdef HAVE_LOCALE_H
michael@68 118 #endif
michael@68 119 #ifndef SEEK_CUR
michael@68 120 Index: ld/Makefile.in
michael@68 121 --- ld/Makefile.in.orig 2007-08-06 22:29:54 +0200
michael@68 122 +++ ld/Makefile.in 2007-08-29 09:30:04 +0200
michael@68 123 @@ -287,7 +287,7 @@
michael@68 124 # We put the scripts in the directory $(scriptdir)/ldscripts.
michael@68 125 # We can't put the scripts in $(datadir) because the SEARCH_DIR
michael@68 126 # directives need to be different for native and cross linkers.
michael@68 127 -scriptdir = $(tooldir)/lib
michael@68 128 +scriptdir = $(libdir)
michael@68 129 BASEDIR = $(srcdir)/..
michael@68 130 BFDDIR = $(BASEDIR)/bfd
michael@68 131 INCDIR = $(BASEDIR)/include
michael@68 132
michael@68 133 -----------------------------------------------------------------------------
michael@68 134
michael@68 135 workaround problems under Mac OS X.
michael@68 136
michael@68 137 Index: libiberty/fibheap.c
michael@68 138 --- libiberty/fibheap.c.orig 2005-05-10 17:33:33 +0200
michael@68 139 +++ libiberty/fibheap.c 2007-08-29 09:30:04 +0200
michael@68 140 @@ -34,8 +34,11 @@
michael@68 141 #include "libiberty.h"
michael@68 142 #include "fibheap.h"
michael@68 143
michael@68 144 -
michael@68 145 +#ifdef LONG_MIN
michael@68 146 #define FIBHEAPKEY_MIN LONG_MIN
michael@68 147 +#else
michael@68 148 +#define FIBHEAPKEY_MIN (-0x7fffffffL - 1)
michael@68 149 +#endif
michael@68 150
michael@68 151 static void fibheap_ins_root (fibheap_t, fibnode_t);
michael@68 152 static void fibheap_rem_root (fibheap_t, fibnode_t);
michael@68 153
michael@68 154 -----------------------------------------------------------------------------
michael@68 155
michael@68 156 Disable the "error" about "eh_frame_hdr" as it is actually more a
michael@68 157 warning (the linking is *not* aborted) and it occurs at least under
michael@68 158 FreeBSD-7.0/amd64 regularily without doing any obvious harm. Seems
michael@68 159 like the issue itself exists since a longer time, but in recent GNU
michael@68 160 binutils this additional message was introduced. As we cannot observe
michael@68 161 any problems and this message really confused, just disable it for now.
michael@68 162
michael@68 163 Index: bfd/elf-eh-frame.c
michael@68 164 --- bfd/elf-eh-frame.c.orig 2007-08-06 21:59:22 +0200
michael@68 165 +++ bfd/elf-eh-frame.c 2007-11-11 15:46:44 +0100
michael@68 166 @@ -970,9 +970,11 @@
michael@68 167 return offset != sec->rawsize;
michael@68 168
michael@68 169 free_no_table:
michael@68 170 +#if 0
michael@68 171 (*info->callbacks->einfo)
michael@68 172 (_("%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"),
michael@68 173 abfd, sec);
michael@68 174 +#endif
michael@68 175 if (ehbuf)
michael@68 176 free (ehbuf);
michael@68 177 if (sec_info)
michael@69 178 Index: bfd/elflink.c
michael@69 179 diff -Nau bfd/elflink.c.orig bfd/elflink.c
michael@69 180 --- bfd/elflink.c.orig 2007-08-24 16:01:08.000000000 +0200
michael@69 181 +++ bfd/elflink.c 2009-01-11 14:07:54.705525343 +0100
michael@69 182 @@ -4231,7 +4231,15 @@
michael@69 183 h->ref_regular_nonweak = 1;
michael@69 184 }
michael@69 185 else
michael@69 186 - h->def_regular = 1;
michael@69 187 + {
michael@69 188 + h->def_regular = 1;
michael@69 189 + if (h->def_dynamic)
michael@69 190 + {
michael@69 191 + h->def_dynamic = 0;
michael@69 192 + h->ref_dynamic = 1;
michael@69 193 + h->dynamic_def = 1;
michael@69 194 + }
michael@69 195 + }
michael@69 196 if (! info->executable
michael@69 197 || h->def_dynamic
michael@69 198 || h->ref_dynamic)

mercurial