Building a GCC toolchain for an i386 target, with soft-float support.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Everyone,

I am trying to build a gcc toolchain with newlib for an i386 target which doesn't support hw float instructions. In fact it is a virtual machine which I am targeting. So when I compile my applications with "-msoft-float" flag, I get quite a few unresolved symbols.

For Example:
Sources/susan.c:979: undefined reference to `__floatsisf'
Sources/susan.c:979: undefined reference to `__divsf3'
Sources/susan.c:1626: undefined reference to `__subdf3'
Sources/susan.c:1628: undefined reference to `__mulsf3'
...

So my obvious guess is to rebuild the gcc toolchain and/or newlib using "--with-float=soft" and/or "--enable-soft-float" options. But so far I haven't been able to build a toolchain that solves this issue. In fact the toolchain compiles, but I still get the unresolved symbols.

Here is the procedure that I followed:

1) Binutils
===========
  ${TMP_DIR}/${BINUTILS_DIR}/configure  \
  --prefix=${INSTALL_DIR}               \
  --target=${TARGET}                    \
  --disable-nls                         \
  --disable-werror                      \
  --enable-multilib                     \
  --with-float=soft                     \
  --enable-soft-float                   \
    &> logs/configure.log || return

  make
  make install

2) GCC Bootstrap
================
  ${TMP_DIR}/${GCC_DIR}/configure   \
  --prefix=${INSTALL_DIR}           \
  --target=${TARGET}                \
  --disable-nls                     \
  --enable-multilib                 \
  --with-newlib                     \
  --enable-soft-float               \
  --enable-interwork                \
  --enable-languages=c      &> logs/configure.log || return

  make all-gcc
  make install-gcc

3) Newlib
=========
  ${TMP_DIR}/${NEWLIB_DIR}/configure      \
  --prefix=${INSTALL_DIR}                 \
  --target=${TARGET}                      \
  --disable-nls                           \
  --enable-multilib                       \
  --enable-interwork                      \
  --enable-newlib-io-long-long            \
  --enable-newlib-io-long-double          \
  --enable-newlib-io-c99-formats          \
  --disable-newlib-may-supply-syscalls    \
  --enable-newlib-multithread             \
  --with-float=soft                       \
  --enable-soft-float                     \
  --disable-newlib-supplied-syscalls      &> logs/configure.log || return

  make
  make install

4) GCC Final
============
  make all
  make install


Any help / pointers in this regard will be greatly appreciated.

Thanks in advance,
Hamayun

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux