dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] test: Disable strict-aliasing warnings
@ 2015-03-26 19:17 Pablo de Lara
  2015-03-27  8:41 ` Qiu, Michael
       [not found] ` <1427397455-30368-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 17+ messages in thread
From: Pablo de Lara @ 2015-03-26 19:17 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

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:

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 ‘test_mode4_expired’:
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules
...
cc1: warnings being treated as errors
/root/dpdk/app/test/virtual_pmd.c: In function ‘virtual_ethdev_stats_reset’:
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules

This patch fixes the compilation by disabling
these warnings.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 app/test/Makefile |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/app/test/Makefile b/app/test/Makefile
index 4aca77c..0d62d07 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
 endif
 endif
 
+# Disable warnings of no-strict-aliasing in virtual_pmd
+# and test_link_bonding_mode4 tests
+CFLAGS_virtual_pmd.o += -Wno-strict-aliasing
+CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing
+
 # this application needs libraries first
 DEPDIRS-y += lib
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-03-30 20:48 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26 19:17 [PATCH] test: Disable strict-aliasing warnings Pablo de Lara
2015-03-27  8:41 ` Qiu, Michael
     [not found]   ` <533710CFB86FA344BFBF2D6802E60286D18E59-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-27  8:57     ` De Lara Guarch, Pablo
     [not found] ` <1427397455-30368-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-27  9:20   ` Thomas Monjalon
2015-03-27  9:29     ` De Lara Guarch, Pablo
     [not found]       ` <E115CCD9D858EF4F90C690B0DCB4D8972727CC77-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-27 10:00         ` Thomas Monjalon
2015-03-27 10:11           ` De Lara Guarch, Pablo
     [not found]             ` <E115CCD9D858EF4F90C690B0DCB4D8972727CCE9-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-30 11:11               ` De Lara Guarch, Pablo
2015-03-27 10:55   ` [PATCH v2 0/2] test: fix strict aliasing rule errors in gcc 4.4 Pawel Wodkowski
     [not found]     ` <1427453761-20019-1-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-27 10:56       ` [PATCH v2 1/2] test: fix strict aliasing rule error in virtual pmd Pawel Wodkowski
     [not found]         ` <1427453761-20019-2-git-send-email-pawelx.wodkowski-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-27 15:47           ` Stephen Hemminger
2015-03-27 10:56       ` [PATCH v2 2/2] test: fix strict aliasing rule error in link bonding mode 4 test Pawel Wodkowski
2015-03-30 20:48       ` [PATCH v2 0/2] test: fix strict aliasing rule errors in gcc 4.4 Thomas Monjalon
2015-03-27 15:46   ` [PATCH] test: Disable strict-aliasing warnings Stephen Hemminger
2015-03-27 15:48     ` De Lara Guarch, Pablo
2015-03-30 11:06   ` [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: Pablo de Lara
     [not found]     ` <1427713576-31094-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-30 20:47       ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).