Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

building linux

By: a guest on Apr 4th, 2012  |  syntax: Bash  |  size: 3.41 KB  |  views: 37  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. cd $SOURCE
  2. cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
  3. cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
  4. mkdir $HOME/build.binutils
  5. cd ../build.binutils
  6. /mnt/network/source/binutils/configure --build=$MACHTYPE --host=$MACHTYPE --target=$LFS_TGT --prefix=/tools --disable-nls \
  7. --disable-werror ac_cv_sizeof_mp_t=8
  8. make
  9. case $(uname -m) in
  10. x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;/
  11. easc
  12.  
  13. if [ $UID != 0 ]
  14. then
  15.         sudo make install
  16. fi
  17.  
  18. wget http://mingw-wine.googlecode.com/files/mingw64api-mingwport-src.7z
  19. mkdir $HOME/build.mingw-headers
  20. cd ../build.mingw-headers
  21. /mnt/network/source/mingw64api-mingwport-src/mingw-w64-headers/configure --build=$MACHTYPE  --host=$LFS_TGT --prefix=/tools/$LFS_TGT
  22. make
  23. if [ $UID != 0 ]
  24. then
  25.         sudo make install
  26. fi
  27.  
  28. cd $SOURCE
  29. svn checkout svn://gcc.gnu.org/svn/gcc/trunk gcc
  30. mkdir $HOME/build.gcc1
  31. cd ../build.gcc1
  32. AR=/tools/bin/$LFS_TGT-ar RANLIB=/tools/bin/$LFS_TGT-ranlib /mnt/network/source/gcc/configure --build=$MACHTYPE --host=$MACHTYPE --target=$LFS_TGT --prefix=/tools --disable-nls \
  33. --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap \
  34. --disable-libssp --disable-libgomp --enable-languages=c --without-ppl --without-cloog \
  35. --with-headers=/tools/$LFS_TGT/ include ac_cv_sizeof_mp_limb_t=8
  36. make
  37. if [ $UID != 0 ]
  38. then
  39.         sudo make install
  40. fi
  41.  
  42. sudo touch /tools/lib/gcc/x86_64-w64-mingw32/x.x.x/specs
  43. sudo chown lfs:lfs /tools/lib/gcc/x86_64-w64-mingw32/x.x.x/specs
  44. SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
  45. sudo $LFS_TGT-gcc -dumpspecs | sed \
  46. -e 's@/lib\(64\)\?/ld@/tools&@g' \
  47. -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
  48. echo "New specs file is: $SPECS"
  49. unset SPECS
  50.  
  51. mkdir $HOME/build.mingw-crt
  52. cd ../build.mingw-crt
  53. $SOURCE/mingw64api-mingwport-src/mingw-w64-crt/configure --build=$MACHTYPE --host=$LFS_TGT --disable-lib32 --prefix=/tools --disable-leading-underscores
  54. make
  55. #make a scipt to install the crt.
  56. # the script should include these lines:
  57. #
  58. # #!/bin/sh
  59. # export PATH="$PATH:/usr/local/bin" this is the path to your cross complier change if needed
  60. # make install
  61. #
  62. # go back to the gcc build directory, and run make; make install again
  63. CC=$LFS_TGT-gcc
  64. #-----------------------------------
  65. mkdir build.binutils2
  66. cd ../build.binutils2
  67. ln -s /tools/lib /w-environment/lib
  68. ln -s /tools/bin /w-environment/bin
  69. ln -s /tools/libexec /w-environment/libexec
  70. ln -s /tools/share /w-envonrment/share
  71. CC="$LFS_TGT-gcc -B/tools/lib/" AR=/w-environment/bin/$LFS_TGT-ar RANLIB=/w-envronment/$LFS_TGT-ranlib \
  72. ../source/binutils/configure  --disable-nls --with-lib-path=/tools/lib --target=$MACHTYPE --host=$LFS_TGT \
  73. ac_cv_sizeof_mp_limb_t=8
  74. make
  75. if [ $UID != 0 ]
  76. then
  77.         sudo make install
  78. fi
  79.  
  80. make -C ld clean
  81. make -C ld LIB_PATH=/usr/lib:/lib
  82. sudo cp -v ld/ld-new /tools/bin
  83. libtool --finish /tools/libexec/gcc/$LFS_TGT/x.x.x/
  84. #
  85. mkdir $HOME/build.gcc2
  86. cd ../build.gcc2
  87. CC="$LFS_TGT-gcc -B/tools/lib/" AR=/w-environment/bin/$LFS_TGT-ar RANLIB=/w-envronment/$LFS_TGT-ranlib \
  88. ../source/binutils/configure --prefix=/w-environment/ --with-local-prefix=/w-environment/ --enable-shared --enable-languages=c,c++ \
  89. --disable-libstdcxx-pch --disable-multilib --disable-bootstrap --disable-libgomp --without-ppl --without-cloog --build=$MACHTYPE --host=$LFS_TGT \
  90. --with-mpfr-include=$(pwd)/../source/mpfr --with-mpfr-lib=$(pwd)/mpfr/.libs