Created
January 16, 2010 13:39
-
-
Save eblot/278824 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'formula' | |
| class GccArmEcosNewlib <Formula | |
| @url='ftp://sources.redhat.com/pub/newlib/newlib-1.18.0.tar.gz' | |
| @homepage='http://sourceware.org/newlib/' | |
| @sha1='a47d3b8a508304143334b36bdb5b33786a61ce94' | |
| end | |
| class GccArmEcosCplusplus <Formula | |
| @url='http://ftp.gnu.org/gnu/gcc/gcc-4.4.2/gcc-g++-4.4.2.tar.bz2' | |
| @homepage='http://gcc.gnu.org/' | |
| @sha1='e73c1dcfdefb0972a4c91c656980bdc009196ae4' | |
| end | |
| class GccArmEcos <Formula | |
| @url='http://ftp.gnu.org/gnu/gcc/gcc-4.4.2/gcc-core-4.4.2.tar.bz2' | |
| @homepage='http://gcc.gnu.org/' | |
| @sha1='929d560e07082d790de5cdc46a78008f7a742241' | |
| # CFLAGS_FOR_BUILD="-O3 -m64" CFLAGS_FOR_TARGET="-O3" CFLAGS="-O3 -m64" | |
| depends_on 'gmp' | |
| depends_on 'mpfr' | |
| depends_on 'ppl' | |
| depends_on 'cloog-ppl' | |
| depends_on 'libelf' | |
| def setup_cpluscplus | |
| # Slot dependencies into place | |
| d=Pathname.getwd | |
| GccArmEcosCplusplus.new.brew do | |
| d.install Dir['*'] | |
| end | |
| end | |
| #def patches | |
| # DATA | |
| #end | |
| def install | |
| #Dir.chdir "gcc-4.4.2" | |
| #FileUtils.ln_s "../newlib-1.18.0/libgloss", "libgloss" | |
| #FileUtils.ln_s "../newlib-1.18.0/newlib", "newlib" | |
| setup_cpluscplus | |
| system "./configure", "--prefix=#{prefix}", "--target=arm-eabi", | |
| "--enable-shared", "--with-gnu-as", "--with-gnu-ld", | |
| "--with-newlib", "--enable-softfloat", "--disable-bigendian", | |
| "--disable-fpu", "--disable-underscore", "--enable-multilibs", | |
| "--with-float=soft", "--enable-interwork", "--with-fpu=fpa", | |
| "--with-multilib-list=interwork", "--with-abi=aapcs", | |
| "--enable-languages=c,c++", "--disable-__cxa_atexit", | |
| "--with-gmp=#{Formula.factory('gmp').prefix}", | |
| "--with-mpfr=#{Formula.factory('mpfr').prefix}", | |
| "--with-ppl=#{Formula.factory('ppl').prefix}", | |
| "--with-cloog=#{Formula.factory('cloog-ppl').prefix}", | |
| "--with-libelf=#{Formula.factory('libelf').prefix}", | |
| "--with-gxx-include-dir=$PREFIX/$TARGET/include", | |
| "--disable-debug" | |
| system "make" | |
| system "make install" | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment