Merge branch 'master' of git://dev.doredevelopment.dk/oe-micro into org.openembedded.dev
[vuplus_openembedded] / recipes / binutils / binutils-avr32.inc
1 # Extra tasks required when using Atmel's patches to binutils
2 # See http://avr32linux.org/twiki/bin/view/Main/BinutilsPatches for
3 # more information
4
5 DEPENDS += "autoconf-native automake-native"
6
7 do_avr32_reconf () {
8         if test ${TARGET_ARCH} == avr32; then
9             (cd ${S} && autoconf) || die "Error running autoconf"
10             for dir in bfd opcodes binutils ld; do
11                 (cd "${S}/$dir" &&
12                  aclocal &&
13                  autoconf &&
14                  automake &&
15                  autoheader) || die "Error reconfiguring $dir"
16             done
17         fi
18 }
19
20 do_avr32_configure_bfd () {
21         if test ${TARGET_ARCH} == avr32; then
22                                                 # fix Makefile brokenness due to unmatched single quotes 
23                                                 (cd ${B} && sed -i -e "s,'CC=ccache,'CC=${CC}'," Makefile) 
24                                                 # *_alias options are not supported in binutils 2.17 and need
25                                                 # to be removed
26                                                 (cd ${B} && sed -i -e "s,'host_alias=.*',," Makefile)
27                                                 (cd ${B} && sed -i -e "s,'build_alias=.*',," Makefile)
28                                                 (cd ${B} && sed -i -e "s,'target_alias=*.',," Makefile)
29
30             (cd ${B} && make configure-bfd) || die "Error running 'make configure-bfd'"
31             (cd ${B}/bfd && make headers) || die "Error running 'make headers'"
32         fi
33 }
34
35 addtask avr32_reconf after do_patch before do_configure
36 addtask avr32_configure_bfd after do_configure before do_compile
37