summaryrefslogtreecommitdiffstats
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-12-20 09:43:35 +0000
committerRichard Purdie <richard@openedhand.com>2006-12-20 09:43:35 +0000
commitdfd478337a1e48ce8b95ead01bff8df14918dad3 (patch)
treeb6ac5078dc807a8db5ef2db3cb78502ef7593620 /meta/packages
parent6ae7f0bf485d45b33f3909981c3b8c97757b5aa5 (diff)
downloadpoky-dfd478337a1e48ce8b95ead01bff8df14918dad3.tar.gz
binutils: Add 2.17.50.0.5 (from OE.dev)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1057 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/110-arm-eabi-conf.patch24
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch31
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-100-uclibc-conf.patch139
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-001_ld_makefile_patch.patch50
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-006_better_file_error.patch43
-rw-r--r--meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-012_check_ldrunpath_length.patch47
-rw-r--r--meta/packages/binutils/binutils-cross_2.17.50.0.5.bb32
-rw-r--r--meta/packages/binutils/binutils_2.17.50.0.5.bb130
8 files changed, 496 insertions, 0 deletions
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/110-arm-eabi-conf.patch b/meta/packages/binutils/binutils-2.17.50.0.5/110-arm-eabi-conf.patch
new file mode 100644
index 0000000000..be85ceb109
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/110-arm-eabi-conf.patch
@@ -0,0 +1,24 @@
1diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
2--- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
3+++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
4@@ -1299,7 +1299,7 @@
5 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
6 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
7 ;;
8- arm*-*-linux-gnueabi)
9+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
10 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
11 noconfigdirs="$noconfigdirs target-libjava target-libobjc"
12 ;;
13diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
14--- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
15+++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
16@@ -497,7 +497,7 @@
17 arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
18 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
19 ;;
20- arm*-*-linux-gnueabi)
21+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
22 noconfigdirs="$noconfigdirs target-libffi target-qthreads"
23 noconfigdirs="$noconfigdirs target-libjava target-libobjc"
24 ;;
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
new file mode 100644
index 0000000000..4461bedd4e
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
@@ -0,0 +1,31 @@
1# strip (and objcopy) fail to set the error code if there is no
2# output file name and the rename of the stripped (or copied) file
3# fails, yet the command fails to do anything. This fixes both
4# objcopy and strip.
5#
6# modification by bero: Ported to 2.16.91.0.6
7#
8#Signed-off-by: John Bowler <jbowler@acm.org>
9#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
10--- binutils-2.16.91.0.6/binutils/objcopy.c.ark 2006-03-11 15:59:07.000000000 +0100
11+++ binutils-2.16.91.0.6/binutils/objcopy.c 2006-03-11 15:59:45.000000000 +0100
12@@ -2593,7 +2593,8 @@
13 if (preserve_dates)
14 set_times (tmpname, &statbuf);
15 if (output_file == NULL)
16- smart_rename (tmpname, argv[i], preserve_dates);
17+ if(smart_rename (tmpname, argv[i], preserve_dates))
18+ hold_status = 1;
19 status = hold_status;
20 }
21 else
22@@ -3184,7 +3185,8 @@
23 {
24 if (preserve_dates)
25 set_times (tmpname, &statbuf);
26- smart_rename (tmpname, input_filename, preserve_dates);
27+ if (smart_rename (tmpname, input_filename, preserve_dates))
28+ status = 1;
29 }
30 else
31 unlink (tmpname);
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-100-uclibc-conf.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000000..25222e5df2
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,139 @@
1--- binutils-2.16.91.0.7/bfd/configure
2+++ binutils-2.16.91.0.7/bfd/configure
3@@ -3576,7 +3576,7 @@
4 ;;
5
6 # This must be Linux ELF.
7-linux-gnu*)
8+linux-gnu*|linux-uclibc*)
9 lt_cv_deplibs_check_method=pass_all
10 ;;
11
12--- binutils-2.16.91.0.7/binutils/configure
13+++ binutils-2.16.91.0.7/binutils/configure
14@@ -3411,7 +3411,7 @@
15 ;;
16
17 # This must be Linux ELF.
18-linux-gnu*)
19+linux-gnu*|linux-uclibc*)
20 lt_cv_deplibs_check_method=pass_all
21 ;;
22
23--- binutils-2.16.91.0.7/configure
24+++ binutils-2.16.91.0.7/configure
25@@ -1270,7 +1270,7 @@
26 am33_2.0-*-linux*)
27 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
28 ;;
29- sh-*-linux*)
30+ sh*-*-linux*)
31 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
32 ;;
33 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
34@@ -1578,7 +1578,7 @@
35 romp-*-*)
36 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
37 ;;
38- sh-*-* | sh64-*-*)
39+ sh*-*-* | sh64-*-*)
40 case "${host}" in
41 i[3456789]86-*-vsta) ;; # don't add gprof back in
42 i[3456789]86-*-go32*) ;; # don't add gprof back in
43--- binutils-2.16.91.0.7/configure.in
44+++ binutils-2.16.91.0.7/configure.in
45@@ -468,7 +468,7 @@
46 am33_2.0-*-linux*)
47 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
48 ;;
49- sh-*-linux*)
50+ sh*-*-linux*)
51 noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
52 ;;
53 sh*-*-pe|mips*-*-pe|*arm-wince-pe)
54@@ -776,7 +776,7 @@
55 romp-*-*)
56 noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
57 ;;
58- sh-*-* | sh64-*-*)
59+ sh*-*-* | sh64-*-*)
60 case "${host}" in
61 i[[3456789]]86-*-vsta) ;; # don't add gprof back in
62 i[[3456789]]86-*-go32*) ;; # don't add gprof back in
63--- binutils-2.16.91.0.7/gas/configure
64+++ binutils-2.16.91.0.7/gas/configure
65@@ -3411,7 +3411,7 @@
66 ;;
67
68 # This must be Linux ELF.
69-linux-gnu*)
70+linux-gnu*|linux-uclibc*)
71 lt_cv_deplibs_check_method=pass_all
72 ;;
73
74--- binutils-2.16.91.0.7/gprof/configure
75+++ binutils-2.16.91.0.7/gprof/configure
76@@ -3419,6 +3419,11 @@
77 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
78 ;;
79
80+linux-uclibc*)
81+ lt_cv_deplibs_check_method=pass_all
82+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
83+ ;;
84+
85 netbsd* | knetbsd*-gnu)
86 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
87 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
88--- binutils-2.16.91.0.7/ld/configure
89+++ binutils-2.16.91.0.7/ld/configure
90@@ -3413,7 +3413,7 @@
91 ;;
92
93 # This must be Linux ELF.
94-linux-gnu*)
95+linux-gnu*|linux-uclibc*)
96 lt_cv_deplibs_check_method=pass_all
97 ;;
98
99--- binutils-2.16.91.0.7/libtool.m4
100+++ binutils-2.16.91.0.7/libtool.m4
101@@ -739,7 +739,7 @@
102 ;;
103
104 # This must be Linux ELF.
105-linux-gnu*)
106+linux-gnu*|linux-uclibc*)
107 lt_cv_deplibs_check_method=pass_all
108 ;;
109
110--- binutils-2.16.91.0.7/ltconfig
111+++ binutils-2.16.91.0.7/ltconfig
112@@ -602,6 +602,7 @@
113
114 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
115 case $host_os in
116+linux-uclibc*) ;;
117 linux-gnu*) ;;
118 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
119 esac
120@@ -1247,7 +1248,7 @@
121 ;;
122
123 # This must be Linux ELF.
124-linux-gnu*)
125+linux-gnu*|linux-uclibc*)
126 version_type=linux
127 need_lib_prefix=no
128 need_version=no
129--- binutils-2.16.91.0.7/opcodes/configure
130+++ binutils-2.16.91.0.7/opcodes/configure
131@@ -3579,7 +3579,7 @@
132 ;;
133
134 # This must be Linux ELF.
135-linux-gnu*)
136+linux-gnu*|linux-uclibc*)
137 lt_cv_deplibs_check_method=pass_all
138 ;;
139
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-001_ld_makefile_patch.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..04a7e61e25
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,50 @@
1#!/bin/sh -e
2## 001_ld_makefile_patch.dpatch
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Description: correct where ld scripts are installed
6## DP: Author: Chris Chimelis <chris@debian.org>
7## DP: Upstream status: N/A
8## DP: Date: ??
9
10if [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14
15[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
16patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
17
18case "$1" in
19 -patch) patch $patch_opts -p1 < $0;;
20 -unpatch) patch $patch_opts -p1 -R < $0;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1;;
24esac
25
26exit 0
27
28@DPATCH@
29--- binutils-2.16.91.0.1/ld/Makefile.am
30+++ binutils-2.16.91.0.1/ld/Makefile.am
31@@ -20,7 +20,7 @@
32 # We put the scripts in the directory $(scriptdir)/ldscripts.
33 # We can't put the scripts in $(datadir) because the SEARCH_DIR
34 # directives need to be different for native and cross linkers.
35-scriptdir = $(tooldir)/lib
36+scriptdir = $(libdir)
37
38 EMUL = @EMUL@
39 EMULATION_OFILES = @EMULATION_OFILES@
40--- binutils-2.16.91.0.1/ld/Makefile.in
41+++ binutils-2.16.91.0.1/ld/Makefile.in
42@@ -268,7 +268,7 @@
43 # We put the scripts in the directory $(scriptdir)/ldscripts.
44 # We can't put the scripts in $(datadir) because the SEARCH_DIR
45 # directives need to be different for native and cross linkers.
46-scriptdir = $(tooldir)/lib
47+scriptdir = $(libdir)
48 BASEDIR = $(srcdir)/..
49 BFDDIR = $(BASEDIR)/bfd
50 INCDIR = $(BASEDIR)/include
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-006_better_file_error.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000000..f337611edf
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,43 @@
1#!/bin/sh -e
2## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Specify which filename is causing an error if the filename is a
6## DP: directory. (#45832)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c
28--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100
29+++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100
30@@ -150,6 +150,13 @@
31 {
32 bfd *nbfd;
33 const bfd_target *target_vec;
34+ struct stat s;
35+
36+ if (stat (filename, &s) == 0)
37+ if (S_ISDIR(s.st_mode)) {
38+ bfd_set_error (bfd_error_file_not_recognized);
39+ return NULL;
40+ }
41
42 nbfd = _bfd_new_bfd ();
43 if (nbfd == NULL)
diff --git a/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-012_check_ldrunpath_length.patch b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000000..498651a90c
--- /dev/null
+++ b/meta/packages/binutils/binutils-2.17.50.0.5/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,47 @@
1#!/bin/sh -e
2## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
6## DP: cases where -rpath isn't specified. (#151024)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25
26@DPATCH@
27diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
28--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
29+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
30@@ -692,6 +692,8 @@
31 && command_line.rpath == NULL)
32 {
33 lib_path = (const char *) getenv ("LD_RUN_PATH");
34+ if ((lib_path) && (strlen (lib_path) == 0))
35+ lib_path = NULL;
36 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
37 force))
38 break;
39@@ -871,6 +873,8 @@
40 rpath = command_line.rpath;
41 if (rpath == NULL)
42 rpath = (const char *) getenv ("LD_RUN_PATH");
43+ if ((rpath) && (strlen (rpath) == 0))
44+ rpath = NULL;
45 if (! (bfd_elf_size_dynamic_sections
46 (output_bfd, command_line.soname, rpath,
47 command_line.filter_shlib,
diff --git a/meta/packages/binutils/binutils-cross_2.17.50.0.5.bb b/meta/packages/binutils/binutils-cross_2.17.50.0.5.bb
new file mode 100644
index 0000000000..1f2f43ecf8
--- /dev/null
+++ b/meta/packages/binutils/binutils-cross_2.17.50.0.5.bb
@@ -0,0 +1,32 @@
1SECTION = "devel"
2require binutils_${PV}.bb
3inherit cross
4DEPENDS += "flex-native bison-native"
5PROVIDES = "virtual/${TARGET_PREFIX}binutils"
6FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
7PACKAGES = ""
8EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
9 --program-prefix=${TARGET_PREFIX}"
10
11do_stage () {
12 oe_runmake install
13
14 # We don't really need these, so we'll remove them...
15 rm -rf ${CROSS_DIR}/lib/ldscripts
16 rm -rf ${CROSS_DIR}/share/info
17 rm -rf ${CROSS_DIR}/share/locale
18 rm -rf ${CROSS_DIR}/share/man
19 rmdir ${CROSS_DIR}/share || :
20 rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
21 rmdir ${CROSS_DIR}/${libdir} || :
22 rmdir ${CROSS_DIR}/${prefix} || :
23
24 # We want to move this into the target specific location
25 mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
26 mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
27 rmdir ${CROSS_DIR}/lib || :
28}
29
30do_install () {
31 :
32}
diff --git a/meta/packages/binutils/binutils_2.17.50.0.5.bb b/meta/packages/binutils/binutils_2.17.50.0.5.bb
new file mode 100644
index 0000000000..87a333b035
--- /dev/null
+++ b/meta/packages/binutils/binutils_2.17.50.0.5.bb
@@ -0,0 +1,130 @@
1DESCRIPTION = "A GNU collection of binary utilities"
2HOMEPAGE = "http://www.gnu.org/software/binutils/"
3SECTION = "devel"
4LICENSE = "GPL"
5
6inherit autotools gettext
7
8PACKAGES += "${PN}-symlinks"
9
10FILES_${PN} = " \
11 ${bindir}/${TARGET_PREFIX}* \
12 ${libdir}/lib*-*.so \
13 ${prefix}/${TARGET_SYS}/bin/*"
14
15FILES_${PN}-dev = " \
16 ${includedir} \
17 ${libdir}/*.a \
18 ${libdir}/*.la \
19 ${libdir}/libbfd.so \
20 ${libdir}/libopcodes.so"
21
22FILES_${PN}-symlinks = " \
23 ${bindir}/addr2line \
24 ${bindir}/ar \
25 ${bindir}/as \
26 ${bindir}/c++filt \
27 ${bindir}/gprof \
28 ${bindir}/ld \
29 ${bindir}/nm \
30 ${bindir}/objcopy \
31 ${bindir}/objdump \
32 ${bindir}/ranlib \
33 ${bindir}/readelf \
34 ${bindir}/size \
35 ${bindir}/strings \
36 ${bindir}/strip"
37
38SRC_URI = \
39 "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
40 file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
41 file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
42 file://110-arm-eabi-conf.patch;patch=1 \
43 file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
44 file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
45 file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
46 "
47
48S = "${WORKDIR}/binutils-${PV}"
49B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
50
51EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
52 --enable-shared"
53
54# This is necessary due to a bug in the binutils Makefiles
55EXTRA_OEMAKE = "configure-build-libiberty all"
56
57export AR = "${HOST_PREFIX}ar"
58export AS = "${HOST_PREFIX}as"
59export LD = "${HOST_PREFIX}ld"
60export NM = "${HOST_PREFIX}nm"
61export RANLIB = "${HOST_PREFIX}ranlib"
62export OBJCOPY = "${HOST_PREFIX}objcopy"
63export OBJDUMP = "${HOST_PREFIX}objdump"
64
65export AR_FOR_TARGET = "${TARGET_PREFIX}ar"
66export AS_FOR_TARGET = "${TARGET_PREFIX}as"
67export LD_FOR_TARGET = "${TARGET_PREFIX}ld"
68export NM_FOR_TARGET = "${TARGET_PREFIX}nm"
69export RANLIB_FOR_TARGET = "${TARGET_PREFIX}ranlib"
70
71export CC_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
72export CXX_FOR_HOST = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
73
74export CC_FOR_BUILD = "${BUILD_CC}"
75export CPP_FOR_BUILD = "${BUILD_CPP}"
76export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
77
78export CC = "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
79
80do_configure () {
81 (cd ${S}; gnu-configize) || die "Failed to run gnu-configize"
82 oe_runconf
83#
84# must prime config.cache to ensure the build of libiberty
85#
86 mkdir -p ${B}/build-${BUILD_SYS}
87 for i in ${CONFIG_SITE}; do
88 cat $i >> ${B}/build-${BUILD_SYS}/config.cache
89 done
90
91}
92
93do_stage () {
94 oe_libinstall -so -a -C opcodes libopcodes ${STAGING_LIBDIR}/
95 oe_libinstall -a -C libiberty libiberty ${STAGING_LIBDIR}/
96 oe_libinstall -so -a -C bfd libbfd ${STAGING_LIBDIR}/
97 install -m 0644 ${S}/include/dis-asm.h ${STAGING_INCDIR}/
98 install -m 0644 ${S}/include/symcat.h ${STAGING_INCDIR}/
99 install -m 0644 ${S}/include/libiberty.h ${STAGING_INCDIR}/
100 install -m 0644 ${S}/include/ansidecl.h ${STAGING_INCDIR}/
101 install -m 0644 ${S}/include/bfdlink.h ${STAGING_INCDIR}/
102 install -m 0644 bfd/bfd.h ${STAGING_INCDIR}/
103}
104
105do_install () {
106 autotools_do_install
107
108 # We don't really need these, so we'll remove them...
109 rm -rf ${D}${libdir}/ldscripts
110
111 # Fix the /usr/${TARGET_SYS}/bin/* links
112 for l in ${D}${prefix}/${TARGET_SYS}/bin/*; do
113 rm -f $l
114 ln -sf `echo ${prefix}/${TARGET_SYS}/bin \
115 | tr -s / \
116 | sed -e 's,^/,,' -e 's,[^/]*,..,g'`${bindir}/${TARGET_PREFIX}`basename $l` $l
117 done
118
119 # Install the libiberty header
120 install -d ${D}${includedir}
121 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
122 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
123
124 cd ${D}${bindir}
125
126 # Symlinks for ease of running these on the native target
127 for p in ${TARGET_SYS}-* ; do
128 ln -sf $p `echo $p | sed -e s,${TARGET_SYS}-,,`
129 done
130}