blob: 3f179d8fde5c85d7a6eb0550440d042665102540 [file] [log] [blame]
Szabolcs Nagy78892282018-04-24 17:10:05 +01001# Example config.mk
2#
Szabolcs Nagy1fd2aaa2019-11-20 18:05:06 +00003# Copyright (c) 2018-2019, Arm Limited.
Szabolcs Nagy11253b02018-11-12 11:10:57 +00004# SPDX-License-Identifier: MIT
Szabolcs Nagy78892282018-04-24 17:10:05 +01005
Szabolcs Nagy1fd2aaa2019-11-20 18:05:06 +00006# Subprojects to build
7SUBS = math string
8
Szabolcs Nagy1dfd7b82020-02-12 15:10:29 +00009# Target architecture: aarch64, arm or x86_64
10ARCH = aarch64
Szabolcs Nagya2027462018-07-27 11:14:11 +010011
Szabolcs Nagy1dfd7b82020-02-12 15:10:29 +000012# Compiler for the target
Szabolcs Nagy78892282018-04-24 17:10:05 +010013CC = $(CROSS_COMPILE)gcc
14CFLAGS = -std=c99 -pipe -O3
Szabolcs Nagya2027462018-07-27 11:14:11 +010015CFLAGS += -Wall -Wno-missing-braces
Szabolcs Nagy433a3b12019-10-17 12:31:17 +010016CFLAGS += -Werror=implicit-function-declaration
Szabolcs Nagya2027462018-07-27 11:14:11 +010017
Szabolcs Nagy1dfd7b82020-02-12 15:10:29 +000018# Used for test case generator that is executed on the host
19HOST_CC = gcc
20HOST_CFLAGS = -std=c99 -O2
21HOST_CFLAGS += -Wall -Wno-unused-function
22
Szabolcs Nagya2027462018-07-27 11:14:11 +010023# Enable debug info.
24HOST_CFLAGS += -g
25CFLAGS += -g
Szabolcs Nagy78892282018-04-24 17:10:05 +010026
Szabolcs Nagy1e0c8022019-08-06 12:04:27 +010027# Optimize the shared libraries on aarch64 assuming they fit in 1M.
28#CFLAGS_SHARED = -fPIC -mcmodel=tiny
29
Szabolcs Nagy78892282018-04-24 17:10:05 +010030# Use for cross compilation with gcc.
31#CROSS_COMPILE = aarch64-none-linux-gnu-
32
33# Use with cross testing.
34#EMULATOR = qemu-aarch64-static
35#EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' --
Szabolcs Nagy1fd2aaa2019-11-20 18:05:06 +000036
37# Additional flags for subprojects.
38math-cflags =
39math-ldlibs =
40math-ulpflags =
41math-testflags =
42string-cflags =
43
44# Use if mpfr is available on the target for ulp error checking.
45#math-ldlibs += -lmpfr -lgmp
46#math-cflags += -DUSE_MPFR
47
48# Use with gcc.
49math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector
50math-cflags += -ffp-contract=fast -fno-math-errno
51
52# Use with clang.
53#math-cflags += -ffp-contract=fast
54
55# Disable vector math code
56#math-cflags += -DWANT_VMATH=0
57
58# Disable fenv checks
59#math-ulpflags = -q -f
60#math-testflags = -nostatus