How can i compile my app linking statically glibc library, but only the code needed for my app? (Not all lib)

Now my compile command:

g++  -o newserver  test.cpp ... -lboost_system -lboost_thread -std=c++0x

Thanks!

Edit
Report