69 lines · plain
1# Example config.mk2#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-exception6 7# Subprojects to build8SUBS = math string networking9 10# Target architecture: aarch64, arm or x86_6411ARCH = aarch6412 13# Compiler for the target14CC = $(CROSS_COMPILE)gcc15CFLAGS = -std=c99 -pipe -O316CFLAGS += -Wall -Wno-missing-braces17CFLAGS += -Werror=implicit-function-declaration18 19# Used for test case generator that is executed on the host20HOST_CC = gcc21HOST_CFLAGS = -std=c99 -O222HOST_CFLAGS += -Wall -Wno-unused-function23 24# Enable debug info.25HOST_CFLAGS += -g26CFLAGS += -g27 28# Optimize the shared libraries on aarch64 assuming they fit in 1M.29#CFLAGS_SHARED = -fPIC -mcmodel=tiny30 31# Use for cross compilation with gcc.32#CROSS_COMPILE = aarch64-none-linux-gnu-33 34# Use with cross testing.35#EMULATOR = qemu-aarch64-static36#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 -lgmp48#math-cflags += -DUSE_MPFR49 50# Use with gcc.51math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector52math-cflags += -ffp-contract=fast -fno-math-errno53 54# Use with clang.55#math-cflags += -ffp-contract=fast56 57# Disable vector math code58#math-cflags += -DWANT_VMATH=059 60# Disable fenv checks61#math-ulpflags = -q -f62#math-testflags = -nostatus63 64# Enable assertion checks.65#networking-cflags += -DWANT_ASSERT66 67# Avoid auto-vectorization of scalar code and unroll loops68networking-cflags += -O2 -fno-tree-vectorize -funroll-loops69