blob: 7cf7393395d05150627782407726f53984921870 [file] [log] [blame]
Szabolcs Nagy78892282018-04-24 17:10:05 +01001# Example config.mk
2#
3# Copyright (c) 2018, Arm Limited.
Szabolcs Nagy11253b02018-11-12 11:10:57 +00004# SPDX-License-Identifier: MIT
Szabolcs Nagy78892282018-04-24 17:10:05 +01005
6HOST_CC = gcc
Szabolcs Nagya2027462018-07-27 11:14:11 +01007HOST_CFLAGS = -std=c99 -O2
8HOST_CFLAGS += -Wall -Wno-unused-function
9
Szabolcs Nagy78892282018-04-24 17:10:05 +010010CC = $(CROSS_COMPILE)gcc
11CFLAGS = -std=c99 -pipe -O3
Szabolcs Nagya2027462018-07-27 11:14:11 +010012CFLAGS += -Wall -Wno-missing-braces
13
14# Enable debug info.
15HOST_CFLAGS += -g
16CFLAGS += -g
Szabolcs Nagy78892282018-04-24 17:10:05 +010017
18# Use if the target FPU only supports single precision.
19#CFLAGS += WANT_SINGLEPREC
20
21# Use with gcc.
22CFLAGS += -frounding-math -fexcess-precision=standard -fno-stack-protector
Szabolcs Nagy39b01912018-05-10 15:35:06 +010023CFLAGS += -ffp-contract=fast -fno-math-errno
Szabolcs Nagy78892282018-04-24 17:10:05 +010024
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/"$$@"' --