Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <2407239113CD914CBA855A47698F01B0F544@SUGAH2.triscend.com> From: John Andrews To: "'Mumit Khan'" Cc: cygwin AT cygwin DOT com Subject: RE: cross compiler for Cygwin Date: Sat, 10 Mar 2001 04:29:26 -0800 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Thanks a million for the debug tip Mumit! 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 ; I tried a test program with the native gcc: typedef unsigned short WORD; typedef unsigned char BYTE; main () { typedef struct _IMAGE_IMPORT_BY_NAME { WORD int ; BYTE Name[1]; } IMAGE_IMPORT_BY_NAME,*PIMAGE_IMPORT_BY_NAME; } The compile failed with the same error as my cross gcc build: $ gcc test.c test.c: In function `main': test.c:5: two or more data types in declaration of `type name' 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? Thanks Again to You and everyone else out there reading this stuff... John E. A. BTW - It wasn't me complaining about the cost of compilers. Companies put a ton of time into developing their tools and probably even more on the phone with customers. In my case this is a personal effort to learn embedded linux and the GNU cross tools, I'm not in a position to get a professional support contract. Hopefully I'll be able to contribute back to the list once I've been through the mill successfully a few times. Thanks again for helping me out! -----Original Message----- From: Mumit Khan [mailto:khan AT NanoTech DOT Wisc DOT EDU] Sent: Friday, March 09, 2001 8:21 PM To: John Andrews Cc: cygwin AT cygwin DOT com Subject: RE: cross compiler for Cygwin On Fri, 9 Mar 2001, John Andrews wrote: > Well now that you've offered Mumit... 8-) That's why I wrote up a few howto's in the past, and the latest one is cygwin->linux. See http://www.nanotech.wisc.edu/~khan/software/gnu-win32/ for details. The trouble, as you've found out, is that various targets use different gcc versions (or patches to it), and it gets trickier to build. The only gcc that will build without tweaking is the gcc distributed by Cygwin team, but that may not have some of the patches that your target may require. And this is where the vendors for these embedded systems can do a lot of good, but of course support costs real money. Then again, so does time. [ steps in building look good. However ... ] > #12) make gcc with: > make -w all-gcc LANGUAGES="c" 2>&1 | tee make.out > > And that brings us full circle to where I was when I posted my first message > a couple of days ago. The make dies with the following error message: > ---tail of gcc make.out--- > gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. > -I/usr/src/gcc-2 > .95.2/gcc -I/usr/src/gcc-2.95.2/gcc/config > -I/usr/src/gcc-2.95.2/gcc/../include > \ > -DPREFIX=\"/usr/arm-uClinux\" \ > -c `echo /usr/src/gcc-2.95.2/gcc/prefix.c | sed 's,^\./,,'` > In file included from /usr/include/w32api/windef.h:143, > from /usr/include/w32api/windows.h:96, > from /usr/src/gcc-2.95.2/gcc/prefix.c:69: > /usr/include/w32api/winnt.h:2266: two or more data types in declaration of > `type > name' This is where debugging comes in. Here's what you do: $ make all-gcc LANGUAGES="c" CFLAGS=-save-temps and look at prefix.i file and see what gives. And then you'll get to the next problem, and the same applies, and so on. Fun, isn't it? Regards, Mumit -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple