Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / 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
6 do_avr32_reconf () {
7         if test ${TARGET_ARCH} == avr32; then
8             (cd ${S} && autoconf) || die "Error running autoconf"
9             for dir in bfd opcodes binutils ld; do
10                 (cd "${S}/$dir" &&
11                  aclocal &&
12                  autoconf &&
13                  automake &&
14                  autoheader) || die "Error reconfiguring $dir"
15             done
16         fi
17 }
18
19 do_avr32_configure_bfd () {
20         if test ${TARGET_ARCH} == avr32; then
21                                                 # fix Makefile brokenness due to unmatched single quotes 
22                                                 (cd ${B} && sed -i -e "s,'CC=ccache,'CC=${CC}'," Makefile) 
23                                                 # *_alias options are not supported in binutils 2.17 and need
24                                                 # to be removed
25                                                 (cd ${B} && sed -i -e "s,'host_alias=.*',," Makefile)
26                                                 (cd ${B} && sed -i -e "s,'build_alias=.*',," Makefile)
27                                                 (cd ${B} && sed -i -e "s,'target_alias=*.',," Makefile)
28
29             (cd ${B} && make configure-bfd) || die "Error running 'make configure-bfd'"
30             (cd ${B}/bfd && make headers) || die "Error running 'make headers'"
31         fi
32 }
33
34 addtask avr32_reconf after do_patch before do_configure
35 addtask avr32_configure_bfd after do_configure before do_compile
36