Re: Cross-compile Applications for 860 on x86

2 messages, 2 authors, 2000-01-13 · open the first message on its own page

Re: Cross-compile Applications for 860 on x86

From: dony <hidden>
Date: 2000-01-13 07:10:03



Brendan J Simon wrote:
dony wrote:
quoted
      I want to cross-compile a very simple test program which have only one line:

             printf("jsut a test.");
I used puts("Brendan was here") as it is much simpler, but printf should work as well.
quoted
 But  the powerpc-linux-gcc seems to complain I lack of "crt1.o".
So what other tools I need to cross-compile my application except the powerpc-linux-*?
Thanks  very much.
dony
I have crt1.o, crti.o and crtn.o in $prefix/$target/lib.  Initially they were put there
when I unpacked the rpm files from the yellowdog distribution.  I was following some
instructions from Kai Ruottu when I was trying to get my cross-compiler built.  I think
I built glibc libraries from the source afterwards which should have replaced those ones
but I'm not sure.
Have you built glibc yet ?
Yes but failed. I following the following steps:

##################################
Cross Development for Linux/PPC

LibC
Get
ftp://sourceware.cygnus.com/pub/glibc/glibc-2.1.tar.gz
ftp://sourceware.cygnus.com/pub/glibc/glibc-linuxthreads-2.1.tar.gz
ftp://ftp.funet.fi/pub/gnu/funet/glibc-crypt-2.1.tar.gz
Build
ln -sf $CVS_LINUX_TOP/include/asm /usr/local/powerpc-linux/include/asm
ln -sf $CVS_LINUX_TOP/include/linux /usr/local/powerpc-linux/include/linux
tar zxf glibc-2.1.tar.gz
cd glibc-2.1
tar zxf ../glibc-crypt-2.1.tar.gz
tar zxf ../glibc-linuxthreads-2.1.tar.gz
mkdir build
cd build
CC=powerpc-linux-gcc AR=powerpc-linux-ar RANLIB=powerpc-linux-ranlib ../configure
--host=powerpc-linux --with-headers=$CVS_LINUX_TOP/include
--enable-add-ons=crypt,linuxthreads --prefix=/usr/local/powerpc-linux
make
make install
############################################

All except the last step are right. When I do "make install" , I get the following error:

########################################
../sysdeps/unix/sysv/linux/i386/profil-counter.h: In function `profil_counter':
In file included from ../sysdeps/unix/sysv/linux/powerpc/profil-counter.h:2,
                 from ../sysdeps/posix/profil.c:54,
                 from ../sysdeps/unix/sysv/linux/profil.c:3:
../sysdeps/unix/sysv/linux/i386/profil-counter.h:26: structure has no member named `regs'
../sysdeps/posix/profil.c:39: warning: inlining failed in call to `profil_count'
../sysdeps/unix/sysv/linux/i386/profil-counter.h:26: warning: called from here
make[2]: *** [/usr/local/powerpc-linux/glibc-2.1/build/gmon/profil.o] Error 1
make[2]: Leaving directory `/usr/local/powerpc-linux/glibc-2.1/gmon'
make[1]: *** [gmon/subdir_lib] Error 2
make[1]: Leaving directory `/usr/local/powerpc-linux/glibc-2.1'
make: *** [install] Error 2
################################

Since the glibc package is very very large, locating the file where errors occur (ie, where
struct singcontext is defined?) is a bit difficult.
Do you have any experience?

dony


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: Cross-compile Applications for 860 on x86

From: Brendan J Simon <hidden>
Date: 2000-01-13 22:09:33

dony wrote:
##################################
Cross Development for Linux/PPC

LibC
Get
ftp://sourceware.cygnus.com/pub/glibc/glibc-2.1.tar.gz
ftp://sourceware.cygnus.com/pub/glibc/glibc-linuxthreads-2.1.tar.gz
ftp://ftp.funet.fi/pub/gnu/funet/glibc-crypt-2.1.tar.gz
Build
ln -sf $CVS_LINUX_TOP/include/asm /usr/local/powerpc-linux/include/asm
ln -sf $CVS_LINUX_TOP/include/linux /usr/local/powerpc-linux/include/linux
tar zxf glibc-2.1.tar.gz
cd glibc-2.1
tar zxf ../glibc-crypt-2.1.tar.gz
tar zxf ../glibc-linuxthreads-2.1.tar.gz
mkdir build
cd build
CC=powerpc-linux-gcc AR=powerpc-linux-ar RANLIB=powerpc-linux-ranlib ../configure
--host=powerpc-linux --with-headers=$CVS_LINUX_TOP/include
--enable-add-ons=crypt,linuxthreads --prefix=/usr/local/powerpc-linux
make
make install
############################################

All except the last step are right. When I do "make install" , I get the following error:

########################################
../sysdeps/unix/sysv/linux/i386/profil-counter.h: In function `profil_counter':
In file included from ../sysdeps/unix/sysv/linux/powerpc/profil-counter.h:2,
                 from ../sysdeps/posix/profil.c:54,
                 from ../sysdeps/unix/sysv/linux/profil.c:3:
../sysdeps/unix/sysv/linux/i386/profil-counter.h:26: structure has no member named `regs'
../sysdeps/posix/profil.c:39: warning: inlining failed in call to `profil_count'
../sysdeps/unix/sysv/linux/i386/profil-counter.h:26: warning: called from here
make[2]: *** [/usr/local/powerpc-linux/glibc-2.1/build/gmon/profil.o] Error 1
make[2]: Leaving directory `/usr/local/powerpc-linux/glibc-2.1/gmon'
make[1]: *** [gmon/subdir_lib] Error 2
make[1]: Leaving directory `/usr/local/powerpc-linux/glibc-2.1'
make: *** [install] Error 2
################################

Since the glibc package is very very large, locating the file where errors occur (ie, where
struct singcontext is defined?) is a bit difficult.
Do you have any experience?
I do not have the solution to your installation problem but I would just like to make a
suggestion for CC= when configuring for your mpc860 target.  Try CC="powerpc-linux-gcc
-mcpu=860" if the 860 is not your default processor when invoking gcc.  I think you can do
this at the configuration stage when building your cross-compiler or you can manually change
the specs file.

Brendan Simon.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help