This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Override linker flags for cross compiler
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: libstdc++ at gcc dot gnu dot org
- Date: Wed, 12 Apr 2006 02:07:05 +0100
- Subject: Override linker flags for cross compiler
Hi guys,
I am building for arm-wince-pe target.
I am generating a dll that contains newlib+unix+libstdc++, similar in
idea to cygwin1.dll
I call this dll cegcc.dll.
Currently, the toolchain makes statically linked executables and dlls,
and I want
to make it link to cegcc.dll by default.
I've setup gcc specs so that:
gcc/g++ will link to this dll by default.
passing -static to gcc/g++ will remove -lcegcc from the link flags.
I am searching for a way to build the toolchain in one pass without
depending on having a
prebuilt cegcc.dll.
How can I teach libstdc++ to build with this switch on?
I tried:
crossconfig.m4
*arm-wince-pe)
+ LIBCFLAGS_FOR_TARGET="-static ${LIBCFLAGS_FOR_TARGET}"
+ AC_SUBST(LIBCFLAGS_FOR_TARGET)
But didn't work.
The autotests for a working compiler, executable suffix, etc, will fail,
because that "-static" isn't showing anywhere, and there is no
libcegcc.a yet.
Any hints?
Cheers,
Pedro Alves