Skip to content

HOWTO Build the toolchain

jasonkajita edited this page Jun 4, 2011 · 1 revision

The configure options to build binutils and gcc on Linux are as follows

../../chipKIT-cxx/src45x/binutils/configure --build=i686-pc-linux-gnu --target=pic32mx --prefix=$WORKING_DIR/linux-image/pic32-tools --libexecdir=$WORKING_DIR/linux-image/pic32mx/bin --host=i686-pc-linux-gnu --disable-nls --disable-tui --disable-gdbtk --disable-shared --enable-static --disable-threads --disable-bootstrap --with-dwarf2 --enable-multilib --without-newlib --disable-sim --with-lib-path=: --enable-poison-system-directories --program-prefix=pic32- --with-bugurl=http://chipkit.org/forum/

GCC_FOR_TARGET='pic32-gcc' CC_FOR_TARGET='pic32-gcc' AS_FOR_TARGET=$WORKING_DIR/linux-image/pic32-tools/pic32mx/bin/as LD_FOR_TARGET=$WORKING_DIR/linux-image/pic32-tools/pic32mx/bin/ld ../../chipKIT-cxx/src45x/gcc/configure --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu --target=pic32mx --disable-threads --enable-static --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --disable-hosted-libstdcxx --with-arch=pic32mx --enable-sgxx-sde-multilibs --disable-threads --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-shared  --without-newlib --disable-nls --disable-shared --disable-libgomp --without-newlib --without-headers --enable-obsolete --disable-libffi --disable-bootstrap --enable-obsolete --disable-libfortran --prefix=$WORKING_DIR/linux-image/pic32-tools --libexecdir=$WORKING_DIR/linux-image/pic32-tools/pic32mx/bin --program-prefix=pic32- --with-dwarf2 '--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-zlib=$WORKING_DIR/cross-build/host-libs --disable-__cxa_atexit CFLAGS_FOR_BUILD="-O2" CFLAGS="-O2"  XGCC_FLAGS_FOR_TARGET="-fno-rtti -fno-enforce-eh-specs -fno-exceptions" --enable-cxx-flags='-fno-exceptions -ffunction-sections' --disable-sjlj-exceptions
Clone this wiki locally