This is the mail archive of the crossgcc@sources.redhat.com 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]

RE: help about cross-compiler



Hi.
I think I haven't made things clear.
I have succeeded in building core-gcc as you described 
in your mail.
And succeeded building newlib.
But failed to build cross-gcc,the last step.
That's what I typed in building cross-gcc:

[prompt$] ./configure --target=m68k-hp-bsd4.3 --prefix=/home/yliu/local
 --with-gnu-as   --with-gnu-ld
[prompt$]  make all install

The error is :

checking whether the C compiler
(/home/yliu/program/forchen/gcc-3.0/gcc/xgcc
 -B/home/yliu/program/forchen/gcc-3.0/gcc/ -B/home/yliu/local/m68k-hp-
bsd4.3/bin/ -B/home/yliu/local/m68k-hp-bsd4.3/lib/ -
isystem /home/yliu/local/m68k-hp-bsd4.3/include -g -O2 )
works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
make: *** [configure-target-libiberty] Error 1

I have looked at the directory /home/yliu/local/m68k-hp-bsd4.3/bin/  ,
/home/yliu/local/m68k-hp-bsd4.3/lib/ and
/home/yliu/local/m68k-hp-bsd4.3/include ,there are files in there:
bin: ar as c++ g++ gcc ld nm ranlib strip
lib: bcc.ld crt0.o idp.ld libgcc.a libdbug.a libidp.a libmvme135.a
libmvme162.a libnosys.a mvme135.ld mvme162.ld
      sbc5204.ld sbc5206.ld and a directory ldscripts that contains
hp300bsd.x hp300bsd.xbn hp300bsd.xn hp300bsd.xr
      hp300bsd.xu
include:  there is no include directory ,just a sys-include directory that
contains a file named COPIED (file length is 3 bytes, just has a 
word 'no')

So what 's wrong with it?
I am so near the success.

DANK SE

Best Regards.
Yong Liu




-----Original Message-----
From: Vermeulen Jan <Jan.Vermeulen@siemens.atea.be>
To: 'Liu Yong' <yliu@newavetech.com>, 'CrossGCC' 
<crossgcc@sources.redhat.com>
Date: Wed, 11 Jul 2001 08:35:30 +0200
Subject: RE: help about cross-compiler

