DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] fix build warning and failure in Suse11
@ 2015-03-18  7:10 Yong Liu
  2015-03-18 10:50 ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Yong Liu @ 2015-03-18  7:10 UTC (permalink / raw)
  To: dev

Suse11 SP3 default gcc version is 4.3.4, some options not support on this version.

error: implicit declaration of function ‘_mm_alignr_epi8’
solution: include tmmintrin.h when enable SSE3

error: unrecognized command line option "-Wno-unused-but-set-variable"
solution: add version check in fm10k Makefile

error: enic_main.c:845: error: initialized field overwritten
solution: change struct initialization code

error: ‘testfn_pci_cmd’ defined but not used
solution: add __attribute__((unused)) before function definition

error: unrecognized command line option "-fno-var-tracking-assignments"
solution: add version check in app/test/Makefile

error: implicit declaration of function ‘pread’
solution: add _GNU_SOURCE flag when compile eal_pci_uio and eal_interrupts

signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/app/test/Makefile b/app/test/Makefile
index 9f0262c..4aca77c 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -152,9 +152,11 @@ CFLAGS += -D_GNU_SOURCE
 
 # Disable VTA for memcpy test
 ifeq ($(CC), gcc)
+ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
 CFLAGS_test_memcpy.o += -fno-var-tracking-assignments
 CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments
 endif
+endif
 
 # this application needs libraries first
 DEPDIRS-y += lib
diff --git a/app/test/test.h b/app/test/test.h
index 5450986..13f6592 100644
--- a/app/test/test.h
+++ b/app/test/test.h
@@ -169,7 +169,7 @@ struct test_command {
 void add_test_command(struct test_command *t);
 
 #define REGISTER_TEST_COMMAND(t) \
-static void testfn_##t(void);\
+static void __attribute__((unused))testfn_##t(void);\
 void __attribute__((constructor, used)) testfn_##t(void)\
 {\
 	add_test_command(&t);\
diff --git a/lib/librte_eal/common/include/rte_common_vect.h b/lib/librte_eal/common/include/rte_common_vect.h
index 54ec70f..df3dce4 100644
--- a/lib/librte_eal/common/include/rte_common_vect.h
+++ b/lib/librte_eal/common/include/rte_common_vect.h
@@ -50,6 +50,10 @@
 #include <emmintrin.h>
 #endif
 
+#ifdef __SSE3__
+#include <tmmintrin.h>
+#endif
+
 #if defined(__SSE4_2__) || defined(__SSE4_1__)
 #include <smmintrin.h>
 #endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 23c2d48..21875b8 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -102,6 +102,8 @@ CFLAGS_eal_pci_vfio.o := -D_GNU_SOURCE
 CFLAGS_eal_common_whitelist.o := -D_GNU_SOURCE
 CFLAGS_eal_common_options.o := -D_GNU_SOURCE
 CFLAGS_eal_common_thread.o := -D_GNU_SOURCE
+CFLAGS_eal_pci_uio.o := -D_GNU_SOURCE
+CFLAGS_eal_interrupts.o := -D_GNU_SOURCE
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c
index c66f139..0892b3e 100644
--- a/lib/librte_pmd_enic/enic_main.c
+++ b/lib/librte_pmd_enic/enic_main.c
@@ -840,10 +840,12 @@ static int enic_set_rsskey(struct enic *enic)
 	dma_addr_t rss_key_buf_pa;
 	union vnic_rss_key *rss_key_buf_va = NULL;
 	static union vnic_rss_key rss_key = {
-		.key[0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}},
-		.key[1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}},
-		.key[2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}},
-		.key[3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}},
+		.key = {
+			[0] = {.b = {85, 67, 83, 97, 119, 101, 115, 111, 109, 101}},
+			[1] = {.b = {80, 65, 76, 79, 117, 110, 105, 113, 117, 101}},
+			[2] = {.b = {76, 73, 78, 85, 88, 114, 111, 99, 107, 115}},
+			[3] = {.b = {69, 78, 73, 67, 105, 115, 99, 111, 111, 108}},
+		}
 	};
 	int err;
 	u8 name[NAME_MAX];
diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile
index 998bf23..52fc315 100644
--- a/lib/librte_pmd_fm10k/Makefile
+++ b/lib/librte_pmd_fm10k/Makefile
@@ -62,13 +62,18 @@ else
 #
 # CFLAGS for gcc
 #
-ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
-CFLAGS     += -Wno-deprecated
-endif
 CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
 CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
