[oe-commits] org.oe.dev binutils-cvs: Update to work better with recent binutils cvs and use the common .inc file
rpurdie commit
openembedded-commits at lists.openembedded.org
Fri Aug 10 11:12:18 UTC 2007
binutils-cvs: Update to work better with recent binutils cvs and use the common .inc file
Author: rpurdie at openembedded.org
Branch: org.openembedded.dev
Revision: 4dfed09d2c25ca9f6bbf41b662fe678ff0849e93
ViewMTN: http://monotone.openembedded.org/revision.psp?id=4dfed09d2c25ca9f6bbf41b662fe678ff0849e93
Files:
1
packages/binutils/binutils-cvs/binutils-100_cflags_for_build.patch
packages/binutils/binutils-cvs/binutils-2.15.90.0.3-uclibc-200-build_modules.patch
packages/binutils/binutils-cvs/binutils-2.15.90.0.3-uclibc-210-cflags.patch
packages/binutils/binutils-cvs/binutils-2.15.91.0.1-uclibc-100-conf.patch
packages/binutils/binutils-cvs/110-arm-eabi-conf.patch
packages/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
packages/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch
packages/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch
packages/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch
packages/binutils/binutils-cvs/build_fix.patch
packages/binutils/binutils_cvs.bb
Diffs:
#
# mt diff -ref2a3871acd73627142caa5f487563b2a86f9c37 -r4dfed09d2c25ca9f6bbf41b662fe678ff0849e93
#
#
#
# delete "packages/binutils/binutils-cvs/binutils-100_cflags_for_build.patch"
#
# delete "packages/binutils/binutils-cvs/binutils-2.15.90.0.3-uclibc-200-build_modules.patch"
#
# delete "packages/binutils/binutils-cvs/binutils-2.15.90.0.3-uclibc-210-cflags.patch"
#
# delete "packages/binutils/binutils-cvs/binutils-2.15.91.0.1-uclibc-100-conf.patch"
#
# add_file "packages/binutils/binutils-cvs/110-arm-eabi-conf.patch"
# content [8e09b73459c127e091caa529ef5caa3ac70c04a2]
#
# add_file "packages/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch"
# content [e0a30885b4d82cb2b512d4a9241044cc8cdc768b]
#
# add_file "packages/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch"
# content [412df6ebe7f2dadc38a3d68b9a74accd998e927b]
#
# add_file "packages/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch"
# content [74aba67bda3813664cc7fa3182d68e8561ba8515]
#
# add_file "packages/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch"
# content [9fb1224ed588f35fac30d5fdb0a69713e51c3fa9]
#
# add_file "packages/binutils/binutils-cvs/build_fix.patch"
# content [4d1571a719c3f0ef9f1db58fab9462cf6e500a02]
#
# patch "packages/binutils/binutils_cvs.bb"
# from [0b544c7fcc03aa165c4543aca0be55d86eeae75e]
# to [6a4a5d296ebef18abfb49e106a5fccbe4cc04fc2]
#
============================================================
--- packages/binutils/binutils-cvs/110-arm-eabi-conf.patch 8e09b73459c127e091caa529ef5caa3ac70c04a2
+++ packages/binutils/binutils-cvs/110-arm-eabi-conf.patch 8e09b73459c127e091caa529ef5caa3ac70c04a2
@@ -0,0 +1,24 @@
+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* )
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ 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"
+ ;;
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ ;;
============================================================
--- packages/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch e0a30885b4d82cb2b512d4a9241044cc8cdc768b
+++ packages/binutils/binutils-cvs/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch e0a30885b4d82cb2b512d4a9241044cc8cdc768b
@@ -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 <jbowler at acm.org>
+#Signed-off-by: Bernhard Rosenkraenzer <bero at arklinux.org>
+---
+# 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);
============================================================
--- packages/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch 412df6ebe7f2dadc38a3d68b9a74accd998e927b
+++ packages/binutils/binutils-cvs/binutils-uclibc-300-001_ld_makefile_patch.patch 412df6ebe7f2dadc38a3d68b9a74accd998e927b
@@ -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 <chris at debian.org>
+## 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
+
+ at 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
============================================================
--- packages/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch 74aba67bda3813664cc7fa3182d68e8561ba8515
+++ packages/binutils/binutils-cvs/binutils-uclibc-300-006_better_file_error.patch 74aba67bda3813664cc7fa3182d68e8561ba8515
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+## 006_better_file_error.dpatch by David Kimdon <dwhedon at gordian.com>
+##
+## 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
+
+ at 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)
============================================================
--- packages/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch 9fb1224ed588f35fac30d5fdb0a69713e51c3fa9
+++ packages/binutils/binutils-cvs/binutils-uclibc-300-012_check_ldrunpath_length.patch 9fb1224ed588f35fac30d5fdb0a69713e51c3fa9
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris at debian.org>
+##
+## 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
+
+ at DPATCH@
+diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
+--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
+@@ -692,6 +692,8 @@
+ && command_line.rpath == NULL)
+ {
+ lib_path = (const char *) getenv ("LD_RUN_PATH");
++ if ((lib_path) && (strlen (lib_path) == 0))
++ lib_path = NULL;
+ if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
+ force))
+ break;
+@@ -871,6 +873,8 @@
+ rpath = command_line.rpath;
+ if (rpath == NULL)
+ rpath = (const char *) getenv ("LD_RUN_PATH");
++ if ((rpath) && (strlen (rpath) == 0))
++ rpath = NULL;
+ if (! (bfd_elf_size_dynamic_sections
+ (output_bfd, command_line.soname, rpath,
+ command_line.filter_shlib,
============================================================
--- packages/binutils/binutils-cvs/build_fix.patch 4d1571a719c3f0ef9f1db58fab9462cf6e500a02
+++ packages/binutils/binutils-cvs/build_fix.patch 4d1571a719c3f0ef9f1db58fab9462cf6e500a02
@@ -0,0 +1,16 @@
+---
+ libiberty/fopen_unlocked.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: src/libiberty/fopen_unlocked.c
+===================================================================
+--- src.orig/libiberty/fopen_unlocked.c 2007-08-09 20:12:13.000000000 +0100
++++ src/libiberty/fopen_unlocked.c 2007-08-09 20:12:21.000000000 +0100
+@@ -70,6 +70,7 @@ unchanged.
+ #endif
+ #include <stdio.h>
+ #ifdef HAVE_STDIO_EXT_H
++#include <sys/cdefs.h>
+ #include <stdio_ext.h>
+ #endif
+
============================================================
--- packages/binutils/binutils_cvs.bb 0b544c7fcc03aa165c4543aca0be55d86eeae75e
+++ packages/binutils/binutils_cvs.bb 6a4a5d296ebef18abfb49e106a5fccbe4cc04fc2
@@ -1,121 +1,18 @@
-SECTION = "devel"
-inherit autotools gettext
-
-DESCRIPTION = "A GNU collection of binary utilities"
-HOMEPAGE = "http://www.gnu.org/software/binutils/"
-LICENSE = "GPL"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "0.0+cvs${SRCDATE}"
-PR = "r3"
+PR = "r0"
-PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
+require binutils.inc
-FILES_${PN} = " \
- ${bindir}/${TARGET_PREFIX}* \
- ${libdir}/lib*-*.so \
- ${prefix}/${TARGET_SYS}/bin/*"
-
-FILES_${PN}-dev = " \
- ${includedir} \
- ${libdir}/*.a \
- ${libdir}/*.la \
- ${libdir}/libbfd.so \
- ${libdir}/libopcodes.so"
-
-FILES_${PN}-symlinks = " \
- ${bindir}/addr2line \
- ${bindir}/ar \
- ${bindir}/as \
- ${bindir}/c++filt \
- ${bindir}/gprof \
- ${bindir}/ld \
- ${bindir}/nm \
- ${bindir}/objcopy \
- ${bindir}/objdump \
- ${bindir}/ranlib \
- ${bindir}/readelf \
- ${bindir}/size \
- ${bindir}/strings \
- ${bindir}/strip"
-
-SRC_URI = "cvs://anoncvs:anoncvs@sources.redhat.com/cvs/src;module=binutils;method=pserver;localdir=src \
- file://ld_makefile.patch;patch=1 \
- file://better_file_error.patch;patch=1 \
- file://signed_char_fix.patch;patch=1 \
- file://binutils-100_cflags_for_build.patch;patch=1 \
- file://binutils-2.15.91.0.1-uclibc-100-conf.patch;patch=1 \
- file://binutils-2.15.90.0.3-uclibc-200-build_modules.patch;patch=1"
-
S = "${WORKDIR}/src"
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-EXTRA_OECONF = "--with-sysroot=/ \
- --program-prefix=${TARGET_PREFIX} \
- --enable-shared"
+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://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"
-# This is necessary due to a bug in the binutils Makefiles
-EXTRA_OEMAKE = "configure-build-libiberty all"
+#EXTRA_OECONF = "--with-sysroot=/"
-export AR = "${HOST_PREFIX}ar"
-export AS = "${HOST_PREFIX}as"
-export LD = "${HOST_PREFIX}ld"
-export NM = "${HOST_PREFIX}nm"
-export RANLIB = "${HOST_PREFIX}ranlib"
-export OBJCOPY = "${HOST_PREFIX}objcopy"
-export OBJDUMP = "${HOST_PREFIX}objdump"
-
-export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
-export AS_FOR_TARGET = "${TARGET_PREFIX}as"
-export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
-export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
-export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
-
-export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc"
-export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc"
-
-export CC_FOR_BUILD = "${BUILD_CC}"
-
-export CC = "${CCACHE} ${HOST_PREFIX}gcc"
-
-do_configure () {
- (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
- oe_runconf
-}
-
-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}/
-}
-
-do_install () {
- autotools_do_install
-
- # 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 -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
-}
More information about the Openembedded-commits
mailing list