HowTo EnableThumbAndSoftFloat

  1. How to enable THUMB and soft float when building for maemo
  2. Why THUMB ?
  3. Why softfp ?

How to enable THUMB and soft float when building for maemo

  • When you login into the armel scratchbox, you can setup your environment variable. You could even put it in your .profile file, if you want to have this always set while cross compiling your packages
export DEB_BUILD_OPTIONS=thumb,softfp
  • Next make sure, in your debian/rules you have something similar to
ifneq (,$(findstring thumb,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -mthumb
endif

ifneq (,$(findstring softfp,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -mfloat-abi=softfp
endif
  • Just go ahead and build like normal e.g fakeroot dpkg-buildpackage

Why THUMB ?

On ARM processors supporting THUMB instruction set, you can increase the code density, and thus reduce the size of your binaries (maybe around 20-30%). For more info maybe look at the following links, which describe the thumb mode more * Introduction to ARM thumb * ARM architecture

Why softfp ?

** Hopefully some guru would explain it much better ** * ARM EABI Port, Debian Wiki