-CFLAGS_BASE_DRIVER += -Wno-unused-variable -Wno-unused-but-set-variable
+CFLAGS_BASE_DRIVER += -Wno-unused-variable
 CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
+
+ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
+CFLAGS     += -Wno-deprecated
+endif
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
+CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
+endif
 endif
 
 #
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] fix build warning and failure in Suse11
  2015-03-18  7:10 [dpdk-dev] [PATCH] fix build warning and failure in Suse11 Yong Liu
@ 2015-03-18 10:50 ` Thomas Monjalon
  2015-03-18 15:18   ` Liu, Yong
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2015-03-18 10:50 UTC (permalink / raw)
  To: Yong Liu; +Cc: dev

Hi Yong,

Thanks for working on these important fixes.

2015-03-18 15:10, Yong Liu:
> Suse11 SP3 default gcc version is 4.3.4, some options not support on this version.

I guess some of these errors are not only specific to Suse-11?
Maybe that 1 patch per issue would be easier to read and could provide a more
accurate description.

> error: implicit declaration of function ‘_mm_alignr_epi8’
> solution: include tmmintrin.h when enable SSE3
> 
> error: unrecognized command line option "-Wno-unused-but-set-variable"
> solution: add version check in fm10k Makefile
> 
> error: enic_main.c:845: error: initialized field overwritten
> solution: change struct initialization code
> 
> error: ‘testfn_pci_cmd’ defined but not used
> solution: add __attribute__((unused)) before function definition

Please could you explain more the problem?
There are other constructors in DPDK which don't need the unused attribute.

> 
> error: unrecognized command line option "-fno-var-tracking-assignments"
> solution: add version check in app/test/Makefile
> 
> error: implicit declaration of function ‘pread’
> solution: add _GNU_SOURCE flag when compile eal_pci_uio and eal_interrupts
> 
> signed-off-by: Marvin Liu <yong.liu@intel.com>

Please use -s git option to have an automatic well formatted Signed-off.
Your previous contributions were signed "Yong Liu". Do you prefer Marvin Liu?

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

* Re: [dpdk-dev] [PATCH] fix build warning and failure in Suse11
  2015-03-18 10:50 ` Thomas Monjalon
@ 2015-03-18 15:18   ` Liu, Yong
  0 siblings, 0 replies; 3+ messages in thread
From: Liu, Yong @ 2015-03-18 15:18 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Hi Thomas,
I'll separated this patch set into several patches and send them out later. 
I think this patch can also fix some issue on gcc 44. 

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 18, 2015 6:51 PM
> To: Liu, Yong
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] fix build warning and failure in Suse11
> 
> Hi Yong,
> 
> Thanks for working on these important fixes.
> 
> 2015-03-18 15:10, Yong Liu:
> > Suse11 SP3 default gcc version is 4.3.4, some options not support on
> this version.
> 
> I guess some of these errors are not only specific to Suse-11?
> Maybe that 1 patch per issue would be easier to read and could provide a
> more
> accurate description.
> 
> > error: implicit declaration of function ‘_mm_alignr_epi8’
> > solution: include tmmintrin.h when enable SSE3
> >
> > error: unrecognized command line option "-Wno-unused-but-set-variable"
> > solution: add version check in fm10k Makefile
> >
> > error: enic_main.c:845: error: initialized field overwritten
> > solution: change struct initialization code
> >
> > error: ‘testfn_pci_cmd’ defined but not used
> > solution: add __attribute__((unused)) before function definition
> 
> Please could you explain more the problem?
> There are other constructors in DPDK which don't need the unused attribute.
> 
> >
> > error: unrecognized command line option "-fno-var-tracking-assignments"
> > solution: add version check in app/test/Makefile
> >
> > error: implicit declaration of function ‘pread’
> > solution: add _GNU_SOURCE flag when compile eal_pci_uio and
> eal_interrupts
> >
> > signed-off-by: Marvin Liu <yong.liu@intel.com>
> 
> Please use -s git option to have an automatic well formatted Signed-off.
> Your previous contributions were signed "Yong Liu". Do you prefer Marvin
> Liu?

Thanks Thomas, "Marvin" the name I used in DTS branch. For my major task is in DTS project,
I preferred to use "Marvin Liu":)


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

end of thread, other threads:[~2015-03-18 15:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18  7:10 [dpdk-dev] [PATCH] fix build warning and failure in Suse11 Yong Liu
2015-03-18 10:50 ` Thomas Monjalon
2015-03-18 15:18   ` Liu, Yong

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).