summaryrefslogtreecommitdiffstats
path: root/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
diff options
context:
space:
mode:
authorGeorge Nita <george.nita@enea.com>2015-10-24 05:11:58 +0200
committerGeorge Nita <george.nita@enea.com>2015-10-24 05:11:58 +0200
commit57c61fd48b417e790b2e65f359f2de370eb42310 (patch)
tree6e2f399caf5701874b2f66aa5ecf689ee9adf7f2 /meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
parent385b6e75f1fe9c39c87ff179e6af8be4e80aa65f (diff)
parent9bdc2090ca821c6b43ec4e69ee9ac6a34dd35ca3 (diff)
downloadmeta-intel-57c61fd48b417e790b2e65f359f2de370eb42310.tar.gz
Merge remote-tracking branch 'origin/master' into master-enea
Diffstat (limited to 'meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch')
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch155
1 files changed, 155 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
new file mode 100644
index 00000000..9bd0b66b
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-1.8.0-mk-rework-gcc-version-detection-to-permit-versions-n.patch
@@ -0,0 +1,155 @@
1From ccb0f3b60c1ec84a97698d9699a4b7e5cf074b21 Mon Sep 17 00:00:00 2001
2From: Panu Matilainen <pmatilai@redhat.com>
3Date: Mon, 23 Feb 2015 16:53:56 +0200
4Subject: [PATCH] mk: rework gcc version detection to permit versions newer
5 than 4.x
6
7Upstream-Status: Backport [2.1.0]
8
9Separately comparing major and minor versions becomes seriously clumsy
10when with major version changes, convert the entire version string into
11a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use
12that for comparisons, eliminate unnecessary negations while at it.
13This makes the comparisons simpler, more obvious and makes gcc 5.0
14naturally recognized at least as capable as newest 4.x.
15
16This three-digit scheme would run into trouble if gcc ever went to
17two-digit version segments, but that hasn't happened in the last 10+
18years so it seems like a safe assumption.
19
20Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
21Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
22(cherry picked from commit 71f0ab1849b4fc3ca928deb566df12ca725ed150)
23Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
24
25Conflicts:
26 lib/librte_pmd_fm10k/Makefile
27Makefile part of fm10k feature enabled as part of
28commit a6061d9e7075b5457a9234117d75a2c05227457d which we ae not
29backporting. Makefile changes not taken.
30---
31 lib/librte_pmd_i40e/Makefile | 2 +-
32 lib/librte_pmd_ixgbe/Makefile | 6 +++---
33 lib/librte_pmd_vmxnet3/Makefile | 2 +-
34 mk/toolchain/gcc/rte.toolchain-compat.mk | 22 ++++++++++------------
35 4 files changed, 15 insertions(+), 17 deletions(-)
36
37diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile
38index 98e4bdf..61c3675 100644
39--- a/lib/librte_pmd_i40e/Makefile
40+++ b/lib/librte_pmd_i40e/Makefile
41@@ -65,7 +65,7 @@ CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
42 CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
43 CFLAGS_BASE_DRIVER += -Wno-format-security
44
45-ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 4 && echo 1), 1)
46+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
47 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
48 endif
49
50diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
51index 3588047..592fe74 100644
52--- a/lib/librte_pmd_ixgbe/Makefile
53+++ b/lib/librte_pmd_ixgbe/Makefile
54@@ -56,18 +56,18 @@ else
55 #
56 # CFLAGS for gcc
57 #
58-ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
59+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
60 CFLAGS += -Wno-deprecated
61 endif
62 CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
63 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
64
65-ifeq ($(shell test $(GCC_MAJOR_VERSION) -ge 4 -a $(GCC_MINOR_VERSION) -ge 6 && echo 1), 1)
66+ifeq ($(shell test $(GCC_VERSION) -ge 460 && echo 1), 1)
67 CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable
68 CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable -Wno-maybe-uninitialized
69 endif
70
71-ifeq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 6 && echo 1), 1)
72+ifeq ($(shell test $(GCC_VERSION) -le 460 && echo 1), 1)
73 CFLAGS_ixgbe_x550.o += -Wno-uninitialized
74 CFLAGS_ixgbe_phy.o += -Wno-uninitialized
75 endif
76diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile
77index 6872c74..3b7674e 100644
78--- a/lib/librte_pmd_vmxnet3/Makefile
79+++ b/lib/librte_pmd_vmxnet3/Makefile
80@@ -56,7 +56,7 @@ else
81 #
82 # CFLAGS for gcc
83 #
84-ifneq ($(shell test $(GCC_MAJOR_VERSION) -le 4 -a $(GCC_MINOR_VERSION) -le 3 && echo 1), 1)
85+ifeq ($(shell test $(GCC_VERSION) -ge 440 && echo 1), 1)
86 CFLAGS += -Wno-deprecated
87 endif
88 CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
89diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk
90index e40e103..a867559 100644
91--- a/mk/toolchain/gcc/rte.toolchain-compat.mk
92+++ b/mk/toolchain/gcc/rte.toolchain-compat.mk
93@@ -38,17 +38,15 @@
94
95 #find out GCC version
96
97-GCC_MAJOR_VERSION = $(shell $(CC) -dumpversion | cut -f1 -d.)
98+GCC_VERSION = $(subst .,,$(shell $(CC) -dumpversion))
99
100-# if GCC is not 4.x
101-ifneq ($(GCC_MAJOR_VERSION),4)
102+# if GCC is older than 4.x
103+ifeq ($(shell test $(GCC_VERSION) -lt 400 && echo 1), 1)
104 MACHINE_CFLAGS =
105-$(warning You are not using GCC 4.x. This is neither supported, nor tested.)
106+$(warning You are using GCC < 4.x. This is neither supported, nor tested.)
107
108
109 else
110- GCC_MINOR_VERSION = $(shell $(CC) -dumpversion | cut -f2 -d.)
111-
112 # GCC graceful degradation
113 # GCC 4.2.x - added support for generic target
114 # GCC 4.3.x - added support for core2, ssse3, sse4.1, sse4.2
115@@ -57,18 +55,18 @@ else
116 # GCC 4.6.x - added support for corei7, corei7-avx
117 # GCC 4.7.x - added support for fsgsbase, rdrnd, f16c, core-avx-i, core-avx2
118
119- ifeq ($(shell test $(GCC_MINOR_VERSION) -le 7 && echo 1), 1)
120+ ifeq ($(shell test $(GCC_VERSION) -le 470 && echo 1), 1)
121 MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS))
122 MACHINE_CFLAGS := $(patsubst -march=core-avx2,-march=core-avx2,$(MACHINE_CFLAGS))
123 endif
124- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 6 && echo 1), 1)
125+ ifeq ($(shell test $(GCC_VERSION) -lt 460 && echo 1), 1)
126 MACHINE_CFLAGS := $(patsubst -march=corei7-avx,-march=core2 -maes -mpclmul -mavx,$(MACHINE_CFLAGS))
127 MACHINE_CFLAGS := $(patsubst -march=corei7,-march=core2 -maes -mpclmul,$(MACHINE_CFLAGS))
128 endif
129- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 5 && echo 1), 1)
130+ ifeq ($(shell test $(GCC_VERSION) -lt 450 && echo 1), 1)
131 MACHINE_CFLAGS := $(patsubst -march=atom,-march=core2 -mssse3,$(MACHINE_CFLAGS))
132 endif
133- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 4 && echo 1), 1)
134+ ifeq ($(shell test $(GCC_VERSION) -lt 440 && echo 1), 1)
135 MACHINE_CFLAGS := $(filter-out -mavx -mpclmul -maes,$(MACHINE_CFLAGS))
136 ifneq ($(findstring SSE4_2, $(CPUFLAGS)),)
137 MACHINE_CFLAGS += -msse4.2
138@@ -77,12 +75,12 @@ else
139 MACHINE_CFLAGS += -msse4.1
140 endif
141 endif
142- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 3 && echo 1), 1)
143+ ifeq ($(shell test $(GCC_VERSION) -lt 430 && echo 1), 1)
144 MACHINE_CFLAGS := $(filter-out -msse% -mssse%,$(MACHINE_CFLAGS))
145 MACHINE_CFLAGS := $(patsubst -march=core2,-march=generic,$(MACHINE_CFLAGS))
146 MACHINE_CFLAGS += -msse3
147 endif
148- ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 2 && echo 1), 1)
149+ ifeq ($(shell test $(GCC_VERSION) -lt 420 && echo 1), 1)
150 MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS))
151 endif
152 endif
153--
1541.9.1
155