Set +x on debian/rules
[deb_dpdk.git] / debian / patches / nicvf-0007-net-thunderx-disable-PMD-for-old-compilers.patch
1 From 0b9ce550c4f60a69da558da6044e1b394256b43c Mon Sep 17 00:00:00 2001
2 From: Ferruh Yigit <ferruh.yigit@intel.com>
3 Date: Thu, 6 Apr 2017 18:05:09 +0100
4 Subject: [PATCH] net/thunderx: disable PMD for old compilers
5
6 Disable for gcc < 4.7 and icc <= 14.0
7
8 PMD uses some compiler builtins and new compiler options. Tested with
9 gcc 4.5.1 and following were not supported:
10
11 option:
12 -Ofast
13
14 macros:
15 _Static_assert
16
17 __ORDER_LITTLE_ENDIAN__
18 __ORDER_BIG_ENDIAN__
19 __BYTE_ORDER__
20
21 __atomic_fetch_add
22 __ATOMIC_ACQUIRE
23 __atomic_load_n
24 __ATOMIC_RELAXED
25 __atomic_store_n
26 __ATOMIC_RELEASE
27
28 It is not easy to fix all in PMD, disabling PMD for older compilers.
29
30 Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
31 ---
32  drivers/net/Makefile                     | 5 +++++
33  mk/toolchain/gcc/rte.toolchain-compat.mk | 5 +++++
34  mk/toolchain/icc/rte.toolchain-compat.mk | 5 +++++
35  3 files changed, 15 insertions(+)
36
37 Origin: http://dpdk.org/browse/dpdk/commit/?id=0b9ce550c4f60a69da558da6044e1b394256b43c
38 Original-Author: Ferruh Yigit <ferruh.yigit@intel.com>
39 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1691659
40 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
41 Last-Update: 2017-05-18
42
43 --- a/drivers/net/Makefile
44 +++ b/drivers/net/Makefile
45 @@ -31,6 +31,11 @@
46  
47  include $(RTE_SDK)/mk/rte.vars.mk
48  
49 +# set in mk/toolchain/xxx/rte.toolchain-compat.mk
50 +ifeq ($(CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD),d)
51 +        $(warning thunderx pmd is not supported by old compilers)
52 +endif
53 +
54  DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet
55  DIRS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += bnx2x
56  DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding
57 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk
58 +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
59 @@ -89,4 +89,9 @@
60         ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1)
61                 MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
62         endif
63 +
64 +       # Disable thunderx PMD for gcc < 4.7
65 +       ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1)
66 +               CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
67 +       endif
68  endif
69 --- a/mk/toolchain/icc/rte.toolchain-compat.mk
70 +++ b/mk/toolchain/icc/rte.toolchain-compat.mk
71 @@ -72,4 +72,9 @@
72                 # remove march options
73                 MACHINE_CFLAGS := $(patsubst -march=%,-xSSE3,$(MACHINE_CFLAGS))
74         endif
75 +
76 +       # Disable thunderx PMD for icc <= 14.0
77 +       ifeq ($(shell test $(ICC_MAJOR_VERSION) -le 14 && echo 1), 1)
78 +               CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d
79 +       endif
80  endif