Danny Backx wrote:
> Pedro,
> 
> I think I've finally figured out all the build quirks for gcov support.
> 
> At least one of the things I've modified in my local source tree
> requires some feedback from you, though.
> 
> As you already know, getting the coverage support to work required
> removing the -Dinhibit_libc from the build. That triggers other things.
> 
> To get everything to build for the mingw target, I've had to touch the
> mingw errno.h file. It used to start with :
> #ifdef __COREDLL__
> # include_next <errno.h>
> #else /* __COREDLL__ */
> 
> Our mingw compiler always defines __COREDLL__ (see
> src/gcc/gcc/config/arm/mingw32.h).
> 
> There's no other errno.h in my installation under /opt/mingw32ce. Also
> this file (src/mingw/include/errno.h) only gets installed in the mingw
> target, not in the cegcc target.
> 
> So my conclusion is that the #ifdef __COREDLL__ shouldn't be there.
> 
> Is this a correct conclusion or am I missing something ?
> 
> After your reply and a little more testing I'll probably post a complete
> patch for you to review. As a Christmas present or so :-)
> 

Hi Danny, sorry for the delay, and a delayed Merry Xmas for everyone. :)

Unfortunatly not a correct conclusion.  There is no errno concept in
the libc functions in coredll.dll, only [Get|Set]LastError, so mingw32ce
really shouldn't have an errno.h file. The:
#ifdef __COREDLL__
# include_next <errno.h>
#else /* __COREDLL__ */
... serves as what I called a "virtual deletion" of the file on the
ChangeLogs.  What it means is that if the user app/lib doesn't provide
an errno.h itself, this file is as good as if it never existed.  If the
app/lib provides one for emulation of whatever, then the #include_next
will find it.  You see, it is as if the src/mingw/include/errno.h file
doesn't exist.  I chose this approach instead of really deleting the
file, because I figured the upstream mingw guys wouldn't like to delete
the file(s) affected, and I didn't want to have two seperate include
dirs, one for WinCE and one for Win9x/WinNT MinGW.

So, the error what you are seing is similar to what you would see if
there wasn't any errno.h file whatsoever.  And plus, autoconf test
looking for it will also fail to find the file with a message like
"no include path to look for errno.h" or whatever.

What this means in the end is that you have to look in the gcov sources
for #include <errno.h> instances, and wrap them in '#ifdef HAVE_ERRNO_H'
and possibly add an AC_CHECK_HEADER for errno.h to to gcov's
configure.in/configure.ac.

The cegcc toolchain, as it is based on newlib, *does* have an errno.

Cheers,
Pedro Alves

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to