• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Example config.mk
2#
3# Copyright (c) 2018-2019, Arm Limited.
4# SPDX-License-Identifier: MIT
5
6# Subprojects to build
7SUBS = math string
8
9HOST_CC = gcc
10HOST_CFLAGS = -std=c99 -O2
11HOST_CFLAGS += -Wall -Wno-unused-function
12
13CC = $(CROSS_COMPILE)gcc
14CFLAGS = -std=c99 -pipe -O3
15CFLAGS += -Wall -Wno-missing-braces
16CFLAGS += -Werror=implicit-function-declaration
17
18# Enable debug info.
19HOST_CFLAGS += -g
20CFLAGS += -g
21
22# Optimize the shared libraries on aarch64 assuming they fit in 1M.
23#CFLAGS_SHARED = -fPIC -mcmodel=tiny
24
25# Use for cross compilation with gcc.
26#CROSS_COMPILE = aarch64-none-linux-gnu-
27
28# Use with cross testing.
29#EMULATOR = qemu-aarch64-static
30#EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' --
31
32# Additional flags for subprojects.
33math-cflags =
34math-ldlibs =
35math-ulpflags =
36math-testflags =
37string-cflags =
38
39# Use if mpfr is available on the target for ulp error checking.
40#math-ldlibs += -lmpfr -lgmp
41#math-cflags += -DUSE_MPFR
42
43# Use with gcc.
44math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector
45math-cflags += -ffp-contract=fast -fno-math-errno
46
47# Use with clang.
48#math-cflags += -ffp-contract=fast
49
50# Disable vector math code
51#math-cflags += -DWANT_VMATH=0
52
53# Disable fenv checks
54#math-ulpflags = -q -f
55#math-testflags = -nostatus
56