building newlib for mingw32

Christopher Faylor cgf@redhat.com
Tue Mar 18 16:51:00 GMT 2003


On Fri, Mar 14, 2003 at 03:59:49PM -0800, Brian Hawley wrote:
>I've been reading for days, and still can't quite come up with the answer 
>to several problems/questions.
>
>We are attempting to bring over some internally developed libraries and 
>code from what compiles on a variety of *nix boxes to Winblows.

Actually the name of the system is "Windows".  Derivations on the name Windows
were funny about ten years ago.  Ten years ago, I had funny quotes in my
signature too.  Eventually this kind of thing gets old and tedious.

I've never tried to build newlib for mingw since, on Windows, newlib is
typically built for cygwin.  However, there seems to at least be a
target for mingw in configure so maybe it's supposed to work.

>We realize we will have to fill in a lot of what windows doesn't natively 
>provide [ i.e. system calls ] but we were hoping to use newlib to 
>accomplish some of what we couldn't accomplish easily with liberty & mingw.

Filling in a lot of what windows doesn't natively do is actually what cygwin
does.

>Problem 1: configure. I've followed the README, but the configure script in 
>the top level build directory does not recurse.
>		And, if I use ../../newlib/configure, then the include path 
>		is wrong, and the .c's can't find libc/include.

Sorry, but you're not providing many details.  As a wild guess, perhaps
you shouldn't be using relative paths to configure but should be
building in a completely separate build directory.  That's how I typically
build newlib for cygwin.

Otherwise, please provide your directory layout, the commands you're using
to configure and make newlib, an example gcc command line, and exact error
message output.

>Problem 2: I worked around problem 1 manually. I then created stubs for all 
>the system calls that newlib makes [ and it makes a few ], I will fill them 
>out later.
>		But, I get linker errors complaining that gcleanup and wsbrk 
>		are multiply defined...i.e. in freer.o and mallocr.o.

Sorry.  Can't help there.  Again, details would help, like the actual gcc
command line you're using.

cgf



More information about the Newlib mailing list