> Hey there
> 
> >   The following is the command that I type :
> >   [prompt$]
> > ./configure --target=m68k-hp-bsd4.3 --prefix=/home/yliu/local
> --with-gnu-as
> >    --with-gnu-ld
> >   [prompt$]  make all install
> >
> >  The error is :
> >
> >checking whether the C compiler
> >(/home/yliu/program/forchen/gcc-3.0/gcc/xgcc
> -B/home/yliu/program/forchen/gc
> >c-3.0/gcc/ -B/home/yliu/local/m68k-hp-bsd4.3/bin/
> -B/home/yliu/local/m68k-hp
> >-bsd4.3/lib/ -isystem /home/yliu/local/m68k-hp-bsd4.3/include -g -O2 )
> >works... no
> >configure: error: installation or configuration problem: C compiler
> cannot
> >create executables.
> >make: *** [configure-target-libiberty] Error 1
> 
> It is good that you add "--with-gnu-as --with-gnu-ld", but this time
> you
> forgot the 
> "--without-headers --with-newlib --enable-languages=c" this time.
> 
> If you don't, then gcc will think you already have libraries and
> headers.
> And those libraries can only be made by a cross-compiler.
> (chicken and egg problem :)
> 
> That's why you make a so-called core-gcc that only compiles c code.
> And with that core-gcc, you make the libraries of newlib.
> After you made the libraries, you can procede with making a full
> cross-compiler with support for c and c++.
> 
> So, to sum it all up:
> - start in a DIFFERENT directory than your gcc-3.0 directory (for
> example
> "core-gcc" which is empty at first)
> - make sure everything you need is in your $PATH (m68k-coff-as,
> m68k-coff-ld, m68k-coff-ar)
> - use the following command from that different directory:
> .../gcc-3.0/configure --target=m68k-coff --prefix=/home/yliu/local
> --enable-languages=c --with-local-prefix=/home/yliu/local/m68k-coff
> --without-headers --with-newlib --disable-shared --with-gnu-as
> --with-gnu-ld
> - Then do the following command:
> ../make all-gcc install-gcc
> 
> 
> Let us know.
> Jan
> 
> 
> 
> >
> > At http://crossgcc.billgatliff.com/ you can find a script that does
> all
> > those things for you...
> > I really suggest you try it, as it will help you a lot.
> >
> > Good luck,
> > I hope you get it working now :)
> > Jan
> >
> >
> > >Then gcc:
> > >cd /my-gcc
> > >/my-gcc/vi configure(change the target(m68k-hp-bsd4.3 and prefix
> director
> > >(I am not administor) )
> > >/my-gcc/ ./configure
> > >/my-gcc/make
> >
> > -----Original Message-----
> > From: Vermeulen Jan <Jan.Vermeulen@siemens.atea.be>
> > To: 'Liu Yong' <yliu@newavetech.com>, 'CrossGCC'
> > <crossgcc@sources.redhat.com>
> > Date: Fri, 6 Jul 2001 14:00:43 +0200
> > Subject: RE: help about cross-compiler
> >
> > > Hello ,
> > >
> > > Can you give me your commandlines please?
> > > & What versions you use (binutils, gcc, linux-dist, ..)
> > >
> > > e.g. for binutils:
> > > [/home/jan/source/binbuild/ $] ../binutils-2.10.1/configure
> > > --target=m68k-hp-bsd4.3 --host=sun-solaris-2.6
> > >
> > > and commands used pre- & post-building your targets.
> > > (like creating symlinks, renaming folders somewhere in the
> source-tree,
> > > etc)
> > >
> > > Best regards,
> > > Jan
> > >
> > >
> > > -----Original Message-----
> > > From: Liu Yong [mailto:yliu@newavetech.com]
> > > Sent: vrijdag 6 juli 2001 8:34
> > > To: Vermeulen Jan
> > > Subject: RE: help about cross-compiler
> > >
> > >
> > >
> > > Thanks for your help.
> > > But I have changed my .cshrc and added it before I build gcc.
> > > I don't know what's wrong .
> > > Maybe I should install glibc? I haven't installed it.
> > >
> > > Any suggestion is welcomed.
> > >
> > > Best Regards.
> > > Liu Yong
> > >
> > > -----Original Message-----
> > > From: Vermeulen Jan <Jan.Vermeulen@siemens.atea.be>
> > > To: 'Liu Yong' <yliu@newavetech.com>, crossgcc@sources.redhat.com
> > > Date: Fri, 6 Jul 2001 07:58:11 +0200
> > > Subject: RE: help about cross-compiler
> > >
> > > > >I want to build the cross-compiler (host : sun-solaris-2.6  
> target
> > > :
> > > > m68k-hp-bsd4.3).
> > > > >I have installed the binutils ,but failed building Gcc ,
> > > > >I tried sereral times .
> > > > >Please help me to find the reason or tell me how to do .
> > > > >Thank you very much!
> > > >
> > > > <lots of errors>
> > > >
> > > > >/var/tmp/ccLd3ZbM.s:75: Error: Unknown opcode: `moveml'
> > > >
> > > > I am not certain this will help, but make sure that your
> > > > m68k-hp-bsd4.3-*
> > > > files are in the path.
> > > > Set your path to
> > > > PATH=$PATH:/<where you installed the binutils>
> > > >
> > > > Then try again.
> > > >
> > > > Greets,
> > > > Jan
> > > >
> > > > ------
> > > > Want more information?  See the CrossGCC FAQ,
> > > > http://www.objsw.com/CrossGCC/
> > > > Want to unsubscribe? Send a note to
> > > > crossgcc-unsubscribe@sourceware.cygnus.com
> > > >
> > >
> >
> >
> 



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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