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]
Other format: [Raw text]

Canadian Crosscompile - setting AR question


$ cat  ./.bash_profile
. ~/.bashrc
export CVSROOT=:pserver:@anonymous@cvs.sourceforge.net:/cvsroot/lkmpg
export CVSROOT
GCC_HOST="powerpc-linux-gnu"
export GCC_HOST
CC="powerpc-linux-gcc-3.3.2"
export CC
AR="powerpc-linux-ar.exe"
EXPORT AR

$ ls /usr/local/bin
grepjar.exe
powerpc-linux-cpp.exe
powerpc-linux-objcopy.exe
jar.exe                      
powerpc-linux-g++.exe    
powerpc-linux-objdump.exe
ksh.exe                      
powerpc-linux-gcc-3.3.2  
powerpc-linux-ranlib.exe
powerpc-linux-addr2line.exe  
powerpc-linux-gcc.exe    
powerpc-linux-readelf.exe
powerpc-linux-ar.exe         
powerpc-linux-gccbug     
powerpc-linux-size.exe
powerpc-linux-as.exe         
powerpc-linux-gcov.exe   
powerpc-linux-strings.exe
powerpc-linux-c++.exe        
powerpc-linux-ld.exe     
powerpc-linux-strip.exe
powerpc-linux-c++filt.exe    
powerpc-linux-nm.exe

executing crosstool ... 
$ sh -x ./demo.sh
+ set -x
+ TARBALLS_DIR=/cygdrive/d/Profiles/apovolot/downloads
+ export TARBALLS_DIR RESULT_TOP
+ sh demo-ppc860.sh
...
hangs - note that above line doesn't point to the local directory ... ?
so execute manually as shown below:
$ sh ./demo-ppc860.sh
...
...
canadian cross, configuring gcc & binutils with --build=i686-build_pc-cygwin 
powerpc-linux-gcc-3.3.2 (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

: not found
Must set AR to a version of 'ar' targeting powerpc-linux-gnu. PATH is /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/d/software/activetcl/bin:/cygdrive/c/orant/bin:/cygdrive/c/ora8/bin:/cygdrive/c/programfiles/oracle/jre/1.1.7/bin:/cygdrive/c/windows/system32:/cygdrive/c/windows:/cygdrive/c/windows/system32/wbem:/cygdrive/d/software:/cygdrive/c/program files/pc-doctor for windows/services:/cygdrive/z/program files/rksupport:/cygdrive/d/software/cvsnt:/cygdrive/d/software/diskshare/:.:/usr/sbin

So how I should set AR in my case ?

Thanks,
Regards,
Alex
*********************
OK - I already have a gcc cross compiler,  (built outside the crosstool and runnable on cygwin), which is capable of building Linux (2.6) kernel for MPC 82xx on cygwin - this already done by me, so I have this kernel build directory in tact within my cygwin drive. So in this case 
and also taking in the account that the "host" and "target" are the same machine for me, then could the "Canadian Cross build", while using the crosstool for that purpose, be reduced to just one path with the following setting:

 GCC_HOST = powerpc-linux- 

(similar to the notation used, while building the above referenced Linux 2.6 kernel for the MPC 82xx on cygwin)  ?

Besides, would (could) the crosstool set of scripts ("as is" now or in its further/future modification) "benefit" from the data available in the pre-existing Linux kernel build directory (for the same target, of course, as it is the case for me ) ?
**************
Alexander Povolotsky wrote:
>>>I cross-compiled (using cygwin on my Windows XP/Intel laptop) 
>>>the gcc 3.4.1 compiler for PPC 860 using crosstool-0.28-rc36.
>>>Could I expect the resulted/built gcc 3.4.1 compiler to run/function 

>>>?natively? on the PQ2FADS-VR board (with MPC 8275), running Linux
>>>2.6.8-rc4 
>> 
>>Not generally.
> 
> I am slightly confused now.
> In my case the "host" and "target" machine is the same 
- let say it is PPC 860 (though it is really PQ2FADS-VR board with MPC 8275 - 
not sure but do hope they are compatible enough) - so if I tar the: 
> 
> 
/opt/crosstool/powerpc-860-linux-gnu/gcc-3.4.1-glibc-2.3.2/powerpc-860-linux-gnu

> 
> directory, produced by crosstool in my Intel/Windows XP cygwin
> 
> and ftp it to the root file system, mounted by my board during its booting, 
- should I not expect to be able to run this compiler, which will produce executables runnable on this very board itself ?

If you build a compiler the normal way on cygwin, then it will run on cygwin, and nowhere else, regardless of what target it generates code for.

To get a compiler that will run on the target, you have to
compile it with the compiler you built earlier.  This is
sometimes called a Canadian Cross build.  This is documented somewhat at
http://kegel.com/crosstool/crosstool-0.28-rc36/doc/crosstool-howto.html#canadian

- Dan



________________________________________________________________
Get your name as your email address.
Includes spam protection, 1GB storage, no ads and more
Only $1.99/ month - visit http://www.mysite.com/name today!

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


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