From SDCC wiki
Jump to: navigation, search

Installing SDCC

As of OpenBSD 6.0 (released 2016), SDCC 2.8.0 (released 2008) is included in the OpenBSD packages.

To use current SDCC on OpenBSD it will have to be built from source:

  • Get the source of the desired SDCC version, e.g. download and unpack a release tarball or checkout from svn.
  • Configure via
CXXFLAGS=-I/usr/local/include ./configure --disable-pic14-port --disable-pic16-port

This will complain about any missing dependencies. If that happens, install the dependency, and try configure again. The CXXFLAGS is necessary to find the boost headers, since /usr/local/include is not in the default include path for OpenBSD. The dependencies of the pic ports are hard to satisfy on OpenBSD; the easiest way aroaund is to just disable building of those ports.

  • Build via
MAKE=gmake gmake

gmake is not part of the default install and might have to be installed first. We need it since SDCC won't build with the OpenBSD make.

Using SDCC

SDCC uses more stack space than typical applications, and OpenBSD has a lower stack size limit than typical operating systems. The limit can be increased e.g. via

ulimit -s 32768
Personal tools