This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


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

RE: cross compiler for Cygwin


On Sat, 10 Mar 2001, John Andrews wrote:

> I think it's led to the problem.
> 
> In the file /usr/include/w32api/winnt.h line 2266 there's a typedef:
> 
> typedef struct _IMAGE_IMPORT_BY_NAME {
>         WORD Hint;
>         BYTE Name[1];
> } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
> 
> When I found this definition in the prefix.i it had been altered:
> 
> typedef struct _IMAGE_IMPORT_BY_NAME {
>         WORD int  ;
>         BYTE Name[1];
> } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME;
> 
> WORD Hint; is changed to WORD int ;

This is a problem with arm header files in gcc, which defines a macro
named "Hint", and that's what causes this problem. Windows API pollutes
user namespace in a horrible way, and makes life a lot harder that it
needs to be. Here's a quick workaround: replace all instances of "Hint" 
in gcc/config/arm/arm.[ch] files with something else (eg Hint->ARM_HINT) 
and rebuild.

> I had read several of your other how-tos but somehow I missed cygwin ->
> linux. I read through that and the run time libraies and headers are a major
> thing I'm missing. I'm trying to find a prebuilt version for my target to
> fill in the blanks. Do you think this is the?

You can do it one of two ways:
 
1. build glibc with some dummy (such as empty) stdio.h and stdlib.h
   headers, install, and then use that to build gcc.
2. install the prebuilt runtime from a linux machine, and that's the
   method I've outlined in my howto. 

Method 1 can be easy or hard depending on how well you understand glibc
setup, which is non-trivial.

Regards,
Mumit



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


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