diff options
author | Khem Raj <raj.khem@gmail.com> | 2009-03-20 11:51:17 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2009-03-20 11:51:17 -0700 |
commit | c3c3af2895a810ab6ffc93ea73afb73a88c9246f (patch) | |
tree | 50c8f53d83a7f468c764264dc7ab8a9a9acf970b /recipes | |
parent | 295488d84cc0b856e97a6fab0d725d33e5e55873 (diff) |
binutils_cvs: Various fixes to get it building.
* Port patched needed from binutils 2.19.
* Refresh the old patches.
* Cover for bitbake fetcher lameness where it
checks out the while src tree when we only
asked for binutils module. So we have to build
selective targets.
Diffstat (limited to 'recipes')
7 files changed, 150 insertions, 30 deletions
diff --git a/recipes/binutils/binutils-cross_cvs.bb b/recipes/binutils/binutils-cross_cvs.bb index 5236f766e1..df1702887c 100644 --- a/recipes/binutils/binutils-cross_cvs.bb +++ b/recipes/binutils/binutils-cross_cvs.bb @@ -1,3 +1,7 @@ require binutils_cvs.bb require binutils-cross.inc FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" + +do_stage () { + oe_runmake install-ld install-binutils install-gas +} diff --git a/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch b/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch index ca586843f2..2623301da0 100644 --- a/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch +++ b/recipes/binutils/binutils-cvs/110-arm-eabi-conf.patch @@ -1,24 +1,22 @@ -diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure ---- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300 -+++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300 -@@ -1299,7 +1299,7 @@ - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) +--- /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" - noconfigdirs="$noconfigdirs target-libjava target-libobjc" - ;; -diff -urN binutils-2.16.91.0.7.orig/configure.ac binutils-2.16.91.0.7/configure.ac ---- binutils-2.16.91.0.7.orig/configure.ac 2006-05-31 14:54:24.000000000 +0300 -+++ binutils-2.16.91.0.7/configure.ac 2006-05-31 14:55:53.000000000 +0300 -@@ -497,7 +497,7 @@ - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" + libgloss_dir=arm ;; - arm*-*-linux-gnueabi) + arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) - noconfigdirs="$noconfigdirs target-libffi target-qthreads" - noconfigdirs="$noconfigdirs target-libjava target-libobjc" - ;; + 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 new file mode 100644 index 0000000000..c5e4234f22 --- /dev/null +++ b/recipes/binutils/binutils-cvs/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 <leonw@mailcan.com> + +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-arm-pr7093.patch b/recipes/binutils/binutils-cvs/binutils-arm-pr7093.patch new file mode 100644 index 0000000000..ad4a556e0f --- /dev/null +++ b/recipes/binutils/binutils-cvs/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-cvs/binutils-uclibc-100-uclibc-conf.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-100-uclibc-conf.patch new file mode 100644 index 0000000000..8de04e0fe0 --- /dev/null +++ b/recipes/binutils/binutils-cvs/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-cvs/binutils-uclibc-gas-needs-libm.patch b/recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch new file mode 100644 index 0000000000..db838cf20c --- /dev/null +++ b/recipes/binutils/binutils-cvs/binutils-uclibc-gas-needs-libm.patch @@ -0,0 +1,38 @@ +Source: Khem Raj <raj.khem@gmail.com> +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 index 288450cf58..75c88867f1 100644 --- a/recipes/binutils/binutils_cvs.bb +++ b/recipes/binutils/binutils_cvs.bb @@ -1,27 +1,35 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" PV = "0.0+cvs${SRCDATE}" -PR = "r3" +PR = "r0" require binutils.inc 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://build_fix.patch;patch=1 \ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \ + file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \ file://110-arm-eabi-conf.patch;patch=1 \ file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \ file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \ - file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1" - -#EXTRA_OECONF = "--with-sysroot=/" + file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \ + file://binutils-uclibc-gas-needs-libm.patch;patch=1 \ + " -do_configure_prepend () { - # RP: - # Remove rda and libgloss since they won't cross compile - # we don't need them anyway... - # Also remove gdb, we build that separately. - rm ${S}/gdb -Rf - rm ${S}/rda -Rf - rm ${S}/libgloss -Rf +do_compile () { + oe_runmake all-ld all-binutils all-gas +} +do_install () { + oe_runmake install-ld install-binutils install-gas +} +do_stage () { + oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/ + oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/ + oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/ + install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/ + install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/ + install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/ } |