# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8::et:sw=4:ts=4:sts=4
crossgcc.setup msp430-elf 7.3.0
crossgcc.setup_libc newlib 2.4.0
set name_patch msp430-gcc-${vers_patch}-source-patches
set file_patch ${name_patch}.tar.bz2
homepage http://www.ti.com/tool/msp430-gcc-opensource
master_sites-append http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/latest/exports/:patch
distfiles-append ${file_patch}:patch
checksums-append ${file_patch} \
rmd160 d6b1825ef792a4ca61e34a4bee35aca66d8c8d9e \
sha256 a9ae65464771549c7ffd0909a04fe0f783be7d04e5abe23ef191f536b2a3b8b4 \
depends_run port:msp430-gcc-support-files
system -W ${workpath} "${prefix}/bin/bzip2 -dc ${distpath}/${file_patch} | /usr/bin/tar xf -"
system -W ${worksrcpath} "/usr/bin/patch -p0 < ${workpath}/${name_patch}/gcc-7_3_0-release.patch"
system -W ${workpath}/newlib-2.4.0 "/usr/bin/patch -p0 < ${workpath}/${name_patch}/newlib-2_4_0.patch"
--enable-target-optspace \
--enable-newlib-nano-formatted-io