[crosstool-ng] error building x86 toolchain
Khem Raj
raj.khem@gmail.com
Wed Jan 7 20:13:00 GMT 2009
On (07/01/09 08:14), Matthias Kaehlcke wrote:
> Hi Khem,
>
> El Mon, Jan 05, 2009 at 04:23:31PM -0800 Khem Raj ha dit:
>
> > On (02/01/09 18:52), Matthias Kaehlcke wrote:
> > > hi,
> > >
> > > i ran into an error during the crosstool-ng build for a x86
> > > toolchain in the compilation of pthread_rwlock_tryrdlock.c:
> > >
> > > [ALL ] pthread_rwlock_tryrdlock.c: Assembler messages:
> > > [ALL ] pthread_rwlock_tryrdlock.c:52: Error: suffix or operands
> > > invalid for `mov'
> > > [ERROR] make[3]: ***
> > > [/data/prog/embedded/toolchains/ct-ng-build/targets/i386-unknown-linux-gnu/build/build-libc/nptl/pthread_rwlock_tryrdlock.o]
> > > Error 1
> >
> > I think this error is coming from lll_lock defined in
> > ./nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h. In the inline asm it
> > says "g" (private) this tells compiler to chose from any
> > register, memory or immediate integer operand. So in your case compiler
> > choses register bl because __shared is unsigned chari and this instruction does not expect that. Note that
> > its not possible to do a lot of checks on inline code for the compiler
> > where as assembler can do better here in catching the error and it does.
> >
> > what opt level are you using? for me it works with -O2 and above
> > but I get same errors with O O1 or Os
>
> i build the toolchain with -O
>
> > may be typecasting private to (int) private would help here try this
> > patch attached it might help.
>
> after applying your patch pthread_rwlock_tryrdlock.c compiles.
>
> the build now stops with another error in nptl:
>
> [ALL ] make[3]: *** No rule to make target
> `/data/prog/embedded/toolchains/ct-ng-build/targets/i386-unknown-linux-gnu/build/build-libc/nptl/pthread_spin_trylock.o',
> needed by `lib-noranlib'. Stop.
Do you really need to build for i386 ? if not then I would suggest try
to build for i486-linux-gnu.
-Khem
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list