From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo de Lara Subject: [PATCH v2] DPDK does not build on gcc 4.4, as it complains due to strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, with no errors in next gcc versions: Date: Mon, 30 Mar 2015 12:06:16 +0100 Message-ID: <1427713576-31094-1-git-send-email-pablo.de.lara.guarch@intel.com> References: <1427397455-30368-1-git-send-email-pablo.de.lara.guarch@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable To: dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1427397455-30368-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" CC virtual_pmd.o CC test_link_bonding_mode4.o cc1: warnings being treated as errors /root/dpdk/app/test/test_link_bonding_mode4.c: In function =E2=80=98test_= mode4_expired=E2=80=99: /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dere= ferencing pointer =E2=80=98pkt.409=E2=80=99 does break strict-aliasing ru= les /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dere= ferencing pointer =E2=80=98pkt.409=E2=80=99 does break strict-aliasing ru= les ... cc1: warnings being treated as errors /root/dpdk/app/test/virtual_pmd.c: In function =E2=80=98virtual_ethdev_st= ats_reset=E2=80=99: /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dere= ferencing pointer =E2=80=98pkt.338=E2=80=99 does break strict-aliasing ru= les /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dere= ferencing pointer =E2=80=98pkt.338=E2=80=99 does break strict-aliasing ru= les This patch fixes the compilation by disabling these warnings. Changes in v2: Added missing gcc version check (checking if gcc 4.4 is present) Signed-off-by: Pablo de Lara --- app/test/Makefile | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c..9639a71 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -158,6 +158,15 @@ CFLAGS_test_memcpy_perf.o +=3D -fno-var-tracking-ass= ignments endif endif =20 +# Disable warnings of no-strict-aliasing in virtual_pmd +# and test_link_bonding_mode4 tests +ifeq ($(CC), gcc) +ifeq ($(shell test $(GCC_VERSION) -eq 44 && echo 1), 1) +CFLAGS_virtual_pmd.o +=3D -Wno-strict-aliasing +CFLAGS_test_link_bonding_mode4.o +=3D -Wno-strict-aliasing +endif +endif + # this application needs libraries first DEPDIRS-y +=3D lib =20 --=20 1.7.4.1