osd-contiki/cpu
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
..
6502 Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
arm Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
avr Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
cc26xx-cc13xx Merge pull request #1133 from bkozak-scanimetrics/cc-gcc 2015-12-05 00:39:59 +01:00
cc253x Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
cc2430 Removed CC_FASTCALL. 2015-11-01 18:10:17 +01:00
cc2538 Implement generic Newlib syscalls 2015-12-16 19:50:49 +01:00
mc1322x Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
msp430 Adding definitions required for TSCH to the sky and z1 platforms 2015-12-04 15:21:53 +01:00
native Merge pull request #1293 from simonduq/pr/fix-warnings 2015-11-10 08:49:11 +01:00
pic32 [cpu/pic32] Removed excess end group 2014-11-10 23:53:33 +01:00
rl78 The -pedantic and -stdc flags trigger a few too many warnings 2015-10-20 10:11:35 +02:00
stm32w108 Merge pull request #1344 from tsparber/fix-doxygen 2015-11-30 22:07:15 +01:00
x86 x86: Build release image 2015-12-21 08:06:14 -02:00