NSLU2-Linux
view · edit · print · history

HowTo.SetupANativeCompiler History

Hide minor edits - Show changes to markup

September 15, 2006, at 03:31 PM by eberhardmagooglemailcom -- Wrong OpenSlug version given...
Changed lines 22-23 from:

Small problem on OpenSlug 3.4

to:

Small problem on OpenSlug 3.10-beta

September 15, 2006, at 03:28 PM by eberhardmagooglemailcom -- Extra package needed on 3.4, crt1.o was missing
Added lines 21-26:

Small problem on OpenSlug 3.4

Compiling would work, but linking fails with an error of not finding crt1.o. It turns out, that libc6-dev wasn't installed. I would have assumed this is part of the dependencies of slugos-native, but it wasn't in my case.

I had to install libc6-dev in addition, then it worked like a charm.

February 12, 2006, at 04:21 PM by eFfeM --
Added line 15:
  1. rm /usr/bin/gcc (this is a symlink to armeb-linux-gcc)
February 05, 2006, at 05:02 PM by eFfeM --
Changed lines 6-11 from:
  1. if you are on openslug 2.7:
    install the package: openslug-native
    if you are on openslug 3.3 beta or higher:
    install the package: slugos-native
    (This contains the essential build tools)
  2. create a file /usr/bin/gcc containing: /usr/bin/armeb-linux-gcc -mthumb-interwork $*
to:

On OpenSlug 2.7

  1. install the package: openslug-native (This contains the essential build tools)
  2. if /usr/bin/gcc does not exist: create a file /usr/bin/gcc containing: /usr/bin/armeb-linux-gcc $*
Added lines 12-17:

On OpenSlug 3.3 beta or higher

  1. install the package: slugos-native (This contains the essential build tools)
  2. create a file /usr/bin/gcc containing: /usr/bin/armeb-linux-gcc -mthumb-interwork $*
  3. issue the command chmod 555 /usr/bin/gcc
February 05, 2006, at 04:56 PM by eFfeM --
Changed lines 7-9 from:

install the package: openslug-native (Contains the essential build tools)

  1. if you are on openslug 3.3 beta or higher:
    install the package: slugos-native (Contains the essential build tools)
to:

install the package: openslug-native
if you are on openslug 3.3 beta or higher:
install the package: slugos-native
(This contains the essential build tools)

February 05, 2006, at 04:55 PM by eFfeM --
Changed lines 6-9 from:
  1. install the packages: openslug-native (Contains the essential build tools)
to:
  1. if you are on openslug 2.7:
    install the package: openslug-native (Contains the essential build tools)
  2. if you are on openslug 3.3 beta or higher:
    install the package: slugos-native (Contains the essential build tools)
February 05, 2006, at 04:15 PM by repvik -- Changed to openslug-native
Changed line 6 from:
  1. install the packages: gcc, g++, libc6 and libc6-dev
to:
  1. install the packages: openslug-native (Contains the essential build tools)
February 04, 2006, at 09:34 AM by eFfeM -- creation
Added lines 1-11:

How to setup a native C compiler

The information is tested on OpenSlug but will most likely apply for other distro's as well.

In order to have gcc/g++ on your slug (e.g. to compile your own software) you need to do the following:

  1. install the packages: gcc, g++, libc6 and libc6-dev
  2. create a file /usr/bin/gcc containing: /usr/bin/armeb-linux-gcc -mthumb-interwork $*
  3. issue the command chmod 555 /usr/bin/gcc

That's all.
Now go ahead, create helloworld.c and test your work. Enjoy!

view · edit · print · history · Last edited by eberhardmagooglemailcom.
Based on work by eberhardmagooglemailcom, eFfeM, and repvik.
Originally by eFfeM.
Page last modified on September 15, 2006, at 03:31 PM