public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* cross compiler for Cygwin
@ 2001-03-09  9:31 nhat.dao
  2001-03-09  9:40 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 12+ messages in thread
From: nhat.dao @ 2001-03-09  9:31 UTC (permalink / raw)
  To: cygwin

hello everybody,

i am new here.

i do some exploration in nanotech.wisc.edu, xraylith.wisc.edu,
cygwin.com, delories.com, objsw.com,
redhat.com.
But i don t find what i search.

somebody can help me, pleaaase ?

my question :
1) where can i find documentation to install Arm cross compiler ?
(StrongArm & Cygnus)
2) where can i find download for this cross compiler into Cygwin ?

my problem.
i have linux and i do that :
sources file.c => build, StrongArm cross compiler GCC (sa110-le-gcc) =>
bin for Assabet (Intel)

now,
i would like do the same in Cygwin ?
sources file.c => cross compiler GCC into Cygwin ???? => bin for Assabet

(Intel)

but i don t know where can i find documentation to do that ? and where
can i find this cross compiler GCC
for Cygwin ?

version of Cygwin : "CYGWIN_NT-4.0 PCCXXX 1.1.8(0.34/3/2) 2001-01-31
10:08 i686 unknown"

thinx in advance for your answer.

/pegase
Paris in France


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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09  9:31 cross compiler for Cygwin nhat.dao
@ 2001-03-09  9:40 ` Larry Hall (RFK Partners, Inc)
  2001-03-09 11:47   ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-03-09  9:40 UTC (permalink / raw)


At 12:42 PM 3/9/2001, nhat.dao@philips.com wrote:
>hello everybody,
>
>i am new here.
>
>i do some exploration in nanotech.wisc.edu, xraylith.wisc.edu,
>cygwin.com, delories.com, objsw.com,
>redhat.com.
>But i don t find what i search.
>
>somebody can help me, pleaaase ?
>
>my question :
>1) where can i find documentation to install Arm cross compiler ?
>(StrongArm & Cygnus)
>2) where can i find download for this cross compiler into Cygwin ?
>
>my problem.
>i have linux and i do that :
>sources file.c => build, StrongArm cross compiler GCC (sa110-le-gcc) =>
>bin for Assabet (Intel)
>
>now,
>i would like do the same in Cygwin ?
>sources file.c => cross compiler GCC into Cygwin ???? => bin for Assabet
>
>(Intel)
>
>but i don t know where can i find documentation to do that ? and where
>can i find this cross compiler GCC
>for Cygwin ?
>
>version of Cygwin : "CYGWIN_NT-4.0 PCCXXX 1.1.8(0.34/3/2) 2001-01-31
>10:08 i686 unknown"
>
>thinx in advance for your answer.



Boy, today is the day for this question, isn't it?  Too bad we don't have
an FAQ for the "How do I make/where do I find the cross compiler for <X>?"

The answer to all your questions is in the email archives.  Questions just
like yours were answered as recently as today so you don't have to look too
far.  If you don't find what you want however, look further.  Its all in
there.  The short answer is that you have to build the cross-compiler you
want.  There are pointers in the email archives to information that will help
you do this.  The crossgcc email list at sources.redhat.com will be helpful
as well.

This is a recording... ;-)



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09  9:40 ` Larry Hall (RFK Partners, Inc)
@ 2001-03-09 11:47   ` Christopher Faylor
  2001-03-09 12:08     ` Larry Hall (RFK Partners, Inc)
  2001-03-09 13:36     ` Mumit Khan
  0 siblings, 2 replies; 12+ messages in thread
From: Christopher Faylor @ 2001-03-09 11:47 UTC (permalink / raw)
  To: cygwin

On Fri, Mar 09, 2001 at 12:35:08PM -0500, Larry Hall (RFK Partners, Inc) wrote:
>At 12:42 PM 3/9/2001, nhat.dao@philips.com wrote:
>>hello everybody,
>>
>>i am new here.
>>
>>i do some exploration in nanotech.wisc.edu, xraylith.wisc.edu,
>>cygwin.com, delories.com, objsw.com,
>>redhat.com.
>>But i don t find what i search.
>>
>>somebody can help me, pleaaase ?
>>
>>my question :
>>1) where can i find documentation to install Arm cross compiler ?
>>(StrongArm & Cygnus)
>>2) where can i find download for this cross compiler into Cygwin ?
>>
>>my problem.
>>i have linux and i do that :
>>sources file.c => build, StrongArm cross compiler GCC (sa110-le-gcc) =>
>>bin for Assabet (Intel)
>>
>>now,
>>i would like do the same in Cygwin ?
>>sources file.c => cross compiler GCC into Cygwin ???? => bin for Assabet
>>
>>(Intel)
>>
>>but i don t know where can i find documentation to do that ? and where
>>can i find this cross compiler GCC
>>for Cygwin ?
>>
>>version of Cygwin : "CYGWIN_NT-4.0 PCCXXX 1.1.8(0.34/3/2) 2001-01-31
>>10:08 i686 unknown"
>>
>>thinx in advance for your answer.
>
>
>
>Boy, today is the day for this question, isn't it?  Too bad we don't have
>an FAQ for the "How do I make/where do I find the cross compiler for <X>?"

I wonder where people are getting the idea that Cygwin naturally handles
cross compilation.  This is a rather odd idea and I don't see any hint
of this in any of our documentation.

I wonder if there is a web site somewhere making this claim in some vague
manner.

cgf

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09 11:47   ` Christopher Faylor
@ 2001-03-09 12:08     ` Larry Hall (RFK Partners, Inc)
  2001-03-09 13:36     ` Mumit Khan
  1 sibling, 0 replies; 12+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-03-09 12:08 UTC (permalink / raw)
  To: cygwin

