Szabolcs Nagy | 7889228 | 2018-04-24 17:10:05 +0100 | [diff] [blame] | 1 | # Example config.mk |
| 2 | # |
| 3 | # Copyright (c) 2018, Arm Limited. |
Szabolcs Nagy | 11253b0 | 2018-11-12 11:10:57 +0000 | [diff] [blame^] | 4 | # SPDX-License-Identifier: MIT |
Szabolcs Nagy | 7889228 | 2018-04-24 17:10:05 +0100 | [diff] [blame] | 5 | |
| 6 | HOST_CC = gcc |
Szabolcs Nagy | a202746 | 2018-07-27 11:14:11 +0100 | [diff] [blame] | 7 | HOST_CFLAGS = -std=c99 -O2 |
| 8 | HOST_CFLAGS += -Wall -Wno-unused-function |
| 9 | |
Szabolcs Nagy | 7889228 | 2018-04-24 17:10:05 +0100 | [diff] [blame] | 10 | CC = $(CROSS_COMPILE)gcc |
| 11 | CFLAGS = -std=c99 -pipe -O3 |
Szabolcs Nagy | a202746 | 2018-07-27 11:14:11 +0100 | [diff] [blame] | 12 | CFLAGS += -Wall -Wno-missing-braces |
| 13 | |
| 14 | # Enable debug info. |
| 15 | HOST_CFLAGS += -g |
| 16 | CFLAGS += -g |
Szabolcs Nagy | 7889228 | 2018-04-24 17:10:05 +0100 | [diff] [blame] | 17 | |
| 18 | # Use if the target FPU only supports single precision. |
| 19 | #CFLAGS += WANT_SINGLEPREC |
| 20 | |
| 21 | # Use with gcc. |
| 22 | CFLAGS += -frounding-math -fexcess-precision=standard -fno-stack-protector |
Szabolcs Nagy | 39b0191 | 2018-05-10 15:35:06 +0100 | [diff] [blame] | 23 | CFLAGS += -ffp-contract=fast -fno-math-errno |
Szabolcs Nagy | 7889228 | 2018-04-24 17:10:05 +0100 | [diff] [blame] | 24 | |
| 25 | # Use with clang. |
| 26 | #CFLAGS += -DCLANG_EXCEPTIONS |
| 27 | #CFLAGS += -ffp-contract=fast |
| 28 | |
| 29 | # Use for cross compilation with gcc. |
| 30 | #CROSS_COMPILE = aarch64-none-linux-gnu- |
| 31 | |
| 32 | # Use with cross testing. |
| 33 | #EMULATOR = qemu-aarch64-static |
| 34 | #EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' -- |