|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH] replacing -Wextra with -WHi!
Lately gcc developers introduced -Wextra flag that does the same as -W but is more descriptive. According to this using -W flag should be safe (as gcc is backward compatlible) but using -Wextra is limited to newer gcc releases. Attached patch replaces all -Wextra occurences with -W and thus fixes compliation failures with older gcc (mine was gcc-3.3.3 on sles). Signed-off-by: chrubis@... -- Cyril Hrubis chrubis@... Index: delme/testcases/kernel/controllers/cpuctl_fj/Makefile =================================================================== --- delme.orig/testcases/kernel/controllers/cpuctl_fj/Makefile +++ delme/testcases/kernel/controllers/cpuctl_fj/Makefile @@ -25,7 +25,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../Makefile.inc -CPPFLAGS += -Wall -O2 -Wextra +CPPFLAGS += -Wall -O2 -W INSTALL_TARGETS := *.sh Index: delme/testcases/kernel/device-drivers/v4l/kernel_space/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/v4l/kernel_space/Makefile +++ delme/testcases/kernel/device-drivers/v4l/kernel_space/Makefile @@ -1,5 +1,5 @@ -EXTRA_CFLAGS += -Wall -Wextra -Wno-unused-parameter +EXTRA_CFLAGS += -Wall -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/device-drivers/v4l/user_space/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/v4l/user_space/Makefile +++ delme/testcases/kernel/device-drivers/v4l/user_space/Makefile @@ -33,7 +33,7 @@ # Released under GPL # -CFLAGS = -O2 -Wall -Wextra +CFLAGS = -O2 -Wall -W #CFLAGS += -g LDFLAGS = -lcunit Index: delme/testcases/kernel/device-drivers/acpi/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/acpi/Makefile +++ delme/testcases/kernel/device-drivers/acpi/Makefile @@ -6,7 +6,7 @@ # #KERNELDIR := /usr/src/linux-2.5.64-gcov -EXTRA_CFLAGS := -Wall -g -Wextra -Wno-unused-parameter +EXTRA_CFLAGS := -Wall -g -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/device-drivers/block/kernel_space/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/block/kernel_space/Makefile +++ delme/testcases/kernel/device-drivers/block/kernel_space/Makefile @@ -1,5 +1,5 @@ -EXTRA_CFLAGS += -Wall -Wextra -Wno-unused-parameter +EXTRA_CFLAGS += -Wall -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/Makefile +++ delme/testcases/kernel/device-drivers/misc_modules/per_cpu_allocator_module/Makefile @@ -1,5 +1,5 @@ -EXTRA_CFLAGS += -Wall -Wextra -Wno-unused-parameter +EXTRA_CFLAGS += -Wall -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/device-drivers/nls/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/nls/Makefile +++ delme/testcases/kernel/device-drivers/nls/Makefile @@ -2,7 +2,7 @@ # Makefile for GCOV profiling kernel module # -EXTRA_CFLAGS := -Wall -Wextra -Wno-unused-parameter +EXTRA_CFLAGS := -Wall -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/device-drivers/tbio/user_space/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/tbio/user_space/Makefile +++ delme/testcases/kernel/device-drivers/tbio/user_space/Makefile @@ -1,5 +1,5 @@ -CFLAGS += -O2 -Wall -Wextra -g +CFLAGS += -O2 -Wall -W -g OBJS = tbio_ki.o user_tbio.o test_bio: $(OBJS) Index: delme/testcases/kernel/device-drivers/usb/tusb/Makefile =================================================================== --- delme.orig/testcases/kernel/device-drivers/usb/tusb/Makefile +++ delme/testcases/kernel/device-drivers/usb/tusb/Makefile @@ -3,7 +3,7 @@ # #KERNELDIR := /usr/src/linux-2.5.64-gcov -EXTRA_CFLAGS := -Wall -Wextra -Wno-unused-parameter +EXTRA_CFLAGS := -Wall -W -Wno-unused-parameter ifneq ($(KERNELRELEASE),) Index: delme/testcases/kernel/controllers/cgroup_fj/Makefile =================================================================== --- delme.orig/testcases/kernel/controllers/cgroup_fj/Makefile +++ delme/testcases/kernel/controllers/cgroup_fj/Makefile @@ -25,7 +25,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../Makefile.inc -CPPFLAGS += -Wall -O2 -Wextra +CPPFLAGS += -Wall -O2 -W INSTALL_TARGETS := *.sh ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Thursday 05 November 2009 08:18:52 Cyril Hrubis wrote:
> Lately gcc developers introduced -Wextra flag that does the same as -W but > is more descriptive. According to this using -W flag should be safe (as > gcc is backward compatlible) but using -Wextra is limited to newer gcc > releases. > > Attached patch replaces all -Wextra occurences with -W and thus fixes > compliation failures with older gcc (mine was gcc-3.3.3 on sles). it'd be better if we had configure tests for -W flags, but that would take a bit more effort, and i dont think it should preclude applying your patch. however, please make this change first: - integrated Makefiles shouldnt be setting flags at all, so just delete the whole line in testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile > Signed-off-by: chrubis@... s-o-b tags should include your name -mike ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WHi!
> > Lately gcc developers introduced -Wextra flag that does the same as -W but > > is more descriptive. According to this using -W flag should be safe (as > > gcc is backward compatlible) but using -Wextra is limited to newer gcc > > releases. > > > > Attached patch replaces all -Wextra occurences with -W and thus fixes > > compliation failures with older gcc (mine was gcc-3.3.3 on sles). > > it'd be better if we had configure tests for -W flags, but that would take a > bit more effort, and i dont think it should preclude applying your patch. > however, please make this change first: > - integrated Makefiles shouldnt be setting flags at all, so just delete the > whole line in testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile > Signed-off-by: Cyril Hrubis chrubis@... -- Cyril Hrubis chrubis@... Index: delme/testcases/kernel/controllers/cpuctl_fj/Makefile =================================================================== --- delme.orig/testcases/kernel/controllers/cpuctl_fj/Makefile +++ delme/testcases/kernel/controllers/cpuctl_fj/Makefile @@ -25,8 +25,6 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../Makefile.inc -CPPFLAGS += -Wall -O2 -W - INSTALL_TARGETS := *.sh LDLIBS += -lm Index: delme/testcases/kernel/controllers/cgroup_fj/Makefile =================================================================== --- delme.orig/testcases/kernel/controllers/cgroup_fj/Makefile +++ delme/testcases/kernel/controllers/cgroup_fj/Makefile @@ -25,8 +25,6 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../Makefile.inc -CPPFLAGS += -Wall -O2 -W - INSTALL_TARGETS := *.sh include $(top_srcdir)/include/mk/generic_leaf_target.mk Index: delme/testcases/kernel/controllers/cpuacct/Makefile =================================================================== --- delme.orig/testcases/kernel/controllers/cpuacct/Makefile +++ delme/testcases/kernel/controllers/cpuacct/Makefile @@ -25,8 +25,6 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/testcases.mk include $(abs_srcdir)/../Makefile.inc -CPPFLAGS += -Wall - INSTALL_TARGETS := *.sh include $(top_srcdir)/include/mk/generic_leaf_target.mk Index: delme/testcases/kernel/io/disktest/Makefile =================================================================== --- delme.orig/testcases/kernel/io/disktest/Makefile +++ delme/testcases/kernel/io/disktest/Makefile @@ -188,7 +188,7 @@ include $(top_srcdir)/include/mk/env_pre VER := `grep VER_STR $(abs_srcdir)/main.h | awk -F\" '{print $$2}'` -CPPFLAGS += -g -Wall -O -DLINUX -D_THREAD_SAFE -D_GNU_SOURCE -D_LARGE_FILES -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(RPM_OPT_FLAGS) +CPPFLAGS += -g -O -DLINUX -D_THREAD_SAFE -D_GNU_SOURCE -D_LARGE_FILES -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $(RPM_OPT_FLAGS) DISTRO_FILES := Makefile* *.[ch] LICENSE README CHANGELOG ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Thursday 05 November 2009 11:59:13 Cyril Hrubis wrote:
> > > Lately gcc developers introduced -Wextra flag that does the same as -W > > > but is more descriptive. According to this using -W flag should be safe > > > (as gcc is backward compatlible) but using -Wextra is limited to newer > > > gcc releases. > > > > > > Attached patch replaces all -Wextra occurences with -W and thus fixes > > > compliation failures with older gcc (mine was gcc-3.3.3 on sles). > > > > it'd be better if we had configure tests for -W flags, but that would > > take a bit more effort, and i dont think it should preclude applying your > > patch. however, please make this change first: > > - integrated Makefiles shouldnt be setting flags at all, so just delete > > the whole line in > > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile > > Patch that should be applied over the previous one attached. anything up in the (simple) process ;). -mike ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Fri, Nov 6, 2009 at 12:11 PM, Mike Frysinger <vapier@...> wrote:
> On Thursday 05 November 2009 11:59:13 Cyril Hrubis wrote: >> > > Lately gcc developers introduced -Wextra flag that does the same as -W >> > > but is more descriptive. According to this using -W flag should be safe >> > > (as gcc is backward compatlible) but using -Wextra is limited to newer >> > > gcc releases. >> > > >> > > Attached patch replaces all -Wextra occurences with -W and thus fixes >> > > compliation failures with older gcc (mine was gcc-3.3.3 on sles). >> > >> > it'd be better if we had configure tests for -W flags, but that would >> > take a bit more effort, and i dont think it should preclude applying your >> > patch. however, please make this change first: >> > - integrated Makefiles shouldnt be setting flags at all, so just delete >> > the whole line in >> > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile >> >> Patch that should be applied over the previous one attached. > > thanks, ive merged the two and added to the tree. hopefully i didnt screw > anything up in the (simple) process ;). It looks fine from my end :]. We should really restrict the -W* flag setting to include/mk/config.mk like you suggested though, so maybe we should clean up all of the Makefiles in one shot. Thanks! -Garrett ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Friday 06 November 2009 17:05:59 Garrett Cooper wrote:
> On Fri, Nov 6, 2009 at 12:11 PM, Mike Frysinger wrote: > > On Thursday 05 November 2009 11:59:13 Cyril Hrubis wrote: > >> > > Lately gcc developers introduced -Wextra flag that does the same as > >> > > -W but is more descriptive. According to this using -W flag should > >> > > be safe (as gcc is backward compatlible) but using -Wextra is > >> > > limited to newer gcc releases. > >> > > > >> > > Attached patch replaces all -Wextra occurences with -W and thus > >> > > fixes compliation failures with older gcc (mine was gcc-3.3.3 on > >> > > sles). > >> > > >> > it'd be better if we had configure tests for -W flags, but that would > >> > take a bit more effort, and i dont think it should preclude applying > >> > your patch. however, please make this change first: > >> > - integrated Makefiles shouldnt be setting flags at all, so just > >> > delete the whole line in > >> > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile > >> > >> Patch that should be applied over the previous one attached. > > > > thanks, ive merged the two and added to the tree. hopefully i didnt > > screw anything up in the (simple) process ;). > > It looks fine from my end :]. We should really restrict the -W* > flag setting to include/mk/config.mk like you suggested though, so > maybe we should clean up all of the Makefiles in one shot. .mk framework. we could cheat and just pull in config.mk fo some, but for others (ones that build kernel modules), i'm not sure that will work. linux' kbuild gets pissy if you try to tweak build flags like CFLAGS/CPPFLAGS. so we might have to create a new .mk target specifically for kernel modules that takes care of these details. -mike ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Fri, Nov 6, 2009 at 2:48 PM, Mike Frysinger <vapier@...> wrote:
> On Friday 06 November 2009 17:05:59 Garrett Cooper wrote: >> On Fri, Nov 6, 2009 at 12:11 PM, Mike Frysinger wrote: >> > On Thursday 05 November 2009 11:59:13 Cyril Hrubis wrote: >> >> > > Lately gcc developers introduced -Wextra flag that does the same as >> >> > > -W but is more descriptive. According to this using -W flag should >> >> > > be safe (as gcc is backward compatlible) but using -Wextra is >> >> > > limited to newer gcc releases. >> >> > > >> >> > > Attached patch replaces all -Wextra occurences with -W and thus >> >> > > fixes compliation failures with older gcc (mine was gcc-3.3.3 on >> >> > > sles). >> >> > >> >> > it'd be better if we had configure tests for -W flags, but that would >> >> > take a bit more effort, and i dont think it should preclude applying >> >> > your patch. however, please make this change first: >> >> > - integrated Makefiles shouldnt be setting flags at all, so just >> >> > delete the whole line in >> >> > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile >> >> >> >> Patch that should be applied over the previous one attached. >> > >> > thanks, ive merged the two and added to the tree. hopefully i didnt >> > screw anything up in the (simple) process ;). >> >> It looks fine from my end :]. We should really restrict the -W* >> flag setting to include/mk/config.mk like you suggested though, so >> maybe we should clean up all of the Makefiles in one shot. > > some of the Makefiles Cyril highlighted havent been converted to the common > .mk framework. we could cheat and just pull in config.mk fo some, but for > others (ones that build kernel modules), i'm not sure that will work. linux' > kbuild gets pissy if you try to tweak build flags like CFLAGS/CPPFLAGS. so we > might have to create a new .mk target specifically for kernel modules that > takes care of these details. I was avoiding those Makefiles because they require kernel build tools and it requires some adjusting to get them to work. Similarly, I kind of cordoned off the selinux ones (but I did finish the transition), because it doesn't fit into the build cleanly. -Garrett ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Friday 06 November 2009 17:53:56 Garrett Cooper wrote:
> On Fri, Nov 6, 2009 at 2:48 PM, Mike Frysinger wrote: > > some of the Makefiles Cyril highlighted havent been converted to the > > common .mk framework. we could cheat and just pull in config.mk fo some, > > but for others (ones that build kernel modules), i'm not sure that will > > work. linux' kbuild gets pissy if you try to tweak build flags like > > CFLAGS/CPPFLAGS. so we might have to create a new .mk target > > specifically for kernel modules that takes care of these details. > > I was avoiding those Makefiles because they require kernel build tools > and it requires some adjusting to get them to work. -mike ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WHi!
> > >> > > Lately gcc developers introduced -Wextra flag that does the same as > > >> > > -W but is more descriptive. According to this using -W flag should > > >> > > be safe (as gcc is backward compatlible) but using -Wextra is > > >> > > limited to newer gcc releases. > > >> > > > > >> > > Attached patch replaces all -Wextra occurences with -W and thus > > >> > > fixes compliation failures with older gcc (mine was gcc-3.3.3 on > > >> > > sles). > > >> > > > >> > it'd be better if we had configure tests for -W flags, but that would > > >> > take a bit more effort, and i dont think it should preclude applying > > >> > your patch. however, please make this change first: > > >> > - integrated Makefiles shouldnt be setting flags at all, so just > > >> > delete the whole line in > > >> > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile > > >> > > >> Patch that should be applied over the previous one attached. > > > > > > thanks, ive merged the two and added to the tree. hopefully i didnt > > > screw anything up in the (simple) process ;). > > > > It looks fine from my end :]. We should really restrict the -W* > > flag setting to include/mk/config.mk like you suggested though, so > > maybe we should clean up all of the Makefiles in one shot. > > some of the Makefiles Cyril highlighted havent been converted to the common > .mk framework. we could cheat and just pull in config.mk fo some, but for > others (ones that build kernel modules), i'm not sure that will work. linux' > kbuild gets pissy if you try to tweak build flags like CFLAGS/CPPFLAGS. so we > might have to create a new .mk target specifically for kernel modules that > takes care of these details. In these I've only replaced -Wextra with -W. Is there any way this could broke them? -- Cyril Hrubis chrubis@... ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
|
|
Re: [PATCH] replacing -Wextra with -WOn Mon, Nov 9, 2009 at 2:24 AM, Cyril Hrubis <chrubis@...> wrote:
> Hi! >> > >> > > Lately gcc developers introduced -Wextra flag that does the same as >> > >> > > -W but is more descriptive. According to this using -W flag should >> > >> > > be safe (as gcc is backward compatlible) but using -Wextra is >> > >> > > limited to newer gcc releases. >> > >> > > >> > >> > > Attached patch replaces all -Wextra occurences with -W and thus >> > >> > > fixes compliation failures with older gcc (mine was gcc-3.3.3 on >> > >> > > sles). >> > >> > >> > >> > it'd be better if we had configure tests for -W flags, but that would >> > >> > take a bit more effort, and i dont think it should preclude applying >> > >> > your patch. however, please make this change first: >> > >> > - integrated Makefiles shouldnt be setting flags at all, so just >> > >> > delete the whole line in >> > >> > testcases/kernel/controllers/{cpuctl,cgroup}_fj/Makefile >> > >> >> > >> Patch that should be applied over the previous one attached. >> > > >> > > thanks, ive merged the two and added to the tree. hopefully i didnt >> > > screw anything up in the (simple) process ;). >> > >> > It looks fine from my end :]. We should really restrict the -W* >> > flag setting to include/mk/config.mk like you suggested though, so >> > maybe we should clean up all of the Makefiles in one shot. >> >> some of the Makefiles Cyril highlighted havent been converted to the common >> .mk framework. we could cheat and just pull in config.mk fo some, but for >> others (ones that build kernel modules), i'm not sure that will work. linux' >> kbuild gets pissy if you try to tweak build flags like CFLAGS/CPPFLAGS. so we >> might have to create a new .mk target specifically for kernel modules that >> takes care of these details. > > In these I've only replaced -Wextra with -W. Is there any way this could broke them? Mike was actually referring specifically to integrating the kernel modules testcases in the Makefile infrastructure. No worries -- just side commentary :).. Cheers! -Garrett ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@... https://lists.sourceforge.net/lists/listinfo/ltp-list |
| Free embeddable forum powered by Nabble | Forum Help |