[clang] Avoid linking libdl unless needed
[llvm-project.git] / libc / AOR_v20.02 / config.mk.dist
blob240d4b6f4b4c26eba0a2fc8266f556de5cbddb0a
1 # Example config.mk
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
7 # Subprojects to build
8 SUBS = math string networking
10 # Target architecture: aarch64, arm or x86_64
11 ARCH = aarch64
13 # Compiler for the target
14 CC = $(CROSS_COMPILE)gcc
15 CFLAGS = -std=c99 -pipe -O3
16 CFLAGS += -Wall -Wno-missing-braces
17 CFLAGS += -Werror=implicit-function-declaration
19 # Used for test case generator that is executed on the host
20 HOST_CC = gcc
21 HOST_CFLAGS = -std=c99 -O2
22 HOST_CFLAGS += -Wall -Wno-unused-function
24 # Enable debug info.
25 HOST_CFLAGS += -g
26 CFLAGS += -g
28 # Optimize the shared libraries on aarch64 assuming they fit in 1M.
29 #CFLAGS_SHARED = -fPIC -mcmodel=tiny
31 # Use for cross compilation with gcc.
32 #CROSS_COMPILE = aarch64-none-linux-gnu-
34 # Use with cross testing.
35 #EMULATOR = qemu-aarch64-static
36 #EMULATOR = sh -c 'scp $$1 user@host:/dir && ssh user@host /dir/"$$@"' --
38 # Additional flags for subprojects.
39 math-cflags =
40 math-ldlibs =
41 math-ulpflags =
42 math-testflags =
43 string-cflags =
44 networking-cflags =
46 # Use if mpfr is available on the target for ulp error checking.
47 #math-ldlibs += -lmpfr -lgmp
48 #math-cflags += -DUSE_MPFR
50 # Use with gcc.
51 math-cflags += -frounding-math -fexcess-precision=standard -fno-stack-protector
52 math-cflags += -ffp-contract=fast -fno-math-errno
54 # Use with clang.
55 #math-cflags += -ffp-contract=fast
57 # Disable vector math code
58 #math-cflags += -DWANT_VMATH=0
60 # Disable fenv checks
61 #math-ulpflags = -q -f
62 #math-testflags = -nostatus
64 # Enable assertion checks.
65 #networking-cflags += -DWANT_ASSERT
67 # Avoid auto-vectorization of scalar code and unroll loops
68 networking-cflags += -O2 -fno-tree-vectorize -funroll-loops