Advertisement
dumarjo

Build script for newlib

May 26th, 2015
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.02 KB | None | 0 0
  1. # Script to build newlib
  2. # IMPORTANT:
  3. # - make sure the cross-tool chain is present in the PATH
  4. # - untar newlib.tar.bz2
  5.  
  6. TARGET=arm-none-eabi
  7. ROOT=/C/tools/IDE/gcc/lib_build
  8. INSTALLDIR_NATIVE=$ROOT/install-native.newLib
  9. INSTALLDIR_NATIVE_DOC=$INSTALLDIR_NATIVE/share/doc/gcc-arm-none-eabi
  10.  
  11. echo Creating build directory...
  12. mkdir newlib.build
  13.  
  14. echo Entering build directory...
  15. cd newlib.build
  16.  
  17. export CFLAGS='-ffunction-sections -fdata-sections'
  18.  
  19. # run configure program to configure the build
  20. echo Configuring newlib build...
  21. ../gcc-arm-none-eabi-4_9-2014q4-20141203/src/newlib/configure \
  22.   --target=$TARGET \
  23.   --prefix=$INSTALLDIR_NATIVE \
  24.   --infodir=$INSTALLDIR_NATIVE_DOC/info \
  25.   --mandir=$INSTALLDIR_NATIVE_DOC/man \
  26.   --htmldir=$INSTALLDIR_NATIVE_DOC/html \
  27.   --pdfdir=$INSTALLDIR_NATIVE_DOC/pdf \
  28.   --enable-newlib-io-long-long \
  29.   --enable-newlib-register-fini \
  30.   --disable-newlib-supplied-syscalls \
  31.   --disable-nls
  32.  
  33. #echo Building newlib-nano...
  34. make -j
  35.  
  36. #echo Installing...
  37. make install
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement