From 7b4734daf2b59d0255c5e8f28aeb27740bd034c1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 15 Nov 2010 12:14:22 -0800 Subject: binutils: Use git instead of cvs for SRC_URI for upstream version of binutils * Use the upcoming 2.21 branch as SRC_URI so that we can test it and provide feedback to upstream based on our testing use PREFERRED_VERSION_binutils-cross = "git" to select this and test it in builds and reports issues. Signed-off-by: Khem Raj --- recipes/binutils/binutils-cross-sdk_cvs.bb | 36 --------------- recipes/binutils/binutils-cross-sdk_git.bb | 2 + recipes/binutils/binutils-cross_cvs.bb | 7 --- recipes/binutils/binutils-cross_git.bb | 3 ++ .../binutils/binutils-cvs/110-arm-eabi-conf.patch | 22 ---------- .../binutils-cvs/binutils-2.16.1-e300c2c3.patch | 19 -------- ...tils-2.16.91.0.6-objcopy-rename-errorcode.patch | 39 ----------------- .../binutils-cvs/binutils-arm-pr7093.patch | 19 -------- .../binutils-uclibc-100-uclibc-conf.patch | 34 --------------- ...binutils-uclibc-300-001_ld_makefile_patch.patch | 50 --------------------- ...binutils-uclibc-300-006_better_file_error.patch | 43 ------------------ ...ils-uclibc-300-012_check_ldrunpath_length.patch | 48 -------------------- .../binutils-uclibc-gas-needs-libm.patch | 38 ---------------- .../binutils/binutils-git/110-arm-eabi-conf.patch | 22 ++++++++++ .../binutils-git/binutils-2.16.1-e300c2c3.patch | 19 ++++++++ ...tils-2.16.91.0.6-objcopy-rename-errorcode.patch | 39 +++++++++++++++++ .../binutils-git/binutils-arm-pr7093.patch | 19 ++++++++ .../binutils-uclibc-100-uclibc-conf.patch | 34 +++++++++++++++ ...binutils-uclibc-300-001_ld_makefile_patch.patch | 50 +++++++++++++++++++++ ...binutils-uclibc-300-006_better_file_error.patch | 43 ++++++++++++++++++ ...ils-uclibc-300-012_check_ldrunpath_length.patch | 48 ++++++++++++++++++++ .../binutils-uclibc-gas-needs-libm.patch | 38 ++++++++++++++++ recipes/binutils/binutils_cvs.bb | 51 ---------------------- recipes/binutils/binutils_git.bb | 15 +++++++ 24 files changed, 332 insertions(+), 406 deletions(-) delete mode 100644 recipes/binutils/binutils-cross-sdk_cvs.bb create mode 100644 recipes/binutils/binutils-cross-sdk_git.bb delete mode 100644 recipes/binutils/binutils-cross_cvs.bb create mode 100644 recipes/binutils/binutils-cross_git.bb delete mode 100644 recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-2.16.1-e300c2c3.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-arm-pr7093.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-uclibc-100-uclibc-conf.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch delete mode 100644 recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch create mode 100644 recipes/binutils/binutils-git/110-arm-eabi-conf.patch create mode 100644 recipes/binutils/binutils-git/binutils-2.16.1-e300c2c3.patch create mode 100644 recipes/binutils/binutils-git/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch create mode 100644 recipes/binutils/binutils-git/binutils-arm-pr7093.patch create mode 100644 recipes/binutils/binutils-git/binutils-uclibc-100-uclibc-conf.patch create mode 100644 recipes/binutils/binutils-git/binutils-uclibc-300-001_ld_makefile_patch.patch create mode 100644 recipes/binutils/binutils-git/binutils-uclibc-300-006_better_file_error.patch create mode 100644 recipes/binutils/binutils-git/binutils-uclibc-300-012_check_ldrunpath_length.patch create mode 100644 recipes/binutils/binutils-git/binutils-uclibc-gas-needs-libm.patch delete mode 100644 recipes/binutils/binutils_cvs.bb create mode 100644 recipes/binutils/binutils_git.bb (limited to 'recipes/binutils') diff --git a/recipes/binutils/binutils-cross-sdk_cvs.bb b/recipes/binutils/binutils-cross-sdk_cvs.bb deleted file mode 100644 index 985ed1a2a2..0000000000 --- a/recipes/binutils/binutils-cross-sdk_cvs.bb +++ /dev/null @@ -1,36 +0,0 @@ -require binutils_cvs.bb -require binutils-cross-sdk.inc - -PV = "2.20+cvs${SRCDATE}" - -PR = "${INC_PR}.2" -FILESPATHPKG .= ":binutils-cvs" - -do_install () { - oe_runmake 'DESTDIR=${D}' install-ld install-binutils install-gas - - # We don't really need these, so we'll remove them... - rm -rf ${D}${libdir}/ldscripts - - # Fix the /usr/${TARGET_SYS}/bin/* links - for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do - rm -f $l - ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ - | tr -s / \ - | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l - done - - # Install the libiberty header - install -d ${D}${includedir} - install -m 644 ${S}/include/ansidecl.h ${D}${includedir} - install -m 644 ${S}/include/libiberty.h ${D}${includedir} - - cd ${D}${bindir} - - # Symlinks for ease of running these on the native target - for p in ${TARGET_SYS}-* ; do - ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` - done - - rm ${D}${bindir}/ar ${D}${bindir}/strings -} diff --git a/recipes/binutils/binutils-cross-sdk_git.bb b/recipes/binutils/binutils-cross-sdk_git.bb new file mode 100644 index 0000000000..876af0b0f1 --- /dev/null +++ b/recipes/binutils/binutils-cross-sdk_git.bb @@ -0,0 +1,2 @@ +require binutils_git.bb +require binutils-cross-sdk.inc diff --git a/recipes/binutils/binutils-cross_cvs.bb b/recipes/binutils/binutils-cross_cvs.bb deleted file mode 100644 index eee356d3f0..0000000000 --- a/recipes/binutils/binutils-cross_cvs.bb +++ /dev/null @@ -1,7 +0,0 @@ -require binutils_cvs.bb -require binutils-cross.inc -FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" - -do_install () { - oe_runmake install-ld install-binutils install-gas -} diff --git a/recipes/binutils/binutils-cross_git.bb b/recipes/binutils/binutils-cross_git.bb new file mode 100644 index 0000000000..2df31fd663 --- /dev/null +++ b/recipes/binutils/binutils-cross_git.bb @@ -0,0 +1,3 @@ +require binutils_git.bb +require binutils-cross.inc +FILESPATHPKG =. "binutils-git:" diff --git a/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch b/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch deleted file mode 100644 index 2623301da0..0000000000 --- a/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200 -+++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200 -@@ -561,7 +561,7 @@ - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in ---- /tmp/configure 2008-06-22 14:17:11.000000000 +0200 -+++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200 -@@ -2307,7 +2307,7 @@ - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - libgloss_dir=arm - ;; -- arm*-*-linux-gnueabi) -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - noconfigdirs="$noconfigdirs target-qthreads" - noconfigdirs="$noconfigdirs target-libobjc" - case ${with_newlib} in diff --git a/recipes/binutils/binutils-cvs/binutils-2.16.1-e300c2c3.patch b/recipes/binutils/binutils-cvs/binutils-2.16.1-e300c2c3.patch deleted file mode 100644 index c5e4234f22..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-2.16.1-e300c2c3.patch +++ /dev/null @@ -1,19 +0,0 @@ -Adds support for Freescale Power architecture e300c2 and e300c3 cores. -http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm - -Leon Woestenberg - -diff -uNr binutils-2.16.1.orig/gas/config/tc-ppc.c binutils-2.16.1/gas/config/tc-ppc.c ---- binutils-2.16.1.orig/gas/config/tc-ppc.c 2005-03-02 13:24:01.000000000 +0000 -+++ binutils-2.16.1/gas/config/tc-ppc.c 2006-07-04 11:45:24.000000000 +0100 -@@ -879,6 +879,10 @@ - else - ppc_cpu |= PPC_OPCODE_SPE; - } -+ else if (strcmp (arg, "pmr") == 0) -+ { -+ ppc_cpu |= PPC_OPCODE_PMR; -+ } - /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC - 620. */ - else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0) diff --git a/recipes/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/recipes/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch deleted file mode 100644 index 8df5b1fea0..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch +++ /dev/null @@ -1,39 +0,0 @@ -# strip (and objcopy) fail to set the error code if there is no -# output file name and the rename of the stripped (or copied) file -# fails, yet the command fails to do anything. This fixes both -# objcopy and strip. -# -# modification by bero: Ported to 2.16.91.0.6 -# -#Signed-off-by: John Bowler -#Signed-off-by: Bernhard Rosenkraenzer ---- -# binutils/objcopy.c | 8 +++++--- -# 1 file changed, 5 insertions(+), 3 deletions(-) -# -Index: src/binutils/objcopy.c -=================================================================== ---- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100 -+++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100 -@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[]) - if (preserve_dates) - set_times (tmpname, &statbuf); - if (output_file != tmpname) -- smart_rename (tmpname, output_file ? output_file : argv[i], -- preserve_dates); -+ if (smart_rename (tmpname, output_file ? output_file : argv[i], -+ preserve_dates)) -+ hold_status = 1; - status = hold_status; - } - else -@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[]) - if (preserve_dates) - set_times (tmpname, &statbuf); - if (tmpname != output_filename) -- smart_rename (tmpname, input_filename, preserve_dates); -+ if (smart_rename (tmpname, input_filename, preserve_dates)) -+ status = 1; - } - else - unlink_if_ordinary (tmpname); diff --git a/recipes/binutils/binutils-cvs/binutils-arm-pr7093.patch b/recipes/binutils/binutils-cvs/binutils-arm-pr7093.patch deleted file mode 100644 index ad4a556e0f..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-arm-pr7093.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: binutils/bfd/elf32-arm.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-arm.c,v -retrieving revision 1.162 -retrieving revision 1.163 -diff -u -r1.162 -r1.163 ---- binutils/bfd/elf32-arm.c 23 Dec 2008 09:01:45 -0000 1.162 -+++ binutils/bfd/elf32-arm.c 23 Dec 2008 11:46:17 -0000 1.163 -@@ -4608,6 +4608,10 @@ - Elf_Internal_Shdr *hdr; - unsigned int i, localsyms; - -+ /* PR 7093: Make sure that we are dealing with an arm elf binary. */ -+ if (! is_arm_elf (abfd)) -+ return; -+ - if ((abfd->flags & DYNAMIC) != 0) - return; - diff --git a/recipes/binutils/binutils-cvs/binutils-uclibc-100-uclibc-conf.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-100-uclibc-conf.patch deleted file mode 100644 index 8de04e0fe0..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-uclibc-100-uclibc-conf.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- binutils-2.18.orig/configure -+++ binutils-2.18/configure -@@ -2206,7 +2206,7 @@ - am33_2.0-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; -- sh-*-linux*) -+ sh*-*-linux*) - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" - ;; - sh*-*-pe|mips*-*-pe|*arm-wince-pe) -@@ -2504,7 +2504,7 @@ - romp-*-*) - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" - ;; -- sh-*-* | sh64-*-*) -+ sh*-*-* | sh64-*-*) - case "${host}" in - i[3456789]86-*-vsta) ;; # don't add gprof back in - i[3456789]86-*-go32*) ;; # don't add gprof back in ---- binutils-2.18.orig/gprof/configure -+++ binutils-2.18/gprof/configure -@@ -4124,6 +4124,11 @@ - lt_cv_deplibs_check_method=pass_all - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' diff --git a/recipes/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch deleted file mode 100644 index 04a7e61e25..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -e -## 001_ld_makefile_patch.dpatch -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Description: correct where ld scripts are installed -## DP: Author: Chris Chimelis -## DP: Upstream status: N/A -## DP: Date: ?? - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ ---- binutils-2.16.91.0.1/ld/Makefile.am -+++ binutils-2.16.91.0.1/ld/Makefile.am -@@ -20,7 +20,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- binutils-2.16.91.0.1/ld/Makefile.in -+++ binutils-2.16.91.0.1/ld/Makefile.in -@@ -268,7 +268,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/recipes/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch deleted file mode 100644 index f337611edf..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -e -## 006_better_file_error.dpatch by David Kimdon -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Specify which filename is causing an error if the filename is a -## DP: directory. (#45832) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -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 ---- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 -+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 -@@ -150,6 +150,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) diff --git a/recipes/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch deleted file mode 100644 index b6f5a25ceb..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -e -## 012_check_ldrunpath_length.dpatch by Chris Chimelis -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for -## DP: cases where -rpath isn't specified. (#151024) - -if [ $# -ne 1 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi - -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts -patch_opts="${patch_opts:--f --no-backup-if-mismatch}" - -case "$1" in - -patch) patch $patch_opts -p1 < $0;; - -unpatch) patch $patch_opts -p1 -R < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1;; -esac - -exit 0 - -@DPATCH@ -Index: src/ld/emultempl/elf32.em -=================================================================== ---- src.orig/ld/emultempl/elf32.em 2009-09-23 06:54:28.000000000 -0700 -+++ src/ld/emultempl/elf32.em 2009-10-06 10:58:16.883414592 -0700 -@@ -1237,6 +1237,8 @@ fragment <link_next) - { diff --git a/recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch deleted file mode 100644 index db838cf20c..0000000000 --- a/recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch +++ /dev/null @@ -1,38 +0,0 @@ -Source: Khem Raj -Disposition: submit upstream. - -Description: - -We do not need to have the libtool patch anymore for binutils after -libtool has been updated upstream it include support for it. However -for building gas natively on uclibc systems we have to link it with --lm so that it picks up missing symbols. - -/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': -floatformat.c:(.text+0x1ec): undefined reference to `frexp' -floatformat.c:(.text+0x2f8): undefined reference to `ldexp' -/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': -floatformat.c:(.text+0x38a): undefined reference to `ldexp' -floatformat.c:(.text+0x3d2): undefined reference to `ldexp' -floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp' -collect2: ld returned 1 exit status -make[4]: *** [as-new] Error 1 - -Index: binutils-2.17.50/gas/configure.tgt -=================================================================== ---- binutils-2.17.50.orig/gas/configure.tgt -+++ binutils-2.17.50/gas/configure.tgt -@@ -408,6 +408,12 @@ case ${generic_target} in - *-*-netware) fmt=elf em=netware ;; - esac - -+case ${generic_target} in -+ arm-*-*uclibc*) -+ need_libm=yes -+ ;; -+esac -+ - case ${cpu_type} in - alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) - bfd_gas=yes - diff --git a/recipes/binutils/binutils-git/110-arm-eabi-conf.patch b/recipes/binutils/binutils-git/110-arm-eabi-conf.patch new file mode 100644 index 0000000000..2623301da0 --- /dev/null +++ b/recipes/binutils/binutils-git/110-arm-eabi-conf.patch @@ -0,0 +1,22 @@ +--- /tmp/configure.ac 2008-06-22 14:14:59.000000000 +0200 ++++ binutils-2.18.50.0.7/configure.ac 2008-06-22 14:15:30.000000000 +0200 +@@ -561,7 +561,7 @@ + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + libgloss_dir=arm + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-qthreads" + noconfigdirs="$noconfigdirs target-libobjc" + case ${with_newlib} in +--- /tmp/configure 2008-06-22 14:17:11.000000000 +0200 ++++ binutils-2.18.50.0.7/configure 2008-06-22 14:17:56.000000000 +0200 +@@ -2307,7 +2307,7 @@ + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + libgloss_dir=arm + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-qthreads" + noconfigdirs="$noconfigdirs target-libobjc" + case ${with_newlib} in diff --git a/recipes/binutils/binutils-git/binutils-2.16.1-e300c2c3.patch b/recipes/binutils/binutils-git/binutils-2.16.1-e300c2c3.patch new file mode 100644 index 0000000000..c5e4234f22 --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-2.16.1-e300c2c3.patch @@ -0,0 +1,19 @@ +Adds support for Freescale Power architecture e300c2 and e300c3 cores. +http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm + +Leon Woestenberg + +diff -uNr binutils-2.16.1.orig/gas/config/tc-ppc.c binutils-2.16.1/gas/config/tc-ppc.c +--- binutils-2.16.1.orig/gas/config/tc-ppc.c 2005-03-02 13:24:01.000000000 +0000 ++++ binutils-2.16.1/gas/config/tc-ppc.c 2006-07-04 11:45:24.000000000 +0100 +@@ -879,6 +879,10 @@ + else + ppc_cpu |= PPC_OPCODE_SPE; + } ++ else if (strcmp (arg, "pmr") == 0) ++ { ++ ppc_cpu |= PPC_OPCODE_PMR; ++ } + /* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC + 620. */ + else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0) diff --git a/recipes/binutils/binutils-git/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/recipes/binutils/binutils-git/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch new file mode 100644 index 0000000000..8df5b1fea0 --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch @@ -0,0 +1,39 @@ +# strip (and objcopy) fail to set the error code if there is no +# output file name and the rename of the stripped (or copied) file +# fails, yet the command fails to do anything. This fixes both +# objcopy and strip. +# +# modification by bero: Ported to 2.16.91.0.6 +# +#Signed-off-by: John Bowler +#Signed-off-by: Bernhard Rosenkraenzer +--- +# binutils/objcopy.c | 8 +++++--- +# 1 file changed, 5 insertions(+), 3 deletions(-) +# +Index: src/binutils/objcopy.c +=================================================================== +--- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100 ++++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100 +@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[]) + if (preserve_dates) + set_times (tmpname, &statbuf); + if (output_file != tmpname) +- smart_rename (tmpname, output_file ? output_file : argv[i], +- preserve_dates); ++ if (smart_rename (tmpname, output_file ? output_file : argv[i], ++ preserve_dates)) ++ hold_status = 1; + status = hold_status; + } + else +@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[]) + if (preserve_dates) + set_times (tmpname, &statbuf); + if (tmpname != output_filename) +- smart_rename (tmpname, input_filename, preserve_dates); ++ if (smart_rename (tmpname, input_filename, preserve_dates)) ++ status = 1; + } + else + unlink_if_ordinary (tmpname); diff --git a/recipes/binutils/binutils-git/binutils-arm-pr7093.patch b/recipes/binutils/binutils-git/binutils-arm-pr7093.patch new file mode 100644 index 0000000000..ad4a556e0f --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-arm-pr7093.patch @@ -0,0 +1,19 @@ +Index: binutils/bfd/elf32-arm.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-arm.c,v +retrieving revision 1.162 +retrieving revision 1.163 +diff -u -r1.162 -r1.163 +--- binutils/bfd/elf32-arm.c 23 Dec 2008 09:01:45 -0000 1.162 ++++ binutils/bfd/elf32-arm.c 23 Dec 2008 11:46:17 -0000 1.163 +@@ -4608,6 +4608,10 @@ + Elf_Internal_Shdr *hdr; + unsigned int i, localsyms; + ++ /* PR 7093: Make sure that we are dealing with an arm elf binary. */ ++ if (! is_arm_elf (abfd)) ++ return; ++ + if ((abfd->flags & DYNAMIC) != 0) + return; + diff --git a/recipes/binutils/binutils-git/binutils-uclibc-100-uclibc-conf.patch b/recipes/binutils/binutils-git/binutils-uclibc-100-uclibc-conf.patch new file mode 100644 index 0000000000..8de04e0fe0 --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-uclibc-100-uclibc-conf.patch @@ -0,0 +1,34 @@ +--- binutils-2.18.orig/configure ++++ binutils-2.18/configure +@@ -2206,7 +2206,7 @@ + am33_2.0-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; +- sh-*-linux*) ++ sh*-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; + sh*-*-pe|mips*-*-pe|*arm-wince-pe) +@@ -2504,7 +2504,7 @@ + romp-*-*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${host}" in + i[3456789]86-*-vsta) ;; # don't add gprof back in + i[3456789]86-*-go32*) ;; # don't add gprof back in +--- binutils-2.18.orig/gprof/configure ++++ binutils-2.18/gprof/configure +@@ -4124,6 +4124,11 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' diff --git a/recipes/binutils/binutils-git/binutils-uclibc-300-001_ld_makefile_patch.patch b/recipes/binutils/binutils-git/binutils-uclibc-300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..04a7e61e25 --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-uclibc-300-001_ld_makefile_patch.patch @@ -0,0 +1,50 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +--- binutils-2.16.91.0.1/ld/Makefile.am ++++ binutils-2.16.91.0.1/ld/Makefile.am +@@ -20,7 +20,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- binutils-2.16.91.0.1/ld/Makefile.in ++++ binutils-2.16.91.0.1/ld/Makefile.in +@@ -268,7 +268,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/recipes/binutils/binutils-git/binutils-uclibc-300-006_better_file_error.patch b/recipes/binutils/binutils-git/binutils-uclibc-300-006_better_file_error.patch new file mode 100644 index 0000000000..f337611edf --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-uclibc-300-006_better_file_error.patch @@ -0,0 +1,43 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +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 +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 ++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/recipes/binutils/binutils-git/binutils-uclibc-300-012_check_ldrunpath_length.patch b/recipes/binutils/binutils-git/binutils-uclibc-300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..b6f5a25ceb --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-uclibc-300-012_check_ldrunpath_length.patch @@ -0,0 +1,48 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +Index: src/ld/emultempl/elf32.em +=================================================================== +--- src.orig/ld/emultempl/elf32.em 2009-09-23 06:54:28.000000000 -0700 ++++ src/ld/emultempl/elf32.em 2009-10-06 10:58:16.883414592 -0700 +@@ -1237,6 +1237,8 @@ fragment <link_next) + { diff --git a/recipes/binutils/binutils-git/binutils-uclibc-gas-needs-libm.patch b/recipes/binutils/binutils-git/binutils-uclibc-gas-needs-libm.patch new file mode 100644 index 0000000000..db838cf20c --- /dev/null +++ b/recipes/binutils/binutils-git/binutils-uclibc-gas-needs-libm.patch @@ -0,0 +1,38 @@ +Source: Khem Raj +Disposition: submit upstream. + +Description: + +We do not need to have the libtool patch anymore for binutils after +libtool has been updated upstream it include support for it. However +for building gas natively on uclibc systems we have to link it with +-lm so that it picks up missing symbols. + +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': +floatformat.c:(.text+0x1ec): undefined reference to `frexp' +floatformat.c:(.text+0x2f8): undefined reference to `ldexp' +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': +floatformat.c:(.text+0x38a): undefined reference to `ldexp' +floatformat.c:(.text+0x3d2): undefined reference to `ldexp' +floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp' +collect2: ld returned 1 exit status +make[4]: *** [as-new] Error 1 + +Index: binutils-2.17.50/gas/configure.tgt +=================================================================== +--- binutils-2.17.50.orig/gas/configure.tgt ++++ binutils-2.17.50/gas/configure.tgt +@@ -408,6 +408,12 @@ case ${generic_target} in + *-*-netware) fmt=elf em=netware ;; + esac + ++case ${generic_target} in ++ arm-*-*uclibc*) ++ need_libm=yes ++ ;; ++esac ++ + case ${cpu_type} in + alpha | arm | i386 | ia64 | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) + bfd_gas=yes + diff --git a/recipes/binutils/binutils_cvs.bb b/recipes/binutils/binutils_cvs.bb deleted file mode 100644 index 239ef7a6ea..0000000000 --- a/recipes/binutils/binutils_cvs.bb +++ /dev/null @@ -1,51 +0,0 @@ -FILESPATHPKG =. "binutils-cvs:" -SRCDATE = "20100913" -PV = "2.20+cvs${SRCDATE}" - -require binutils.inc -PR = "${INC_PR}.2" - -S = "${WORKDIR}/src" -EXTRA_OEMAKE = "configure-build-libiberty" -SRC_URI = "cvs://anoncvs:anoncvs@sources.redhat.com/cvs/src;module=binutils;method=pserver;localdir=src \ - file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;maxdate=20090801 \ - file://binutils-uclibc-100-uclibc-conf.patch \ - file://110-arm-eabi-conf.patch \ - file://binutils-uclibc-300-001_ld_makefile_patch.patch \ - file://binutils-uclibc-300-006_better_file_error.patch \ - file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ - file://binutils-uclibc-gas-needs-libm.patch \ - " - -do_compile () { - oe_runmake all-ld all-binutils all-gas -} -do_install () { - oe_runmake 'DESTDIR=${D}' install-ld install-binutils install-gas - - # We don't really need these, so we'll remove them... - rm -rf ${D}${libdir}/ldscripts - - # Fix the /usr/${TARGET_SYS}/bin/* links - for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do - rm -f $l - ln -sf `echo ${prefix}/${TARGET_SYS}/bin \ - | tr -s / \ - | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l - done - - # Install the libiberty header - install -d ${D}${includedir} - install -m 644 ${S}/include/ansidecl.h ${D}${includedir} - install -m 644 ${S}/include/libiberty.h ${D}${includedir} - - cd ${D}${bindir} - - # Symlinks for ease of running these on the native target - for p in ${TARGET_SYS}-* ; do - ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,` - done - - rm ${D}${bindir}/ar ${D}${bindir}/strings -} - diff --git a/recipes/binutils/binutils_git.bb b/recipes/binutils/binutils_git.bb new file mode 100644 index 0000000000..bf94849e77 --- /dev/null +++ b/recipes/binutils/binutils_git.bb @@ -0,0 +1,15 @@ +FILESPATHPKG =. "binutils-git:" +SRCREV = "6ef128735ce52ee2acf8cfd80f6d72003dd39ab7" +require binutils.inc +PR = "${INC_PR}.2" +PR_append = "+gitr${SRCPV}" + +S = "${WORKDIR}/git" +SRC_URI = "git://sources.redhat.com/git/binutils.git;branch=binutils-2_21-branch;protocol=git \ + file://binutils-uclibc-100-uclibc-conf.patch \ + file://110-arm-eabi-conf.patch \ + file://binutils-uclibc-300-001_ld_makefile_patch.patch \ + file://binutils-uclibc-300-006_better_file_error.patch \ + file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ + file://binutils-uclibc-gas-needs-libm.patch \ + " -- cgit 1.2.3-korg