This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Add -lwinsock -lcoredll to LIB_SPEC for arm-wince-pe [PATCH]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]