| 1 | # ========================================================================== |
| 2 | # Build system |
| 3 | # ========================================================================== |
| 4 | |
| 5 | # Allow i486 insns (basically, bswap insn) |
| 6 | # Do not try to tune for 486+ (might add padding) |
| 7 | CFLAGS += $(call cc-option,-march=i486 -mtune=i386,) |
| 8 | |
| 9 | ifeq ($(CONFIG_STACK_OPTIMIZATION_386),y) |
| 10 | # -mpreferred-stack-boundary=2 is essential in preventing gcc 4.2.x |
| 11 | # from aligning stack to 16 bytes. (Which is gcc's way of supporting SSE). |
| 12 | CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2,) |
| 13 | endif |
| 14 | |
| 15 | # "Control how GCC aligns variables. |
| 16 | # Supported values for type are compat uses increased alignment value |
| 17 | # compatible uses GCC 4.8 and earlier, abi uses alignment value as specified by the psABI, |
| 18 | # and cacheline uses increased alignment value to match the cache line size. |
| 19 | # compat is the default." |
| 20 | # "abi" seems to be somewhat successful in preventing oversealous data alignment. |
| 21 | CFLAGS += $(call cc-option,-malign-data=abi,) |