New upstream version 18.02
[deb_dpdk.git] / mk / toolchain / icc / rte.vars.mk
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2010-2014 Intel Corporation
3
4 #
5 # toolchain:
6 #
7 #   - define CC, LD, AR, AS, ... (overridden by cmdline value)
8 #   - define TOOLCHAIN_CFLAGS variable (overridden by cmdline value)
9 #   - define TOOLCHAIN_LDFLAGS variable (overridden by cmdline value)
10 #   - define TOOLCHAIN_ASFLAGS variable (overridden by cmdline value)
11 #
12
13 # Warning: we do not use CROSS environment variable as icc is mainly a
14 # x86->x86 compiler
15
16 CC        = icc
17 KERNELCC  = gcc
18 CPP       = cpp
19 AS        = nasm
20 AR        = ar
21 LD        = ld
22 OBJCOPY   = objcopy
23 OBJDUMP   = objdump
24 STRIP     = strip
25 READELF   = readelf
26
27 ifeq ($(KERNELRELEASE),)
28 HOSTCC    = icc
29 else
30 HOSTCC    = gcc
31 endif
32 HOSTAS    = as
33
34 TOOLCHAIN_CFLAGS =
35 TOOLCHAIN_LDFLAGS =
36 TOOLCHAIN_ASFLAGS =
37
38 # Turn off some ICC warnings -
39 #   Remark #271   : trailing comma is nonstandard
40 #   Warning #1478 : function "<func_name>" (declared at line N of "<filename>")
41 #   error #13368: loop was not vectorized with "vector always assert"
42 #   error #15527: loop was not vectorized: function call to fprintf cannot be vectorize
43 #                   was declared "deprecated"
44 #   Warning #11074, 11076: to prevent "inline-max-size" warnings.
45 WERROR_FLAGS := -Wall -w2 -diag-disable 271 -diag-warning 1478
46 WERROR_FLAGS += -diag-disable 13368 -diag-disable 15527
47 WERROR_FLAGS += -diag-disable 188
48 WERROR_FLAGS += -diag-disable 11074 -diag-disable 11076 -Wdeprecated
49
50 ifeq ($(RTE_DEVEL_BUILD),y)
51 WERROR_FLAGS += -Werror-all
52 endif
53
54 # process cpu flags
55 include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
56
57 export CC AS AR LD OBJCOPY OBJDUMP STRIP READELF
58 export TOOLCHAIN_CFLAGS TOOLCHAIN_LDFLAGS TOOLCHAIN_ASFLAGS