Results 1 to 3 of 3

Thread: Processor specific gcc

  1. #1
    Join Date
    Mar 2005
    Location
    Israel
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Processor specific gcc

    I need to compile a kernel for uClinux with processor specific version of gcc.

    I have a few dumb questions:
    • When I make the specific gcc, will it interfere with the one I have installed in the system?
    • How do I choose the correct gcc for specific compile job?
    Linux, because no Steve will tell you what to do!

  2. #2
    Join Date
    Dec 2006
    Location
    Uk
    Beans
    109

    Re: Processor specific gcc

    When I make the specific gcc, will it interfere with the one I have installed in the system?

    No, the tools should have a "standardised" prefix that depends on the target architecture.

    For example a m68k gcc for elf would be named
    m68k-elf-gcc
    and for arm
    arm-elf-gcc

    If buiding from source you can always install the toolchain somewhere in your home directory so the system directories are not touched at all.

    How do I choose the correct gcc for specific compile job?

    Software intended for embedded applications should have a build system that takes care of this for you. Typically there is some method to choose the target architecture, I'd guess the uClinux has documentation on how to use their build system.

  3. #3
    Join Date
    Mar 2005
    Location
    Israel
    Beans
    99
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Processor specific gcc

    Thanks winch!

    However, as far as I remember there is such command as "export" that should specify what compiler to use. I remember using it when I had to add drivers to the kernel, and it was compiled with an earlier version of gcc than the most recent version that was installed in my system.

    Should I use something like this?
    Code:
    export CC=/usr/bin/gcc-3.4
    Linux, because no Steve will tell you what to do!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •