osd-contiki/cpu/x86
Andre Guedes c9020d95e7 x86: Build release image
This patch adds support for building release images. The main difference
between release images and default images is that the former is optimized
for size while the latter is "optimized" for debugging. To build a release
image, the BUILD_RELEASE variable should be set to 1. For instance, the
following command build a release image from the hello-world application:
$ cd examples/hello-world && make TARGET=galileo BUILD_RELEASE=1

To optimize for size we use the '-Os' option from gcc. This option also
enables the strict aliasing optimization. This generates lots of warning
messages since we use the '-Wall' option and lots of code in core/net/
break the strict-aliasing rules. Some test have shown that the strict
aliasing optimization it not taking effect in the final binary. For that
reasons, this patch manually disables the optimization. Also, the release
image is stripped.

For the sake of comparison, below follows the output from 'wc' and 'size'
for both debugging (default) and release images.

Default image:
$  wc -c hello-world.galileo
71112 hello-world.galileo
$ size hello-world.galileo
   text    data     bss     dec     hex filename
  20379    1188   12808   34375    8647 hello-world.galileo

Release image:
$ wc -c hello-world.galileo
26320 hello-world.galileo
$ size hello-world.galileo
   text    data     bss     dec     hex filename
  18146    1156   12808   32110    7d6e hello-world.galileo
2015-12-21 08:06:14 -02:00
..
drivers x86: Add Intel Quark X1000 UART support. 2015-12-21 08:06:14 -02:00
init x86: Refactor GDT initialization code 2015-12-21 08:06:14 -02:00
bootstrap_quarkX1000.S x86: Move bootstrap code and linker script to cpu/x86 2015-12-21 08:06:14 -02:00
helpers.h x86: Add PCI support 2015-12-21 08:06:14 -02:00
helpers.S x86: Add PCI support 2015-12-21 08:06:14 -02:00
Makefile.x86_common x86: Build release image 2015-12-21 08:06:14 -02:00
Makefile.x86_quarkX1000 x86: Add Intel Quark X1000 UART support. 2015-12-21 08:06:14 -02:00
quarkX1000.ld x86: Don't generate .note.gnu.build-id section 2015-12-21 08:06:14 -02:00