OESF Portables Forum

General Forums => General Discussion => Topic started by: summer00 on June 16, 2004, 04:12:46 am

Title: cross compile PATH problem
Post by: summer00 on June 16, 2004, 04:12:46 am
1)
i have the cross-compile toolchain in /usr/local/tools/linux/arm/gcc-3.2.2/arm-linux/bin/gcc , now what i want to do is to compile a program with configure script, how do i set the path so that the computer will use the arm gcc(in the path i\'ve just mentioned) instead of the normal gcc ?

2)
is this the command to compile ?
./configure --host=arm-linux

thanks a lot
Title: cross compile PATH problem
Post by: lardman on June 16, 2004, 06:20:18 am
source dev-arm-OZ.sh
./configure --host=arm-linux

For my toolchain this is what I use in my dev-arm-OZ.sh script, adapt to suit your needs:

=======================================
#!/bin/bash

CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
G77=arm-linux-g77
F77=arm-linux-g77

PATH=/usr/local/arm/3.3.2/bin:/usr/local/arm/3.3.2/arm-linux/bin:$PATH

PS1=\'!OZ-dev-armu@h:w$ \'

export PATH CC CXX CCX CXXX COMPILER LINKER G77 F77
echo \"Altered environment for OZ 3.3.2 Development\"
========================================
Title: cross compile PATH problem
Post by: summer00 on June 16, 2004, 09:48:18 pm
Quote
source dev-arm-OZ.sh
./configure --host=arm-linux

For my toolchain this is what I use in my dev-arm-OZ.sh script, adapt to suit your needs:

=======================================
#!/bin/bash

CC=arm-linux-gcc
CXX=arm-linux-g++
CCX=arm-linux-gcc
CXXX=arm-linux-g++
COMPILER=arm-linux-gcc
LINKER=arm-linux-g++
G77=arm-linux-g77
F77=arm-linux-g77

PATH=/usr/local/arm/3.3.2/bin:/usr/local/arm/3.3.2/arm-linux/bin:$PATH

PS1=\'!OZ-dev-armu@h:w$ \'

export PATH CC CXX CCX CXXX COMPILER LINKER G77 F77
echo \"Altered environment for OZ 3.3.2 Development\"
========================================



what is the PS1 for ? thanks
Title: cross compile PATH problem
Post by: lardman on June 17, 2004, 06:21:34 am
It changes the command prompt, it\'s not necessary (for everything to work) but it serves as a reminder that the particular terminal has this stuff sourced.


Si