Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.48 KB | None | 0 0
  1. [davis@t61p v2]$ cat doit.sh
  2. #!/bin/bash
  3.  
  4.  
  5. # edit /opt/xxx/yyy/boost/boost_1_51_0/tools/build/v2/user-config.jam to add the following line
  6. #       using gcc : 4.3arm : arm-linux-gnueabi-g++ : <architecture>arm <target-os>linux ;
  7.  
  8.  
  9. # Later we modify path, make sure our path does not use the cross compiler at beginning
  10. export PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/java6/bin:/opt/java6/db/bin:/opt/java6/jre/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
  11.  
  12.  
  13.  
  14. # In this stage, we are using the host compiler.
  15.  
  16. # setup env variable for $BOOST_DIR
  17. # I'm not sure if this is being used, but set it just in case.
  18. export BOOST_ROOT=/opt/xxx/yyy/boost/boost_1_51_0
  19.  
  20. # this is run from $BOOST_DIR/tools/build/v2 aka  /opt/xxx/yyy/boost/boost_1_51_0/tools/build/v2
  21. # in this case, I do not think you invoke the cross compiler. I think at this point, you are building
  22. # code for the host development machine.
  23. ./bootstrap.sh --with-toolset=gcc
  24.  
  25.  
  26. # setup path so that gcc from cross compiler is first in the path
  27. # also specify cross_compiler env variable in case its used.
  28. #
  29. # this will find the cross compiler for those who dont use the prefix, ie. gcc
  30. export PATH=/opt/arm/usr/local/arm-linux-gnueabi/bin:$PATH
  31. # this will find the cross compiler for those who  use the prefix, ie. arm-linux-gnueabi-gcc
  32. export PATH=/opt/arm/usr/local/bin:$PATH
  33. # this will set the cross compiler prefix for those who use it
  34. export CROSS_COMPILE=arm-linux-gnueabi-
  35.  
  36.  
  37. # build boost.build so that we can build boost or are we building boost at this point?
  38. #
  39. # WARNING!!!
  40. # Specify an install directory so that it doesn't put the results in /usr/local/bin.
  41. # Even if you dont specify install as an option to ./b2 it will attempt to copy files to /usr/bin
  42. # in the following step!
  43. #
  44. #   /opt/xxx/boost is where we want results. Our code will this dir in order to use boost.
  45. #   /opt/xxx/yyy/boost/boost_1_51_0 is the top of the boost src.  We are building beneath there.
  46. #./b2 --toolset=gcc-4.3arm --prefix=/opt/xxx/boost
  47.  
  48. # hmm. I did not get any .a or .so after that last step. Try to add a install parameter.
  49. ./b2 --toolset=gcc-4.3arm --prefix=/opt/xxx/boost  --build-type=complete stage
  50. # hmm. I did not get any .a or .so after that last step. Try to add a install parameter.
  51. #./b2 --toolset=gcc-4.3arm --prefix=/opt/xxx/boost  install
  52.  
  53.  
  54. # at this point, we have the cross compiler in our path first.  We are good to go for building our code using boost
  55. # with the cross compiler.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement