This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Specs vs static linkage?
- From: Robin Hu <huxw at knight dot 6test dot edu dot cn>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 28 May 2003 09:04:07 +0000
- Subject: Specs vs static linkage?
Hi everyone:
I am trying to add a new option into specs file, say -xxxx, for
g++. I'd like to let gcc substitute -xxxx to some compile options and
some libraries. So I modify specs file to:
*cclplus:
%{xxxx: -I/usr/local/include/xxxx }
And then:
*lib:
%{xxxx: -llocal_xxxx}
While I am compiling program without -static option,for example g++
-xxxx t.cpp, my modification just works.
But while -static is given, gcc failed to compile, and I am forced
to compile it via g++ -xxxx t.cpp -llocal_xxxx. This problem should
be due to libraries dependence, how can I avoid it?