This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: building a gcc cross compiler


You do need to build binutils.

So crosstool isn't working on cygwin, eh?
Did you read
http://kegel.com/crosstool/current/doc/crosstool-howto.html#cygwin
?

On 6/15/07, Sam Gardner <S.Gardner@ncapsa.com> wrote:




Hi Dan,



This is my first attempt at building a gcc compiler, and I'm getting errors.
I saw your name on the forums and I've tried your crosstoll, so I thought
I'd drop you an email first before posting on a forum.



I am trying to build a gcc cross compiler on cygwin for a SH4 Linux target.



First I ran the configure script with the following options:



../gcc-4.2.0/configure –target sh4-linux –enable-languages=c,c++



It seems to have created the Makefile ok, but I did get the following
messages:



checking for ar... no

checking for sh4-linux-ar... no

checking for as... no

checking for sh4-linux-as... no

checking for dlltool... no

checking for sh4-linux-dlltool... no

checking for ld... no

checking for sh4-linux-ld... no

checking for lipo... no

checking for sh4-linux-lipo... no

checking for nm... no

checking for sh4-linux-nm... no

checking for objdump... no

checking for sh4-linux-objdump... no

checking for ranlib... no

checking for sh4-linux-ranlib... no

checking for strip... no

checking for sh4-linux-strip... no

checking for windres... no

checking for sh4-linux-windres... no

checking where to find the target ar... pre-installed

checking where to find the target as... pre-installed



Do I need to build the binutils for SH4-linux? I'm a bit confused about
this. Some sources seem to imply that this is the case.



When I run the Makefile I get the following error:



TARGET_CPU_DEFAULT="" \

HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \

/bin/sh ../../gcc-4.2.0/gcc/mkconfig.sh tconfig.h

/cygdrive/c/work/sh4-linux-gcc/./gcc/xgcc
-B/cygdrive/c/work/sh4-linux-gcc/./gcc/
-B/usr/local/sh4-linux/bin/ -B/usr/local/sh4-linux/lib/ -isystem
/usr/local/sh4-linux/include -isystem
/usr/local/sh4-linux/sys-include -O2 -O2 -g -O2  -DIN_GCC
-DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
-I../../gcc-4.2.0/gcc -I../../gcc-4.2.0/gcc/.
-I../../gcc-4.2.0/gcc/../include -I../../gcc-4.2.0/gcc/../libcpp/include
-I../../gcc-4.2.0/gcc/../libdecnumber -I../libdecnumber  -g0
-finhibit-size-directive -fno-inline-functions -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -Dinhibit_libc  \

-c ../../gcc-4.2.0/gcc/crtstuff.c -DCRT_BEGIN \

-o crtbegin.o

make[2]: Leaving directory
`/cygdrive/c/work/sh4-linux-gcc/gcc'

make[1]: Leaving directory `/cygdrive/c/work/sh4-linux-gcc'

/cygdrive/c/work/sh4-linux-gcc/.gcc/as: unrecognized option
'-little'

make[2]: *** [crtbegin.o] Error 1

make[1]: *** [all-gcc] Error 2

make: *** [all] Error 2



Also, I have tried using your crosstool, but the script doesn't seem to run
on cygwin. When I run the script I get the following error:

: invalid optionine 6: set: -



When I comment out this line I get further errors.



Please can you advise me the best way forward to build a gcc compiler for
sh4-linux using cygwin.



Kind Regards,



Sam. ###########################################
Any opinions expressed in the email are those of the individual and not
necessarily of the Company.

This email and any files transmitted with it are confidential and solely for
the use of the intended recipient. It may contain material protected by
lawyer-client privilege. If you are not the intended recipient or the person
responsible for delivering to the intended recipient, be advised that you
have received this email in error and that any use is strictly prohibited.

If you have received this email in error please notify the Security Manager
by telephone on +44 (0)114 2541271 or by email to security@ncapsa.com

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/


--
Wine for Windows ISVs: http://kegel.com/wine/isv

--
For unsubscribe information see http://sourceware.org/lists.html#faq


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