glibc compilation error

2005-10-26 Thread Jeff Stevens
I am trying to cross compile GCC for an AMCC 440SP
platform (powerpc-linux).  Binutils and bootstrap GCC
compile fine, but when I make glibc it errors out with
the following:

 snippet 

if test -r
/opt/luan2/toolchain/build/glibc/csu/abi-tag.h.new;
then mv -f
/opt/luan2/toolchain/build/glibc/csu/abi-tag.h.new
/opt/luan2/toolchain/build/glibc/csu/abi-tag.h; \
else echo >&2 'This configuration not matched in
../abi-tags'; exit 1; fi
gawk -f ../scripts/gen-as-const.awk
../linuxthreads/sysdeps/powerpc/tcb-offsets.sym \
| powerpc-linux-gcc -S -o
/opt/luan2/toolchain/build/glibc/tcb-offsets.hT3
-std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes
-Wwrite-strings -g -mnew-mnemonics  -I../include
-I. -I/opt/luan2/toolchain/build/glibc/csu -I..
-I../libio  -I/opt/luan2/toolchain/build/glibc
-I../sysdeps/powerpc/powerpc32/elf
-I../sysdeps/powerpc/elf
-I../linuxthreads/sysdeps/unix/sysv/linux/powerpc/powerpc32
-I../linuxthreads/sysdeps/unix/sysv/linux/powerpc
-I../linuxthreads/sysdeps/unix/sysv/linux
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread
-I../linuxthreads/sysdeps/unix/sysv
-I../linuxthreads/sysdeps/unix
-I../linuxthreads/sysdeps/powerpc/powerpc32
-I../linuxthreads/sysdeps/powerpc
-I../sysdeps/unix/sysv/linux/powerpc/powerpc32
-I../sysdeps/unix/sysv/linux/powerpc
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu
-I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv
-I../sysdeps/unix/powerpc -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/powerpc/powerpc32/fpu
-I../sysdeps/powerpc/powerpc32
-I../sysdeps/wordsize-32 -I../sysdeps/powerpc/soft-fp
-I../sysdeps/powerpc/fpu -I../sysdeps/powerpc
-I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic
-nostdinc -isystem
/opt/luan2/toolchain/bin/lib/gcc/powerpc-linux/4.0.2/include
-isystem
/opt/luan2/toolchain/source/linux-2.6.13/include/
-D_LIBC_REENTRANT -include ../include/libc-symbols.h  
-DHAVE_INITFINI -x c - \
-MD -MP -MF
/opt/luan2/toolchain/build/glibc/tcb-offsets.h.dT -MT
'/opt/luan2/toolchain/build/glibc/tcb-offsets.h.d
/opt/luan2/toolchain/build/glibc/tcb-offsets.h'
: In function ‘dummy’:
:11: warning: asm operand 0 probably doesn’t
match constraints
:11: error: impossible constraint in ‘asm’
make[2]: ***
[/opt/luan2/toolchain/build/glibc/tcb-offsets.h] Error
1
make[2]: Leaving directory
`/opt/luan2/toolchain/source/glibc-2.3.5/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory
`/opt/luan2/toolchain/source/glibc-2.3.5'
make: *** [all] Error 2

 snippet 


Here is the configuration I run from a separate
build/glibc directory:

../../source/glibc-2.3.5/configure
--prefix=/opt/luan2/toolchain/bin
--target=powerpc-linux --host=powerpc-linux
--enable-add-ons=linuxthreads
--with-headers=/opt/luan2/toolchain/source/linux-2.6.13/include/
--with-binutils=/opt/luan2/toolchain/bin/powerpc-linux/bin

This seems to complete without any issues.

It seems that gcc is having issues with the following
line in gen-as-const.awk:

printf "asm (\"@@@name@@@%s@@@value@@@%%0@@@end@@@\" :
: \"i\" (%s));\n", name, $0;


Is my configure line incorrect, or have I maybe
incorrectly configured bootstrap gcc prior to building
glibc?

Thanks,
   Jeff Stevens



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


HowTo Cross Compile GCC on x86 Host for PowerPC Target

2005-10-26 Thread Jeff Stevens
Is there a HowTo out there on how to cross compile GCC
to run on another platform?  I have an x86 host
running linux, and an embedded PowerPC 440SP target
running linux.  I would like to compile GCC to run on
the target but am having some difficulties.  I have
compiled the cross compiler fine, but when I try to
compile a native compiler, it acts just like the cross
compiler (runs on the host and not the target).  All I
did was re-run gcc configure and "make all install". 
Here is the configuration I ran:

../../source/gcc-3.4.4/configure
--target=powerpc-linux --host=powerpc-linux
--prefix=/opt/luan2/toolchain/bin --enable-shared
--enable-threads --enable-languages=c

I'm obviously missing something, but can't seem to
find anything on the internet that explains
cross-compiling gcc for another target.

Thanks,
   Jeff Stevens



__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


RE: HowTo Cross Compile GCC on x86 Host for PowerPC Target

2005-10-26 Thread Jeff Stevens
Yes I added the cross-compiler to the path and created
a separate build directory (ppc_gcc).  

Thanks,
   Jeff Stevens

--- Dave Korn <[EMAIL PROTECTED]> wrote:

