前回の続き。という訳でgccとnewlibをsoftfloat付きでビルドする。
参考にしたのは以下のサイト:
Mian M. Hamayun - Re: How to enable soft-float support in newlib and gcc toolchains for an
Chefのレシピを変更して対応する。変更したのはブランチとして登録した(ブランチsoftfloat)。
-target="mipsel-elf" +target="mipsel-unknown-elf" binutils_build_dir = "#{Chef::Config['file_cache_path']}/binutils-2.25/build/" gcc_build_dir = "#{Chef::Config[:file_cache_path]}/gcc-5.1.0/build/" @@ -51,7 +51,7 @@ end execute "build binutils" do cwd "#{binutils_build_dir}" - command "../configure --target=#{target} --disable-nls --enable-gold && make && sudo make install" + command "../configure --target=#{target} --with-float=soft --enable-soft-float --disable-nls --enable-gold && make && sudo make install" action :run end @@ -75,7 +75,7 @@ end execute "build gcc-1" do cwd "#{gcc_build_dir}" - command "../configure --target=#{target} --disable-nls --disable-libssp --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=c && make && make install" + command "../configure --target=#{target} --disable-nls --disable-libssp --enable-soft-float --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=c && mak action :run end @@ -100,14 +100,14 @@ end execute "build newlib" do cwd "#{newlib_build_dir}" - command "../configure --target=#{target} --prefix=/usr/local && make && make install" + command "../configure --target=#{target} --with-float=soft --enable-soft-float --prefix=/usr/local && make && make install" action :run end execute "build gcc-2" do cwd "#{gcc_build_dir}" - command "rm * -rf && ../configure --target=#{target} --disable-nls --disable-libssp --with-gnu-ld --with-gnu-as --disable-shared --enable-languages=\"c c++\" --with + command "rm * -rf && ../configure --target=#{target} --disable-nls --disable-libssp --enable-soft-float --with-gnu-ld --with-gnu-as --disable-shared --enable-langua action :run end
これでビルドする!