This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Add -lwinsock -lcoredll to LIB_SPEC for arm-wince-pe [PATCH]
- From: Shaun Jackman <sjackman at pathwayconnect dot com>
- To: Jim Wilson <wilson at tuliptree dot org>
- Cc: gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: 15 Jul 2003 08:41:11 -0600
- Subject: Re: Add -lwinsock -lcoredll to LIB_SPEC for arm-wince-pe [PATCH]
- Organization: Pathway Connectivity
- References: <1057933003.3202.163.camel@bluesteel.pathway> <3F138C45.2050403@tuliptree.org>
On Mon, 2003-07-14 at 23:08, Jim Wilson wrote:
> Shaun Jackman wrote:
> > For "Hello, world!" to compile cleanly in my tool-chain, -lwinsock and
> > -lcoredll must be added to the LIB_SPEC.
>
> That seems very odd. Why is that?
>
> It isn't a good idea to have the compiler link in unusual libraries by
> default unless there is a very good reason for it.
-lwinsock and -lcoredll together provide what we understand to be a libc
implementation. The Pocket PC SDK also provides libc.lib and
corelibc.lib, though I've yet to figure out their purpose. They seem to
be mostly empty shells that possibly provide start-up and tear-down
code. If you wanted to link against only the native SDK, I expect you
would have to rename coredll.lib to libc.a and link against that. In my
case, I named the native libraries libwinsock.a and libcoredll.a. I
named newlib libc.a. Since Voxware's (*) newlib wraps certain Pocket PC
calls though, it also depends on -lcoredll, and in particular -lwinsock
for the socket calls.
I've only just now realised that it's possible to build the wince
tool-chain without using newlib. In that case, I think the user would
still have to link against winsock and coredll, or otherwise rename and
shuffle libraries so that linking against only -lc does actually link
against winsock and coredll.
Final result is, is it possible to configure a wince tool-chain such
that -lwinsock and -lcoredll is not required? If the answer is no, I
suggest adding the above patch. If the answer is yes, I'd be interested
in knowing how.
Cheers,
Shaun
(*) http://www.voxware.com/opensource/opensource.html