Author Topic: cross compile PATH problem  (Read 2002 times)

summer00

  • Newbie
  • *
  • Posts: 42
    • View Profile
cross compile PATH problem
« 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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
cross compile PATH problem
« Reply #1 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\"
========================================
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva

summer00

  • Newbie
  • *
  • Posts: 42
    • View Profile
cross compile PATH problem
« Reply #2 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

lardman

  • Hero Member
  • *****
  • Posts: 4512
    • View Profile
    • http://people.bath.ac.uk/enpsgp/Zaurus/
cross compile PATH problem
« Reply #3 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
C750 OZ3.5.4 (GPE, 2.6.x kernel)
SL5500 OZ3.5.4 (Opie)
Nokia 770
Serial GPS, WCF-12, Socket Ethernet & BT, Ratoc USB
WinXP, Mandriva