At 02:47 PM 3/9/2001, Christopher Faylor wrote:
> >Boy, today is the day for this question, isn't it?  Too bad we don't have
> >an FAQ for the "How do I make/where do I find the cross compiler for <X>?"
>
>I wonder where people are getting the idea that Cygwin naturally handles
>cross compilation.  This is a rather odd idea and I don't see any hint
>of this in any of our documentation.
>
>I wonder if there is a web site somewhere making this claim in some vague
>manner.


Maybe people are misreading the "What is is?" in the FAQ and thinking that
Cygwin supports porting of UNIX programs to any platform.  I kind of doubt
that's the case though, since I don't get the impression that most of the 
folks querying about this have poked around the site much.  My guess is its
a result of rumor and innuendo.  If so, that should be easy to stop!;-)



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09 11:47   ` Christopher Faylor
  2001-03-09 12:08     ` Larry Hall (RFK Partners, Inc)
@ 2001-03-09 13:36     ` Mumit Khan
  2001-03-09 19:55       ` Christopher Faylor
  1 sibling, 1 reply; 12+ messages in thread
From: Mumit Khan @ 2001-03-09 13:36 UTC (permalink / raw)
  To: cygwin

On Fri, 9 Mar 2001, Christopher Faylor wrote:

> I wonder where people are getting the idea that Cygwin naturally handles
> cross compilation.  This is a rather odd idea and I don't see any hint
> of this in any of our documentation.

One possible reason may be due to the fact that various embedded tools 
companies, such as RedHat/Cygnus and Wind River, use Cygwin extensively 
as the x-development platform of choice for embedded systems (one of my 
colleagues is still using cygwin b17 based embedded tools).

The other reason you see all these messages is because most users who are
starting out in the cross-dev area using Cygwin are usually not the "old
hats" who've been there and done that, and running into the usual sea 
of misinformation regarding cross builds.

IMO it's to Cygwin's credit that developers want to use it as the
development platform for embedded tools, and we should certainly provide a
helping hand (for the host-specific parts of course, not the target bits
which has nothing to do with Cygwin).

Regards,
Mumit




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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09 13:36     ` Mumit Khan
@ 2001-03-09 19:55       ` Christopher Faylor
  2001-03-09 20:26         ` Mumit Khan
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2001-03-09 19:55 UTC (permalink / raw)
  To: cygwin

On Fri, Mar 09, 2001 at 03:36:14PM -0600, Mumit Khan wrote:
>On Fri, 9 Mar 2001, Christopher Faylor wrote:
>>I wonder where people are getting the idea that Cygwin naturally
>>handles cross compilation.  This is a rather odd idea and I don't see
>>any hint of this in any of our documentation.
>
>One possible reason may be due to the fact that various embedded tools
>companies, such as RedHat/Cygnus and Wind River, use Cygwin extensively
>as the x-development platform of choice for embedded systems (one of my
>colleagues is still using cygwin b17 based embedded tools).

Maybe.  That might explain the $5000-$10000 reference.  I'd be surprised
to hear that people are cognizant of that level of detail about these
tool offerings, though.  WindRiver certainly doesn't advertise Cygwin
and Red Hat itself just calls these tools GNUpro for Windows, the last I
checked.

>The other reason you see all these messages is because most users who
>are starting out in the cross-dev area using Cygwin are usually not the
>"old hats" who've been there and done that, and running into the usual
>sea of misinformation regarding cross builds.

Um, yeah.  I wasn't wondering why people were having problems building
cross compilers.  I know that that is difficult.  I certainly never
mastered it before I started at Cygnus.

Or, maybe the misinformation you're referring to is even more basic than
"How do I build a cross-compiler?"  It does seem like a lot of people
expect to get cross-compilation out-of-the-box.

>IMO it's to Cygwin's credit that developers want to use it as the
>development platform for embedded tools, and we should certainly
>provide a helping hand (for the host-specific parts of course, not the
>target bits which has nothing to do with Cygwin).

Yep.  That's what this mailing list is for.  Helping people use Cygwin
and Cygwin tools.

cgf

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09 19:55       ` Christopher Faylor
@ 2001-03-09 20:26         ` Mumit Khan
  2001-03-09 20:33           ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Mumit Khan @ 2001-03-09 20:26 UTC (permalink / raw)
  To: cygwin

On Fri, 9 Mar 2001, Christopher Faylor wrote:

> Or, maybe the misinformation you're referring to is even more basic than
> "How do I build a cross-compiler?"  It does seem like a lot of people
> expect to get cross-compilation out-of-the-box.

We would hope that someday it will build out of the box! Unfortunately, the 
current setup requires a bit of digging in, and for some reason, it seems 
to be a daunting task for many.

That's one great thing about the one-tree build that RedHat/Cygnus uses,
no hassle builds for a myriad a of host-target combos. And that's why
embedded system developers pay for commercial support, the cost of which
may seem atrocious when you first see it, but you soon find out that it's 
well worth it.

Regards,
Mumit



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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: cross compiler for Cygwin
  2001-03-09 20:26         ` Mumit Khan
