Shop OBEX P1 Docs P2 Docs Learn Events
Faster TOOL-CHAIN build. — Parallax Forums

Faster TOOL-CHAIN build.

Martin HodgeMartin Hodge Posts: 1,246
edited 2011-11-14 14:23 in Propeller 1
If you have a multi-core processor in your machine you can significantly reduce the build time of PropGCC by adding the '-j' option to some of the make commands in rebuild.sh.


For example, build times on my quad-core Core i5-2:
With no '-j' option: 10m 46s
With '-j 4': 3m 55s

(I haven't seen any side effects of this option, however it should be vetted by an expert.)

rebuild.zip

-edit-
This works for Linux, not sure about Cygwin.

Comments

  • Ken GraceyKen Gracey Posts: 7,401
    edited 2011-11-11 13:54
    Martin, glad that you are on board with PropGCC. I think it has very good implications for the Propeller ASC.

    Ken Gracey
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2011-11-11 14:19
    I'm not board with it, I think it's very exciting. ;)

    But seriously thanks for the mention. I'm very interested in getting as many hooks as I can into that Italian Juggernaut.
  • jazzedjazzed Posts: 11,803
    edited 2011-11-11 14:59
    Last time I used -j was about 5 years ago. It seems to make a difference even on VirtualBox.
    Thanks for the reminder.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-11-11 15:02
    For the uninformed (i.e. me), why does this matter? IOW, what is a typical build time for a Prop GCC program?

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2011-11-11 15:14
    Phil,

    Building a C program with propeller-elf-gcc is very quick.
    Building the entire Propeller GCC tool-chain takes a while depending on the system.

    Thanks,
    --Steve

    For the uninformed (i.e. me), why does this matter? IOW, what is a typical build time for a Prop GCC program?

    -Phil
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-11-11 15:19
    @Phil, when it comes to building the toolchain, I sit on the sidelines and cheer on the A-team. I like having someone point me to a built package ready for me to install. We're tool users, not tool makers! :smile:

    @A-team: Go team, go!! Build those packages!!!! :lol:
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-11-11 15:23
    jazzed wrote:
    Building a C program with propeller-elf-gcc is very quick. Building the entire Propeller GCC tool-chain takes a while depending on the system.

    Ah, got it. Thanks!

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2011-11-13 14:03
    If you have a multi-core processor in your machine you can significantly reduce the build time of PropGCC by adding the '-j' option to some of the make commands in rebuild.sh.
    ...

    Martin, I've added "jbuild.sh" to the repository.

    Usage: ./jbuild.sh N [rm]
    N is the number of jobs.
    Optional rm says remove the build directory first.

    This works fine on Debian Linux. YMMV on other platforms.

    I made the number of jobs a parameter because some machines have 6+ cores in addition to the extra multimedia co-processors.
  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2011-11-13 22:05
    Hey, cool. Just noticed the new build script on the latest pull. Tested and works on Fedora 16.

    You can also get fancy and do JOBS="-j "`cat /proc/cpuinfo | grep processor | wc -l`
    That should work for one or more cores automatically.
  • jazzedjazzed Posts: 11,803
    edited 2011-11-14 14:23
    Hey, cool. Just noticed the new build script on the latest pull. Tested and works on Fedora 16.

    You can also get fancy and do JOBS="-j "`cat /proc/cpuinfo | grep processor | wc -l`
    That should work for one or more cores automatically.

    Nice tip Martin. Been a while since I looked at /proc.

    We can use: ./jbuild.sh `cat /proc/cpuinfo | grep processor | wc -l`.

    I use Debian on VirtualBox. It doesn't have processor in cpuinfo.
    VirtualBox Debian still gets a big speedup if I use ./jbuild.sh 4
Sign In or Register to comment.