[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cross Development
- To: http://dummy.us.eu.org/robert
- Subject: Re: Cross Development
- From: "Gary Albert" <http://www.fltdyn.com/~garya>
- Date: Tue, 4 Mar 1997 12:27:45 -0800
- Comments: Authenticated sender is <http://www.fltdyn.com/~garya>
- In-Reply-To: <199703041950.http://www.rigel.infonex.com/~LAA02729>
- Organization: Flight Dynamics
- Priority: A
- Reply-To: http://www.fltdyn.com/~garya
>
> I saw back in Dec 96 you posted a question to the gnu-win32 mailing list
> about trying to set-up a cross-development/compiler system on SunOS targetting
> Windows NT. Were you successful in this endeavor? I'd like to do the same
> for Solaris. Are there any pitfalls I should look-out for or any web pages
> you found particularly helpful?
>
>
Yes, I was finally successful in getting a cross development
environment set up under Sunos 4.1.3. The two major pitfalls I ran
into were getting the cross-environment to compile and link, and
finding the right steps in actually linking a Win32 executable.
The main problem I had with building the environment was in getting
the libgcc* stuff built. This is not an uncommon problem from what I
understand. I don't remember presicely the steps I had to take, but I
know I had to mess with a link in the gcc directory to the gnu
assembler. Most of the build required the as.new file in the gas
directory to be linked to as in the gcc directory. But some of the
stuff, specifically the libgcc* stuff, needed to use the sun's
assembler. I just ended up running the make until it failed,
removing or adding the link, re-running the make, and iterating until
it all built. There is probably a more elegant solution, but this
worked for me.
Linking a Win32 executable once I had the environment built took some
experimentation also. I finally ended up with a sequence like this
(as exerpted from a makefile):
CYGWIN=/usr/local/gnu-win32/i386-cygwin32
CC=$(CYGWIN)/bin/gcc
LD=$(CYGWIN)/bin/ld
DLLTOOL=$(CYGWIN)/bin/dlltool
DLLS=-lkernel32 -luser32 -lgdi32
win.exe:win.c
$(CC) -c -I/usr13/gnu-win32/i386-cygwin32/include win.c
-$(LD) -o junk --base-file=win.base win.o $(DLLS)
$(CC) -o junk -Xlinker --base-file=win.base win.o $(DLLS)
$(DLLTOOL) --base-file win.base --output-exp winexp.o $(CC) -o
win.exe win.o winexp.o $(DLLS)
I hope all of this helps.
___________________________________________________________
http://www.fltdyn.com/~garya
Gary Albert
Flight Dynamics
(503) 684-5384
___________________________________________________________