@ 2001-03-09 20:33           ` Christopher Faylor
  0 siblings, 0 replies; 12+ messages in thread
From: Christopher Faylor @ 2001-03-09 20:33 UTC (permalink / raw)
  To: cygwin

On Fri, Mar 09, 2001 at 10:26:35PM -0600, Mumit Khan wrote:
>That's one great thing about the one-tree build that RedHat/Cygnus uses,
>no hassle builds for a myriad a of host-target combos. And that's why
>embedded system developers pay for commercial support, the cost of which
>may seem atrocious when you first see it, but you soon find out that it's 
>well worth it.

I hope someday we can truly make gcc.gnu.org/sources.redhat.com "one tree".
It's a little cumbersome right now with part of the tree on gcc.gnu.org:/cvs/gcc
and part on sources.redhat.com:/cvs/src/src

I do have a unified cvs repository that seems to work at "/cvs/uberbaum"
on sources.redhat.com.  It seems to work ok but it is not fully functional
as far as merging the different modules from gdb, gcc, binutils, etc.

cgf

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: cross compiler for Cygwin
  2001-03-10  4:31 John Andrews
@ 2001-03-10 14:09 ` Mumit Khan
  0 siblings, 0 replies; 12+ messages in thread
From: Mumit Khan @ 2001-03-10 14:09 UTC (permalink / raw)
  To: John Andrews; +Cc: 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: cross compiler for Cygwin
@ 2001-03-10  4:31 John Andrews
  2001-03-10 14:09 ` Mumit Khan
  0 siblings, 1 reply; 12+ messages in thread
From: John Andrews @ 2001-03-10  4:31 UTC (permalink / raw)
  To: 'Mumit Khan'; +Cc: cygwin

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@NanoTech.Wisc.EDU ]
Sent: Friday, March 09, 2001 8:21 PM
To: John Andrews
Cc: cygwin@cygwin.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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: cross compiler for Cygwin
  2001-03-09 19:43 John Andrews
@ 2001-03-09 20:21 ` Mumit Khan
  0 siblings, 0 replies; 12+ messages in thread
From: Mumit Khan @ 2001-03-09 20:21 UTC (permalink / raw)
  To: John Andrews; +Cc: 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: cross compiler for Cygwin