> Dave Korn wrote:
> > Jeff Stevens wrote:
> >> Is there a HowTo out there on how to cross
> compile GCC
> >> to run on another platform?  I have an x86 host
> >> running linux, and an embedded PowerPC 440SP
> target
> >> running linux.  I would like to compile GCC to
> run on
> >> the target but am having some difficulties.  I
> have
> >> compiled the cross compiler fine, but when I try
> to
> >> compile a native compiler, it acts just like the
> cross
> >> compiler (runs on the host and not the target). 
> All I
> > 
> >   *All* compilers "run on the host"; the term
> "host" is defined as "the
> > machine on which the compiler runs".  The target
> is the machine on which
> > the _generated_ code runs.  So for a native
> compiler, host==target, and
> > for a cross-compiler, host!=target.
> 
>   Doh.  I misread this; I see now that what you mean
> is you wanted a native
> compiler on the target.  
> 
> >> did was re-run gcc configure and "make all
> install".
> >> Here is the configuration I ran:
> >> 
> >> ../../source/gcc-3.4.4/configure
> >> --target=powerpc-linux --host=powerpc-linux
> >> --prefix=/opt/luan2/toolchain/bin --enable-shared
> >> --enable-threads --enable-languages=c
> 
>   So, this should have worked.  Did you perhaps
> re-build in the same directory
> that you had already configured the cross-compiler
> in without first running
> "make clean" perhaps?  Was the powerpc-linux cross
> compiler placed in your
> $PATH setting, so that configure could find the
> powerpc-linux-gcc executable?
> 
>   [ This is OT for this list really; we really
> should take it to crossgcc ]
> 
> 
> cheers,
>   DaveK
> -- 
> Can't think of a witty .sigline today
> 
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


Re: Howto Cross Compile GCC to run on PPC Platform

2005-11-03 Thread Jeff Stevens
I am using the AMCC 440SP processor.  I went and
bought "Building Embedded Linux Systems" by Karim
Yaghmour.  It seems to be a pretty complete book, and
I have gotten the cross-compiler completely installed,
but it doesn't get into installing a native compiler. 
However, I tried cross compiling gcc by first running
this configure line:

../gcc-3.4.4/configure
--build=`../gcc-3.4.4/config.guess`
--target=powerpc-linux --host=powerpc-linux
--prefix=${PREFIX} --enable-languages=c

and then a make all.  The make went fine, and
completed without any errors.  However, when I ran
'make install' I got the following error:

powerpc-linux-gcc: installation problem, cannot exec
`/opt/recorder/tools/libexec/gcc/powerpc-linux/3.4.4/collect2':
Exec format error
make[2]: *** [nof/libgcc_s_nof.so] Error 1
make[2]: Leaving directory
`/opt/recorder/build-tools/build-native-gcc/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory
`/opt/recorder/build-tools/build-native-gcc/gcc'
make: *** [install-gcc] Error 2

How do I install the native compiler?

Thanks,
   Jeff Stevens

--- Clemens Koller <[EMAIL PROTECTED]> wrote:

> Hello, Jeff!
> 
> >I am trying to compile GCC on an x86 platform
> to
> > run natively on an embedded PPC platform.
> 
> What CPU do you use?
> I am currently working on an mpc8540 natively (from
> harddisk).
> And have a current toolchain up and running.
> I can recommend the latest Linux-From-Scratch
> documentation
> to get an idea of what to do.
> 
> >  I am able
> > to compile gcc as a cross compiler (to run on
> x86),
> > but can't seem to get it to cross compile gcc (to
> run
> > on ppc).  Does anyone know of a good HowTo to do
> this?
> >  I'm currently downloading the source distro of
> ELDK,
> > so if it's already in there I'll find it, but if
> there
> > is one elsewhere online please let me know.
> 
> I've started with the ELDK 3.1 too. And updated it
> step by step to the latest versions.
> 
> Greets,
> 
> Clemens Koller
> ___
> R&D Imaging Devices
> Anagramm GmbH
> Rupert-Mayer-Str. 45/1
> 81379 Muenchen
> Germany
> 
> http://www.anagramm.de
> Phone: +49-89-741518-50
> Fax: +49-89-741518-19
> 





__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs


Re: Howto Cross Compile GCC to run on PPC Platform

2005-11-03 Thread Jeff Stevens
I am creating the target tree on my host, so that I
can later transfer it to a USB storage device.  I was
going to manually move everything, but only saw one
binary, xgcc.  Is that all, or aren't there some other
utilities that go along with it?  I just didn't know
exactly what to copy and where to copy it to.  When I
built glibc, those were built for the target system,
but installed to the target directory structure that I
am creating.

The 'make install' command that I ran for glibc was:

make install_root=${TARGET_PREFIX} prefix="" install

where TARGET_PREFIX is the target filesystem tree.  I
used the same make install command for the native gcc
that I compiled.

Thanks,
   Jeff Stevens

--- Kai Ruottu <[EMAIL PROTECTED]> wrote:

> Jeff Stevens wrote:
> 
> > .../gcc-3.4.4/configure
> > --build=`../gcc-3.4.4/config.guess`
> > --target=powerpc-linux --host=powerpc-linux
> > --prefix=${PREFIX} --enable-languages=c
> > 
> > and then a make all.  The make went fine, and
> > completed without any errors.  However, when I ran
> > 'make install' I got the following error:
> > 
> > powerpc-linux-gcc: installation problem, cannot
> exec
> >
>
`/opt/recorder/tools/libexec/gcc/powerpc-linux/3.4.4/collect2':
> > Exec format error
> > 
> > How do I install the native compiler?
> 
> You shouldn't ask how but where !
> 
> You cannot install alien binaries into
> the native places on your host !  This
> is not sane at all...
> 
> Ok, one solution is to collect the components
> from the produced stuff, pack them into a
> '.tar.gz' or something and then ftp or something
> the stuff into the native system.
> 
> If you really want to install the stuff into your
> host, you should know the answer to the "where"
> first, and should read from the "GCC Install"
> manual the chapter 7, "Final installation" and
> see what option to 'make' you should use in order
> to get the stuff into your chosen "where"...
> 




__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com