Guest User

Untitled

a guest
May 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.23 KB | None | 0 0
  1. 22:20:00 - ~/devel/openwrt/trunk
  2. jow@wws-7 $ ./scripts/toolchain-util.sh -h
  3. Usage: ./scripts/toolchain-util.sh -s dir -d dir [-t target]\n
  4. -s / --source Source directory
  5. -d / --destination Destination directory
  6. -t / --target Find GNU target name and exit
  7. -r / --sysroot Used sysroot (defaults to destination directory)
  8. -f / --cflags Use given cflags when calling compiler (multilib...)
  9. -c / --copy Copy the toolchain files instead of hardlinking them
  10. -T / --tests Run basic compile and linking tests of toolchain in -s
  11. -l / --libs Find all shared objects belonging to given library
  12. -b / --bins Find all executables belonging to given program
  13. -h / --help Display this help
  14.  
  15. 22:20:04 - ~/devel/openwrt/trunk
  16. jow@wws-7 $ ./scripts/toolchain-util.sh -c -s /home/jow/devel/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/ -d /tmp/toolchain
  17. mkdir ./sbin
  18. cp ./sbin/ldconfig
  19. mkdir ./bin
  20. cp ./bin/mips-openwrt-linux-gdb
  21. cp ./bin/mips-openwrt-linux-uclibc-ar
  22. cp ./bin/mips-openwrt-linux-c++
  23. cp ./bin/mips-openwrt-linux-ld
  24. cp ./bin/mips-openwrt-linux-uclibc-gccbug
  25. cp ./bin/mips-openwrt-linux-uclibc-gcc
  26. ...
  27. cp ./lib/libdl.so
  28. cp ./lib/libcrypt.a
  29. cp ./lib/libc.so
  30. cp ./lib/lib
  31. cp ./lib/libutil-0.9.32.1-git.so
  32. cp ./lib/librt_pic.a
  33. cp ./lib/librt-0.9.32.1-git.so
  34. cp ./lib/libdl-0.9.32.1-git.so
  35. cp ./lib/libutil.so
  36. cp ./lib/crt1.o
  37. cp ./lib/libresolv_pic.a
  38. cp ./lib/libutil_pic.a
  39. wrap mips-openwrt-linux-uclibc-gcc
  40. wrap mips-openwrt-linux-uclibc-gcc-4.5.4
  41. wrap mips-openwrt-linux-uclibc-c++
  42. wrap mips-openwrt-linux-uclibc-g++
  43. wrap mips-openwrt-linux-uclibc-cpp
  44. wrap mips-openwrt-linux-uclibc-ld
  45. 2001 files and directories copied.
  46.  
  47. 22:20:34 - ~/devel/openwrt/trunk
  48. jow@wws-7 $ /tmp/toolchain/bin/mips-openwrt-linux-gcc -v
  49. Using built-in specs.
  50. COLLECT_GCC=/tmp/toolchain/bin/mips-openwrt-linux-uclibc-gcc.bin
  51. COLLECT_LTO_WRAPPER=/tmp/toolchain/bin/../libexec/gcc/mips-openwrt-linux-uclibc/4.5.4/lto-wrapper
  52. Target: mips-openwrt-linux-uclibc
  53. Configured with: /home/jow/devel/openwrt/trunk/build_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/gcc-linaro-4.5-2012.01/configure --prefix=/home/jow/devel/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32 --build=i486-linux-gnu --host=i486-linux-gnu --target=mips-openwrt-linux-uclibc --with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap --disable-multilib --disable-nls --with-host-libstdcxx=-lstdc++ --with-float=soft --with-gmp=/home/jow/devel/openwrt/trunk/staging_dir/host --with-mpfr=/home/jow/devel/openwrt/trunk/staging_dir/host --disable-decimal-float --with-mips-plt --with-mpc=/home/jow/devel/openwrt/trunk/staging_dir/host --disable-libssp --disable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-threads --with-slibdir=/home/jow/devel/openwrt/trunk/staging_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/lib --enable-lto --with-libelf=/home/jow/devel/openwrt/trunk/staging_dir/host --disable-tls
  54. Thread model: posix
  55. gcc version 4.5.4 20120105 (prerelease) (Linaro GCC 4.5-2012.01)
  56. COMPILER_PATH=/tmp/toolchain/bin/../libexec/gcc/mips-openwrt-linux-uclibc/4.5.4/:/tmp/toolchain/bin/../libexec/gcc/:/tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/bin/
  57. LIBRARY_PATH=/tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/:/tmp/toolchain/bin/../lib/gcc/:/tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/
  58. COLLECT_GCC_OPTIONS='-idirafter' '/tmp/toolchain/bin/../usr/include' '-L' '/tmp/toolchain/bin/../usr/lib' '-v' '-msoft-float' '-mllsc' '-mplt' '-mno-synci' '-mno-shared'
  59. /tmp/toolchain/bin/../libexec/gcc/mips-openwrt-linux-uclibc/4.5.4/collect2 --eh-frame-hdr -EB -dynamic-linker /lib/ld-uClibc.so.0 /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crt1.o /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crti.o /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/crtbegin.o -L /tmp/toolchain/bin/../usr/lib -L/tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4 -L/tmp/toolchain/bin/../lib/gcc -L/tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib -rpath-link=/tmp/toolchain/bin/../usr/lib -lgcc_s -lc -lgcc_s /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/crtend.o /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crtn.o
  60. /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crt1.o: In function `__start':
  61. (.text+0xc): undefined reference to `main'
  62. /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crt1.o: In function `__start':
  63. (.text+0x10): undefined reference to `main'
  64. collect2: ld returned 1 exit status
  65.  
  66. 22:20:45 - ~/devel/openwrt/trunk
  67. jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -T
  68. CC=mips-openwrt-linux-gcc
  69. CXX=mips-openwrt-linux-g++
  70. PATH=/tmp/toolchain/bin:/home/jow/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sbin:/usr/sbin
  71.  
  72. =====================
  73. Testing C hello world
  74. =====================
  75. Program /tmp/25447.test1.c:
  76. #include <stdio.h>
  77.  
  78. int main(int argc, char **argv)
  79. {
  80. printf("Hello world!\n");
  81. return 0;
  82. }
  83.  
  84. Command: mips-openwrt-linux-gcc -o /tmp/toolchain/bin/test1 /tmp/25447.test1.c
  85. Result: Succeeded
  86.  
  87. =========================
  88. Testing C library linking
  89. =========================
  90. Program /tmp/25447.test2.c:
  91. #include <stdio.h>
  92.  
  93. int testcall(int value);
  94. int main(int argc, char **argv)
  95. {
  96. printf("Hello library!\n");
  97. return testcall(123);
  98. }
  99.  
  100. Library /tmp/25447.test2.lib.c:
  101. int testcall(int value)
  102. {
  103. return value;
  104. }
  105.  
  106. Command: mips-openwrt-linux-gcc -o /tmp/toolchain/usr/lib/libtest2.so -fPIC -shared /tmp/25447.test2.lib.c
  107. Result: Succeeded
  108. Command: mips-openwrt-linux-gcc -o /tmp/toolchain/bin/test2 -ltest2 /tmp/25447.test2.c
  109. Result: Succeeded
  110.  
  111. =======================
  112. Testing C++ hello world
  113. =======================
  114. Program /tmp/25447.test3.cpp:
  115. #include <iostream>
  116.  
  117. using namespace std;
  118.  
  119. int main()
  120. {
  121. cout << "Hello World!" << endl;
  122. return 0;
  123. }
  124.  
  125. Command: mips-openwrt-linux-g++ -o /tmp/toolchain/bin/test3 /tmp/25447.test3.cpp
  126. Result: Succeeded
  127.  
  128. ===========================
  129. Testing C++ library linking
  130. ===========================
  131. Program /tmp/25447.test4.cpp:
  132. #include <iostream>
  133.  
  134. class TestClass
  135. {
  136. public:
  137. TestClass();
  138. int DoTest(int value);
  139. };
  140.  
  141. using namespace std;
  142.  
  143. int main(int argc, char **argv)
  144. {
  145. cout << "Hello library!" << endl;
  146.  
  147. TestClass *tc = new TestClass;
  148. int rv = tc->DoTest(123);
  149.  
  150. delete tc;
  151. return rv;
  152. }
  153.  
  154. Library /tmp/25447.test4.lib.cpp:
  155. using namespace std;
  156.  
  157. class TestClass
  158. {
  159. public:
  160. TestClass();
  161. int DoTest(int value);
  162. };
  163.  
  164. TestClass::TestClass()
  165. {
  166. return;
  167. }
  168.  
  169. int TestClass::DoTest(int value)
  170. {
  171. return value;
  172. }
  173.  
  174. Command: mips-openwrt-linux-g++ -o /tmp/toolchain/usr/lib/libtest4.so -fPIC -shared /tmp/25447.test4.lib.cpp
  175. Result: Succeeded
  176. Command: mips-openwrt-linux-g++ -o /tmp/toolchain/bin/test4 -ltest4 /tmp/25447.test4.cpp
  177. Result: Succeeded
  178.  
  179. 22:20:59 - ~/devel/openwrt/trunk
  180. jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -l c
  181. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/ld-uClibc-0.9.32.1-git.so
  182. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/ld-uClibc.so.0
  183. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libc.so
  184. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libc.so.0
  185. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libcrypt.so
  186. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libcrypt.so.0
  187. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libdl.so
  188. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libdl.so.0
  189. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libm.so
  190. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libm.so.0
  191. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libutil.so
  192. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libutil.so.0
  193.  
  194. 22:21:09 - ~/devel/openwrt/trunk
  195. jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -l pthread
  196. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread-0.9.32.1-git.so
  197. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread.so
  198. /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread.so.0
  199.  
  200. 22:21:13 - ~/devel/openwrt/trunk
  201. jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -b ldd
  202. /tmp/toolchain/bin/ldd
  203.  
  204. 22:21:19 - ~/devel/openwrt/trunk
  205. jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -t
  206. mips-openwrt-linux-uclibc
  207.  
  208. 22:21:23 - ~/devel/openwrt/trunk
  209. jow@wws-7 $ cat /tmp/toolchain/bin/mips-openwrt-linux-gcc
  210. #!/bin/sh
  211. D="$(dirname "$0")"
  212. exec "$D/mips-openwrt-linux-uclibc-gcc.bin" ${1:+ -idirafter "$D/../usr/include" -L "$D/../usr/lib" -Wl,-rpath-link="$D/../usr/lib" "$@"}
  213.  
  214. 22:25:29 - ~/devel/openwrt/trunk
  215. jow@wws-7 $ cat /tmp/toolchain/bin/mips-openwrt-linux-ld
  216. #!/bin/sh
  217. D="$(dirname "$0")"
  218. exec "$D/mips-openwrt-linux-uclibc-ld.bin" ${1:+ -L "$D/../usr/lib" -rpath-link="$D/../usr/lib" "$@"}
Add Comment
Please, Sign In to add comment