1) mpfr / gmp のインストール
http://www.gnu.org/software/gmp
http://www.mpfr.org/
Fortran で使用するらしいが、インストールには必要.
mac port でインストール
2) gcc-4.3.3 インストール
http://sigma-project.net/archives/2009/04/newlibgcc.html
http://www.mouiyada.jp/node/99
ftp://sources.redhat.com/pub/newlib/index.html
gccでnewlibのコンパイルに必要な部分のコンパイル・インストール
cd ../gcc-4.3.0
export PATH=/usr/local/gcc-arm-elf/bin:$PATH
ln -s ../newlib-1.16.0/newlib .
ln -s ../newlib-1.16.0/libgloss .
※gcc-4.3.0/gcc/config/arm/t-arm-elfの以下のコメントアウト(#~)をはずす
MULTILIB_OPTIONS += mhard-float/msoft-float
MULTILIB_DIRNAMES += fpu soft
MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
MULTILIB_DIRNAMES += normal interwork
mkdir build
cd build
../configure --prefix=/usr/local/gcc-arm-elf --target=arm-elf --enable-interwork --enable-multilib --with-float=soft --enable-languages=c,c++ --with-newlib --with-gmp=/opt/local --with-mpfr=/opt/local
make
sudo make install
make error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37625
Undefined symbols:
"_iconv_close", referenced from:
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_convert_input in libcpp.a(charset.o)
__nl_free_domain_conv in libintl.a(loadmsgcat.o)
"_iconv", referenced from:
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
__nl_find_msg in libintl.a(dcigettext.o)
"_iconv_open", referenced from:
_init_iconv_desc in libcpp.a(charset.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
ld: symbol(s) not found
Googleing a bit showed that the problem comes from the system iconv.h
under /usr/include, which conflicts with Fink's under /sw/.
A solution is to replace /usr/include/iconv.h by a symlink to
/sw/include/iconv.h.
newlibのコンパイル・インストール
cd ../../newlib-1.17.0
./configure --prefix=/usr/local/cross/arm --target=arm-elf --enable-interwork --enable-multilib --with-float=soft
make
sudo make install
http://www.gnu.org/software/gmp
http://www.mpfr.org/
Fortran で使用するらしいが、インストールには必要.
mac port でインストール
2) gcc-4.3.3 インストール
http://sigma-project.net/archives/2009/04/newlibgcc.html
http://www.mouiyada.jp/node/99
ftp://sources.redhat.com/pub/newlib/index.html
gccでnewlibのコンパイルに必要な部分のコンパイル・インストール
cd ../gcc-4.3.0
export PATH=/usr/local/gcc-arm-elf/bin:$PATH
ln -s ../newlib-1.16.0/newlib .
ln -s ../newlib-1.16.0/libgloss .
※gcc-4.3.0/gcc/config/arm/t-arm-elfの以下のコメントアウト(#~)をはずす
MULTILIB_OPTIONS += mhard-float/msoft-float
MULTILIB_DIRNAMES += fpu soft
MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
MULTILIB_DIRNAMES += normal interwork
mkdir build
cd build
../configure --prefix=/usr/local/gcc-arm-elf --target=arm-elf --enable-interwork --enable-multilib --with-float=soft --enable-languages=c,c++ --with-newlib --with-gmp=/opt/local --with-mpfr=/opt/local
make
sudo make install
make error http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37625
Undefined symbols:
"_iconv_close", referenced from:
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_destroy_iconv in libcpp.a(charset.o)
__cpp_convert_input in libcpp.a(charset.o)
__nl_free_domain_conv in libintl.a(loadmsgcat.o)
"_iconv", referenced from:
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
_convert_using_iconv in libcpp.a(charset.o)
__nl_find_msg in libintl.a(dcigettext.o)
"_iconv_open", referenced from:
_init_iconv_desc in libcpp.a(charset.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
__nl_init_domain_conv in libintl.a(loadmsgcat.o)
ld: symbol(s) not found
Googleing a bit showed that the problem comes from the system iconv.h
under /usr/include, which conflicts with Fink's under /sw/.
A solution is to replace /usr/include/iconv.h by a symlink to
/sw/include/iconv.h.
newlibのコンパイル・インストール
cd ../../newlib-1.17.0
./configure --prefix=/usr/local/cross/arm --target=arm-elf --enable-interwork --enable-multilib --with-float=soft
make
sudo make install
Comments
Post a Comment