@ 2001-03-09 19:43 John Andrews
  2001-03-09 20:21 ` Mumit Khan
  0 siblings, 1 reply; 12+ messages in thread
From: John Andrews @ 2001-03-09 19:43 UTC (permalink / raw)
  To: cygwin

Hi All,

Well now that you've offered Mumit... 8-)

All jest aside, I'd like to start by saying Thank You Very Much! to all of
the people who put their time and effort into this and many other open
source support mailing lists. Hopefully your efforts can bring up a new
crowd of experts with the knowledge and the inclination to help you carry
the load.

So, now for the unpleasant part. I actually do realize that gcc must be
cross built to support targets other than its native pc-cygwin. But knowing
this and accomplishing it are two VERY different things.

I've spent quite a bit of time reading archives of this and other lists as
well as various web sites and ftp archives.

It seems one of the biggest issues to stumble the uninitiated is including
the correct headers for the run-time support libraries or OS. This and the
CRLF issue unique to cygwin seem to produce some really cryptic cross gcc
build failures.

Here's a detailed description of my environment with the error and a couple
of questions at the end. Thanks Again for helping out!

I'm trying to cross build gcc on a cygwin host to support uClinux on an
ARM7TDMI. I was able to build it to support eCos by following the very
explicit instructions and using the exact versions and patches specified on
the RedHat eCos site. However once venturing away from that script I've had
very little luck in getting gcc to compile in the wily world of straight
downloaded and installed tarballs. The number of combinations of versions,
patches, various different bits of advice on sym links to library include
files and config options is astronomical.

Given all this, this is my latest attempt:

binutils-2.10.1
gcc-2.95.2
uClinux-2.0.x from cvs.uclinux.org

#1)  extract all tarballs with tar not WinZip in /usr/src which is mounted
in textmode. 
#2)  build dirs are /tmp/builduClinux/binutils and /tmp/builduClinux/gcc 
      with /tmp mounted in binary mode
#3)  export MAKE_MODE=UNIX
#4)  config binutils from /tmp/builduClinux/binutils with:
/usr/src/binutils-2.10.1/configure --target=arm-elf-linux \
      --prefix=/usr/arm-uClinux \
      --exec-prefix=/usr/arm-uClinux/H-i686-pc-cygwin \
      -v 2>&1 | tee configure.out
#5)  make binutils with:
make -w all 2>&1 | tee make.out
#6)  install binutils with:
make -w install 2>&1 | tee install.out
#7)  put the new cross binutils at the head of the path with:
export PATH=/usr/arm-uClinux/H-i686-pc-cygwin/bin:$PATH
#8)  cd to /usr/src/uClinux-2.0.x and edit top level makefile with:
ARCH = armnommu
CROSS_COMPILE = arm-elf-linux-
#9)  make menuconfig setting system to AT91
#10) cd to /usr/arm-uClinux/include and set symlinks to uClinux headers
with:
ln -s /usr/src/uClinux-2.0.x/include/linux linux
ln -s /usr/src/uClinux-2.0.x/include/asm asm
#11) cd to /tmp/builduClinux/gcc and configure gcc with:
/usr/src/gcc-2.95.2/configure --target=arm-elf-linux \
      --prefix=/usr/arm-uClinux \
      --exec-prefix=/usr/arm-uClinux/H-i686-pc-cygwin \
      --with-gnu-as --with-gnu-ld --with-newlib \
      --enable-languages=c,c++ -v 2>&1 | tee configure.out
#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'
make[1]: *** [prefix.o] Error 1
make[1]: Leaving directory `/tmp/builduClinux/gcc/gcc'
make: *** [all-gcc] Error 2
make: Leaving directory `/tmp/builduClinux/gcc'
---end of make.out---

Are there specific patches I should run on gcc? I tried running the eCos gcc
patches once before and that did allow me to get farther but I'm not really
sure if those are specifically intended for the eCos environment or if
they're applicable to a more general cross gcc build.

Any advice anyone could offer would be Very Much Appreciated!

Thanks,

John E. A.

-----Original Message-----
From: Mumit Khan [ mailto:khan@NanoTech.Wisc.EDU ]
Sent: Friday, March 09, 2001 1:36 PM
To: cygwin@cygwin.com
Subject: Re: cross compiler for Cygwin


On Fri, 9 Mar 2001, Christopher Faylor wrote:

> I wonder where people are getting the idea that Cygwin naturally handles
> cross compilation.  This is a rather odd idea and I don't see any hint
> of this in any of our documentation.

One possible reason may be due to the fact that various embedded tools 
companies, such as RedHat/Cygnus and Wind River, use Cygwin extensively 
as the x-development platform of choice for embedded systems (one of my 
colleagues is still using cygwin b17 based embedded tools).

The other reason you see all these messages is because most users who are
starting out in the cross-dev area using Cygwin are usually not the "old
hats" who've been there and done that, and running into the usual sea 
of misinformation regarding cross builds.

IMO it's to Cygwin's credit that developers want to use it as the
development platform for embedded tools, and we should certainly provide a
helping hand (for the host-specific parts of course, not the target bits
which has nothing to do with Cygwin).

Regards,
Mumit




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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2001-03-10 14:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-09  9:31 cross compiler for Cygwin nhat.dao
2001-03-09  9:40 ` Larry Hall (RFK Partners, Inc)
2001-03-09 11:47   ` Christopher Faylor
2001-03-09 12:08     ` Larry Hall (RFK Partners, Inc)
2001-03-09 13:36     ` Mumit Khan
2001-03-09 19:55       ` Christopher Faylor
2001-03-09 20:26         ` Mumit Khan
2001-03-09 20:33           ` Christopher Faylor
2001-03-09 19:43 John Andrews
2001-03-09 20:21 ` Mumit Khan
2001-03-10  4:31 John Andrews
2001-03-10 14:09 ` Mumit Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).