1# Example config.mk 2# 3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4# See https://llvm.org/LICENSE.txt for license information. 5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 7# Subprojects to build 8SUBS = math string networking 9 10# Target architecture: aarch64, arm or x86_64 11ARCH = aarch64 12 13# Compiler for the target 14CC = $(CROSS_COMPILE)gcc 15CFLAGS = -std=c99 -pipe -O3 16CFLAGS += -Wall -Wno-missing-braces 17CFLAGS += -Werror=implicit-function-declaration 18 19# Used for test case generator that is executed on the host 20HOST_CC = gcc 21HOST_CFLAGS = -std=c99 -O2 22HOST_CFLAGS += -Wall -Wno-unused-function 23 24# Enable debug info. 25HOST_CFLAGS += -g 26CFLAGS += -g 27 28# Optimize the shared libraries on aarch64 assuming they fit in 1M. 29#CFLAGS_SHARED = -fPIC -mcmodel=tiny 30 31# Use for cross compilation with gcc. 32#CROSS_COMPILE = aarch64-none-linux-gnu- 33 34# Use with cross testing. 35#EMULATOR = qemu-aarch64-static 36#EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' -- 37 38# Additional flags for subprojects. 39math-cflags = 40math-ldlibs = 41math-ulpflags = 42math-testflags = 43string-cflags = 44networking-cflags = 45 46# Use if mpfr is available on the target for ulp error checking. 47#math-ldlibs += -lmpfr -lgmp 48#math-cflags += -DUSE_MPFR 49 50# Use with gcc. 51math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector 52math-cflags += -ffp-contract=fast -fno-math-errno 53 54# Use with clang. 55#math-cflags += -ffp-contract=fast 56 57# Disable vector math code 58#math-cflags += -DWANT_VMATH=0 59 60# Disable fenv checks 61#math-ulpflags = -q -f 62#math-testflags = -nostatus 63 64# Enable assertion checks. 65#networking-cflags += -DWANT_ASSERT 66 67# Avoid auto-vectorization of scalar code and unroll loops 68networking-cflags += -O2 -fno-tree-vectorize -funroll-loops 69