1 DESCRIPTION
= "A GNU collection of binary utilities"
2 HOMEPAGE
= "http://www.gnu.org/software/binutils/"
8 # glibc
2.3 has issues with this version
10 DEFAULT_PREFERENCE
= "-1"
13 inherit autotools gettext
15 PACKAGES
= "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
18 ${bindir}/${TARGET_PREFIX}* \
20 ${prefix}/${TARGET_SYS}/bin/*"
27 ${libdir}/libopcodes.so"
29 FILES_$
{PN
}-symlinks
= " \
46 "${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
47 file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
48 file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
49 file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
50 file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
51 file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
52 file://binutils-uclibc-400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
53 file://binutils-uclibc-702-binutils-skip-comments.patch;patch=1"
55 S
= "${WORKDIR}/binutils-${PV}"
56 B
= "${S}/build.${HOST_SYS}.${TARGET_SYS}"
58 EXTRA_OECONF
= "--program-prefix=${TARGET_PREFIX} \
61 # This is necessary due
to a bug in the binutils Makefiles
62 EXTRA_OEMAKE
= "configure-build-libiberty all"
64 export AR
= "${HOST_PREFIX}ar"
65 export AS
= "${HOST_PREFIX}as"
66 export LD
= "${HOST_PREFIX}ld"
67 export NM
= "${HOST_PREFIX}nm"
68 export RANLIB
= "${HOST_PREFIX}ranlib"
69 export OBJCOPY
= "${HOST_PREFIX}objcopy"
70 export OBJDUMP
= "${HOST_PREFIX}objdump"
72 export AR_FOR_TARGET
= "${TARGET_PREFIX}ar"
73 export AS_FOR_TARGET
= "${TARGET_PREFIX}as"
74 export LD_FOR_TARGET
= "${TARGET_PREFIX}ld"
75 export NM_FOR_TARGET
= "${TARGET_PREFIX}nm"
76 export RANLIB_FOR_TARGET
= "${TARGET_PREFIX}ranlib"
78 export CC_FOR_HOST
= "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
79 export CXX_FOR_HOST
= "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
81 export CC_FOR_BUILD
= "${BUILD_CC}"
82 export CPP_FOR_BUILD
= "${BUILD_CPP}"
83 export CFLAGS_FOR_BUILD
= "${BUILD_CFLAGS}"
85 export CC
= "${CCACHE} ${HOST_PREFIX}gcc ${HOST_CC_ARCH}"
88 (cd $
{S
}; gnu-configize) || die "Failed to run gnu-configize"
93 oe_libinstall
-so
-a
-C opcodes libopcodes $
{STAGING_LIBDIR
}/
94 oe_libinstall
-a
-C libiberty libiberty $
{STAGING_LIBDIR
}/
95 oe_libinstall
-so
-a
-C bfd libbfd $
{STAGING_LIBDIR
}/
96 install
-m
0644 $
{S
}/include/dis
-asm.h $
{STAGING_INCDIR
}/
97 install
-m
0644 $
{S
}/include/symcat.h $
{STAGING_INCDIR
}/
98 install
-m
0644 $
{S
}/include/libiberty.h $
{STAGING_INCDIR
}/
99 install
-m
0644 $
{S
}/include/ansidecl.h $
{STAGING_INCDIR
}/
100 install
-m
0644 $
{S
}/include/bfdlink.h $
{STAGING_INCDIR
}/
101 install
-m
0644 bfd
/bfd.h $
{STAGING_INCDIR
}/
107 # We don't really need these
, so we'll remove them...
108 rm
-rf $
{D
}$
{libdir
}/ldscripts
110 # Fix the
/usr
/$
{TARGET_SYS
}/bin/* links
111 for l in $
{D
}$
{prefix
}/$
{TARGET_SYS
}/bin/*; do
113 ln
-sf `echo $
{prefix
}/$
{TARGET_SYS
}/bin \
115 | sed
-e 's
,^
/,,'
-e 's
,[^
/]*,..
,g'`$
{bindir
}/$
{TARGET_PREFIX
}`basename $l` $l
118 # Install the libiberty header
119 install
-d $
{D
}$
{includedir
}
120 install
-m
644 $
{S
}/include/ansidecl.h $
{D
}$
{includedir
}
121 install
-m
644 $
{S
}/include/libiberty.h $
{D
}$
{includedir
}
125 # Symlinks
for ease of running these on the native target
126 for p in $
{TARGET_SYS
}-* ; do
127 ln
-sf $p `echo $p | sed
-e s
,$
{TARGET_SYS
}-,,`