Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 22:20:00 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -h
- Usage: ./scripts/toolchain-util.sh -s dir -d dir [-t target]\n
- -s / --source Source directory
- -d / --destination Destination directory
- -t / --target Find GNU target name and exit
- -r / --sysroot Used sysroot (defaults to destination directory)
- -f / --cflags Use given cflags when calling compiler (multilib...)
- -c / --copy Copy the toolchain files instead of hardlinking them
- -T / --tests Run basic compile and linking tests of toolchain in -s
- -l / --libs Find all shared objects belonging to given library
- -b / --bins Find all executables belonging to given program
- -h / --help Display this help
- 22:20:04 - ~/devel/openwrt/trunk
- 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
- mkdir ./sbin
- cp ./sbin/ldconfig
- mkdir ./bin
- cp ./bin/mips-openwrt-linux-gdb
- cp ./bin/mips-openwrt-linux-uclibc-ar
- cp ./bin/mips-openwrt-linux-c++
- cp ./bin/mips-openwrt-linux-ld
- cp ./bin/mips-openwrt-linux-uclibc-gccbug
- cp ./bin/mips-openwrt-linux-uclibc-gcc
- ...
- cp ./lib/libdl.so
- cp ./lib/libcrypt.a
- cp ./lib/libc.so
- cp ./lib/lib
- cp ./lib/libutil-0.9.32.1-git.so
- cp ./lib/librt_pic.a
- cp ./lib/librt-0.9.32.1-git.so
- cp ./lib/libdl-0.9.32.1-git.so
- cp ./lib/libutil.so
- cp ./lib/crt1.o
- cp ./lib/libresolv_pic.a
- cp ./lib/libutil_pic.a
- wrap mips-openwrt-linux-uclibc-gcc
- wrap mips-openwrt-linux-uclibc-gcc-4.5.4
- wrap mips-openwrt-linux-uclibc-c++
- wrap mips-openwrt-linux-uclibc-g++
- wrap mips-openwrt-linux-uclibc-cpp
- wrap mips-openwrt-linux-uclibc-ld
- 2001 files and directories copied.
- 22:20:34 - ~/devel/openwrt/trunk
- jow@wws-7 $ /tmp/toolchain/bin/mips-openwrt-linux-gcc -v
- Using built-in specs.
- COLLECT_GCC=/tmp/toolchain/bin/mips-openwrt-linux-uclibc-gcc.bin
- COLLECT_LTO_WRAPPER=/tmp/toolchain/bin/../libexec/gcc/mips-openwrt-linux-uclibc/4.5.4/lto-wrapper
- Target: mips-openwrt-linux-uclibc
- 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
- Thread model: posix
- gcc version 4.5.4 20120105 (prerelease) (Linaro GCC 4.5-2012.01)
- 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/
- 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/
- COLLECT_GCC_OPTIONS='-idirafter' '/tmp/toolchain/bin/../usr/include' '-L' '/tmp/toolchain/bin/../usr/lib' '-v' '-msoft-float' '-mllsc' '-mplt' '-mno-synci' '-mno-shared'
- /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
- /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crt1.o: In function `__start':
- (.text+0xc): undefined reference to `main'
- /tmp/toolchain/bin/../lib/gcc/mips-openwrt-linux-uclibc/4.5.4/../../../../mips-openwrt-linux-uclibc/lib/crt1.o: In function `__start':
- (.text+0x10): undefined reference to `main'
- collect2: ld returned 1 exit status
- 22:20:45 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -T
- CC=mips-openwrt-linux-gcc
- CXX=mips-openwrt-linux-g++
- PATH=/tmp/toolchain/bin:/home/jow/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/sbin:/usr/sbin
- =====================
- Testing C hello world
- =====================
- Program /tmp/25447.test1.c:
- #include <stdio.h>
- int main(int argc, char **argv)
- {
- printf("Hello world!\n");
- return 0;
- }
- Command: mips-openwrt-linux-gcc -o /tmp/toolchain/bin/test1 /tmp/25447.test1.c
- Result: Succeeded
- =========================
- Testing C library linking
- =========================
- Program /tmp/25447.test2.c:
- #include <stdio.h>
- int testcall(int value);
- int main(int argc, char **argv)
- {
- printf("Hello library!\n");
- return testcall(123);
- }
- Library /tmp/25447.test2.lib.c:
- int testcall(int value)
- {
- return value;
- }
- Command: mips-openwrt-linux-gcc -o /tmp/toolchain/usr/lib/libtest2.so -fPIC -shared /tmp/25447.test2.lib.c
- Result: Succeeded
- Command: mips-openwrt-linux-gcc -o /tmp/toolchain/bin/test2 -ltest2 /tmp/25447.test2.c
- Result: Succeeded
- =======================
- Testing C++ hello world
- =======================
- Program /tmp/25447.test3.cpp:
- #include <iostream>
- using namespace std;
- int main()
- {
- cout << "Hello World!" << endl;
- return 0;
- }
- Command: mips-openwrt-linux-g++ -o /tmp/toolchain/bin/test3 /tmp/25447.test3.cpp
- Result: Succeeded
- ===========================
- Testing C++ library linking
- ===========================
- Program /tmp/25447.test4.cpp:
- #include <iostream>
- class TestClass
- {
- public:
- TestClass();
- int DoTest(int value);
- };
- using namespace std;
- int main(int argc, char **argv)
- {
- cout << "Hello library!" << endl;
- TestClass *tc = new TestClass;
- int rv = tc->DoTest(123);
- delete tc;
- return rv;
- }
- Library /tmp/25447.test4.lib.cpp:
- using namespace std;
- class TestClass
- {
- public:
- TestClass();
- int DoTest(int value);
- };
- TestClass::TestClass()
- {
- return;
- }
- int TestClass::DoTest(int value)
- {
- return value;
- }
- Command: mips-openwrt-linux-g++ -o /tmp/toolchain/usr/lib/libtest4.so -fPIC -shared /tmp/25447.test4.lib.cpp
- Result: Succeeded
- Command: mips-openwrt-linux-g++ -o /tmp/toolchain/bin/test4 -ltest4 /tmp/25447.test4.cpp
- Result: Succeeded
- 22:20:59 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -l c
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/ld-uClibc-0.9.32.1-git.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/ld-uClibc.so.0
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libc.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libc.so.0
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libcrypt.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libcrypt.so.0
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libdl.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libdl.so.0
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libm.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libm.so.0
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libutil.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libutil.so.0
- 22:21:09 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -l pthread
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread-0.9.32.1-git.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread.so
- /tmp/toolchain/mips-openwrt-linux-uclibc/lib/libpthread.so.0
- 22:21:13 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -b ldd
- /tmp/toolchain/bin/ldd
- 22:21:19 - ~/devel/openwrt/trunk
- jow@wws-7 $ ./scripts/toolchain-util.sh -s /tmp/toolchain/ -t
- mips-openwrt-linux-uclibc
- 22:21:23 - ~/devel/openwrt/trunk
- jow@wws-7 $ cat /tmp/toolchain/bin/mips-openwrt-linux-gcc
- #!/bin/sh
- D="$(dirname "$0")"
- exec "$D/mips-openwrt-linux-uclibc-gcc.bin" ${1:+ -idirafter "$D/../usr/include" -L "$D/../usr/lib" -Wl,-rpath-link="$D/../usr/lib" "$@"}
- 22:25:29 - ~/devel/openwrt/trunk
- jow@wws-7 $ cat /tmp/toolchain/bin/mips-openwrt-linux-ld
- #!/bin/sh
- D="$(dirname "$0")"
- 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