Hello,When I compile armel kernel by gcc4.6 on Linux du 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux. tknv@du:~$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6.1/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.1 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
and Makefile KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Wno-unused-but-set-variable \ -Wno-unused-parameter \ -Wno-array-bounds \ -Wno-format-security \ -fno-delete-null-pointer-checks
and make WERROR=0 but error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors
How to remove werror all ? thanks.
On Wed, Nov 23, 2011 at 01:54:44PM +0700, tknv wrote:
Hello,When I compile armel kernel by gcc4.6 on Linux du 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux. tknv@du:~$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6.1/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.1 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
and Makefile KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Wno-unused-but-set-variable \ -Wno-unused-parameter \ -Wno-array-bounds \ -Wno-format-security \ -fno-delete-null-pointer-checks
and make WERROR=0 but error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors
How to remove werror all ? thanks.
Do you know how the compiler is being invoked when compiling the affected file? If not, try make V=1
Where is the code that is triggering the error? If the compiler is raising that error for a good reason, it may be better to improve the code instead of turning of the error check.
Cheers ---Dave
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Thank you very much!
On Wed, Nov 23, 2011 at 10:35:54AM +0000, Dave Martin wrote:
On Wed, Nov 23, 2011 at 01:54:44PM +0700, tknv wrote:
Hello,When I compile armel kernel by gcc4.6 on Linux du 3.0.0-12-generic-pae #20-Ubuntu SMP Fri Oct 7 16:37:17 UTC 2011 i686 i686 i386 GNU/Linux. tknv@du:~$ arm-linux-gnueabi-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6.1/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/arm-linux-gnueabi/include/c++/4.6.1 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include --with-headers=/usr/arm-linux-gnueabi/include --with-libs=/usr/arm-linux-gnueabi/lib Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
and Makefile KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Wno-unused-but-set-variable \ -Wno-unused-parameter \ -Wno-array-bounds \ -Wno-format-security \ -fno-delete-null-pointer-checks
and make WERROR=0 but error: array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors
How to remove werror all ? thanks.
Do you know how the compiler is being invoked when compiling the affected file? If not, try make V=1
Where is the code that is triggering the error? If the compiler is raising that error for a good reason, it may be better to improve the code instead of turning of the error check.
Cheers ---Dave
On Wed, Nov 23, 2011 at 09:41:52PM +0700, tknv wrote:
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Can you re-run your build with V=1 on the make command line, and post the log so I can see what happens?
I still don't feel I have enough information to understand exactly what's happening.
Additional CFLAGS get added at different places in the Makefiles, so it is possible that your change has been overridden somewhere else.
Cheers ---Dave
On Thu, Nov 24, 2011 at 6:51 AM, Dave Martin dave.martin@linaro.org wrote:
On Wed, Nov 23, 2011 at 09:41:52PM +0700, tknv wrote:
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Can you re-run your build with V=1 on the make command line, and post the log so I can see what happens?
I still don't feel I have enough information to understand exactly what's happening.
Additional CFLAGS get added at different places in the Makefiles, so it is possible that your change has been overridden somewhere else.
A side note: adding a -Wno-error to the end of a set of flags cancels out any earlier -Werror. I needed to use this recently with a build system that unconditionally turned on -Werror and a g++-4.1 that was a bit wrong in it's warnings.
-- Michael
On Thu, Nov 24, 2011 at 08:28:53AM +1300, Michael Hope wrote:
On Thu, Nov 24, 2011 at 6:51 AM, Dave Martin dave.martin@linaro.org wrote:
On Wed, Nov 23, 2011 at 09:41:52PM +0700, tknv wrote:
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Can you re-run your build with V=1 on the make command line, and post the log so I can see what happens?
I still don't feel I have enough information to understand exactly what's happening.
Additional CFLAGS get added at different places in the Makefiles, so it is possible that your change has been overridden somewhere else.
A side note: adding a -Wno-error to the end of a set of flags cancels out any earlier -Werror. I needed to use this recently with a build system that unconditionally turned on -Werror and a g++-4.1 that was a bit wrong in it's warnings.
Hmmm, that may be the cause.
The perf tools' script in the Linux tree for example has:
# Treat warnings as errors unless directed not to ifneq ($(WERROR),0) CFLAGS_WERROR := -Werror endif
...which isn't going to work if gcc is excessive about the errors it flags up, given the -W options in the top-level Makefile. Adding -Wno-array-bounds might work.
Interestingly, I can't seem to make gcc-4.5.2 report an array bounds error, even for obviously wrong code:
int f(void) { int x[1];
return x[2]; }
gcc -O3 -Wall -Wextra -Warray-bounds -Werror -c tst.c
...reports no error. gcc "did what I asked", but the code is clearly nonsensical, and doesn't describe any possible C function:
00000000 <f>: 0: b082 sub sp, #8 2: 9803 ldr r0, [sp, #12] 4: b002 add sp, #8 6: 4770 bx lr
gcc seems not to detect a blatant access to an uninitialised variable here also... although for a simple variable, that does get detected:
int f(void) { int x;
return x; }
gcc -O3 -Wall -Wextra -Warray-bounds -Werror -c tst.c cc1: warnings being treated as errors tst.c: In function ‘f’: tst.c:5:17: error: ‘x’ is used uninitialized in this function
A don't know whether warning issues indicate true bugs, but this is at least strange behaviour.
Cheers ---Dave
On Fri, Nov 25, 2011 at 12:01 AM, Dave Martin dave.martin@linaro.org wrote:
On Thu, Nov 24, 2011 at 08:28:53AM +1300, Michael Hope wrote:
On Thu, Nov 24, 2011 at 6:51 AM, Dave Martin dave.martin@linaro.org wrote:
On Wed, Nov 23, 2011 at 09:41:52PM +0700, tknv wrote:
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Can you re-run your build with V=1 on the make command line, and post the log so I can see what happens?
I still don't feel I have enough information to understand exactly what's happening.
Additional CFLAGS get added at different places in the Makefiles, so it is possible that your change has been overridden somewhere else.
A side note: adding a -Wno-error to the end of a set of flags cancels out any earlier -Werror. I needed to use this recently with a build system that unconditionally turned on -Werror and a g++-4.1 that was a bit wrong in it's warnings.
Hmmm, that may be the cause.
The perf tools' script in the Linux tree for example has:
# Treat warnings as errors unless directed not to ifneq ($(WERROR),0) CFLAGS_WERROR := -Werror endif
...which isn't going to work if gcc is excessive about the errors it flags up, given the -W options in the top-level Makefile. Adding -Wno-array-bounds might work.
Interestingly, I can't seem to make gcc-4.5.2 report an array bounds error, even for obviously wrong code:
int f(void) { int x[1];
return x[2]; }
gcc -O3 -Wall -Wextra -Warray-bounds -Werror -c tst.c
...reports no error. gcc "did what I asked", but the code is clearly nonsensical, and doesn't describe any possible C function:
This is OK with GCC 4.5:
michaelh@ursa2:~/linaro/bugs$ /tools/toolchains/arch/armv7l/gcc-linaro-4.6-2011.11-armv7l-natty-cbuild205-tcpanda03-cortexa9r1/bin/gcc -S -O2 -Warray-bounds bounds.c bounds.c: In function 'f': bounds.c:5:12: warning: array subscript is above array bounds [-Warray-bounds]
I tracked down the explicit -Werror I saw earlier to gcc/lto-plugin:
lto-plugin/Makefile.in:AM_CFLAGS = -Wall -Werror
In this case gcc-4.1 (don't ask) was a bit enthusiastic about the warnings. Adding a -Wno-error to CFLAGS was better than patching the Makefile.
-- Michael
Sorry for lacking information. I would like to explain again. When I compile kernel with gcc-4.4.3 and remove Werror from Makefile of top of kernel tree, then no warnings to error. When using gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) and also remove Werror from Makefile of top of kernel tree, But warnings to error. ex).array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors.
So I removed Werror from Makefile for some modules and etc. Just I feel strange, Because I think it will override other Makefile when remove Werror from Makefile of top of kernel tree. But I am not sure this issue is for compiler, Makefiles or my misunderstanding.
On Wed, Nov 23, 2011 at 05:51:40PM +0000, Dave Martin wrote:
On Wed, Nov 23, 2011 at 09:41:52PM +0700, tknv wrote:
Thank you very much, quick reply. Yes, It is right," it may be better to improve the code instead of turning of the error check." But this time I would like to testing some modules at first even any warnings occur at other modules. I removed -Werror from Makefile at modules have warnings. By the way, KBUILD_CFLAGS's -Werror does not work correct ?
Can you re-run your build with V=1 on the make command line, and post the log so I can see what happens?
I still don't feel I have enough information to understand exactly what's happening.
Additional CFLAGS get added at different places in the Makefiles, so it is possible that your change has been overridden somewhere else.
Cheers ---Dave
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
On Sun, Nov 27, 2011 at 02:09:29AM +0700, tknv wrote:
Sorry for lacking information. I would like to explain again. When I compile kernel with gcc-4.4.3 and remove Werror from Makefile of top of kernel tree, then no warnings to error. When using gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) and also remove Werror from Makefile of top of kernel tree, But warnings to error. ex).array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors.
So I removed Werror from Makefile for some modules and etc. Just I feel strange, Because I think it will override other Makefile when remove Werror from Makefile of top of kernel tree. But I am not sure this issue is for compiler, Makefiles or my misunderstanding.
Kbuild doesn't seem to provide a way to override the Werror behvaiour from the top level.
If a particular module uses -Werror, changing the top-level Makefile can't affect that.
The only place I can see where -Werror gets overriden for an ARM kernel it in tools/perf. Is that where you were seeing the failure?
Cheers ---Dave
This issue happend,when I was compiling ARM kernel. I could not get it where -Werror gets overriden in tools/perf. Could you tell me where is it ?
On Tue, Nov 29, 2011 at 01:53:40PM +0000, Dave Martin wrote:
On Sun, Nov 27, 2011 at 02:09:29AM +0700, tknv wrote:
Sorry for lacking information. I would like to explain again. When I compile kernel with gcc-4.4.3 and remove Werror from Makefile of top of kernel tree, then no warnings to error. When using gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) and also remove Werror from Makefile of top of kernel tree, But warnings to error. ex).array subscript is above array bounds [-Werror=array-bounds] cc1: all warnings being treated as errors.
So I removed Werror from Makefile for some modules and etc. Just I feel strange, Because I think it will override other Makefile when remove Werror from Makefile of top of kernel tree. But I am not sure this issue is for compiler, Makefiles or my misunderstanding.
Kbuild doesn't seem to provide a way to override the Werror behvaiour from the top level.
If a particular module uses -Werror, changing the top-level Makefile can't affect that.
The only place I can see where -Werror gets overriden for an ARM kernel it in tools/perf. Is that where you were seeing the failure?
Cheers ---Dave
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
On Tue, Nov 29, 2011 at 09:43:01PM +0700, tknv wrote:
This issue happend,when I was compiling ARM kernel. I could not get it where -Werror gets overriden in tools/perf. Could you tell me where is it ?
In tools/perf/Makefile:
34:# Define WERROR=0 to disable treating any warnings as errors. 69:ifneq ($(WERROR),0) 70: CFLAGS_WERROR := -Werror 105:CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
This Makefile _only_ applies to the perf tools. The rest of the kernel uses other Makefiles.
The perf tools are not built automatically, so if you are only trying to build a kernel image then you must have some other problem.
As I suggested previously, can you please run
make V=1
and send the last few lines of output, including the error message *and* the command which caused it.
Without a precise indication of where the error occurs, I can't offer much help.
Cheers ---Dave
I could not find that WERROR override code at my kernels...
Sorry delay it, I did make V=1. There are three kinds test. All targets are ARM. All Makefiles(top of kernel tree)-KBUILD_CFLAGS are same. KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common \ -Wno-format-security \ -fno-delete-null-pointer-checks
I think linaro Werror behaviour is different or I need to add FLAGS more.
Compile CM-kernel with android SDK make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329 rm -f drivers/net/wireless/bcm4329/built-in.o; /home/tknv/android/Oxygen/prebuil t/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-ar rcs drivers/net/wireless/bcm43 29/built-in.o /home/tknv/android/Oxygen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eab i-gcc -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d -nostdinc -isystem /home /tknv/android/Oxygen/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm -eabi/4.4.3/include -I/home/tknv/android/SuperSonic/kernels/CM-kernel/arch/arm/incl ude -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -mlittle-endian - Iarch/arm/mach-msm/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-st rict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -f omit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-over flow -fno-dwarf2-cfi-asm -fconserve-stack -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHD THREAD -DBCMWPA2 -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 -DDHD_ FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMS DIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall -Wstrict-prototypes -Werror -DOO B_INTR_ONLY -DCUSTOMER_HW2 -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP - DSOFTAP -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT -DGET_CUSTOM _MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DHW_OOB -Idrivers/net/wireless/bcm4329 -Idrive rs/net/wireless/bcm4329/include -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=K BUILD_STR(dhd_linux)" -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)" -c -o drivers/net/wi reless/bcm4329/dhd_linux.o drivers/net/wireless/bcm4329/dhd_linux. ... [1]+ Done make V=1 > build.log 2>&1
Compile CM-kernel with linaro. make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329 rm -f drivers/net/wireless/bcm4329/built-in.o; /usr/bin/arm-linux-gnueabi-ar rcs drivers/net/wireless/bcm4329/built-in.o /usr/bin/arm-linux-gnueabi-gcc -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include -I/home/tknv/android/SuperSonic/kernels/CM-kernel/arch/arm/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=7 -march=armv7-a -msoft-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fomit-frame-pointer -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 -DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DHW_OOB -Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(dhd_linux)" -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)" -c -o drivers/net/wireless/bcm4329/dhd_linux.o drivers/net/wireless/bcm4329/dhd_linux.c drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘ dhd_rx_frame’: drivers/net/wireless/bcm4329/dhd_linux.c:1282:24: error: variable ‘save_pktbuf’ set but not used [-Werror=unused-but-set-variable] drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘ dhd_os_wd_timer’: drivers/net/wireless/bcm4329/dhd_linux.c:2737:14: error: variable ‘save_dhd_watchdog_ms’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors
make[4]: *** [drivers/net/wireless/bcm4329/dhd_linux.o] Error 1 make[3]: *** [drivers/net/wireless/bcm4329] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 ^C[1]+ Exit 2 make V=1 > build.log 2>&1
Compile tiamatat-kernel with linaro. make -f scripts/Makefile.build obj=drivers/net/wireless/bcm4329 /usr/bin/arm-linux-gnueabi-gcc -Wp,-MD,drivers/net/wireless/bcm4329/.dhd_linux.o.d -nostdinc -isystem /usr/lib/gcc/arm-linux-gnueabi/4.6.1/include -I/home/tknv/android/SuperSonic/kernels/tiamat-kernel/arch/arm/include -Iinclude -include include/generated/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-msm/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=7 -march=armv7-a -mhard-float -Uarm -Wframe-larger-than=1024 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -DLINUX -DBCMDRIVER -DBCMDONGLEHOST -DDHDTHREAD -DBCMWPA2 -DUNRELEASEDCHIP -Dlinux -DDHD_SDALIGN=64 -DMAX_HDR_READ=64 -DDHD_FIRSTREAD=64 -DDHD_GPL -DDHD_SCHED -DBDC -DTOE -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMSDIO -DDHD_GPL -DBCMLXSDMMC -DBCMPLATFORM_BUS -Wall -Wstrict-prototypes -Werror -DOOB_INTR_ONLY -DCUSTOMER_HW2 -DDHD_USE_STATIC_BUF -DMMC_SDIO_ABORT -DDHD_DEBUG_TRAP -DSOFTAP -DEMBEDDED_PLATFORM -DARP_OFFLOAD_SUPPORT -DPKT_FILTER_SUPPORT -DGET_CUSTOM_MAC_ENABLE -DSET_RANDOM_MAC_SOFTAP -DCSCAN -DHW_OOB -DKEEP_ALIVE -DPNO_SUPPORT -Idrivers/net/wireless/bcm4329 -Idrivers/net/wireless/bcm4329/include -DMODULE -DMODULE -march=armv7-a -mfpu=vfpv3 -ftree-vectorize -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(dhd_linux)" -D"KBUILD_MODNAME=KBUILD_STR(bcm4329)" -c -o drivers/net/wireless/bcm4329/dhd_linux.o drivers/net/wireless/bcm4329/dhd_linux.c drivers/net/wireless/bcm4329/dhd_linux.c: In function ‘dhd_rx_frame’ : drivers/net/wireless/bcm4329/dhd_linux.c:1256:24: error: variable ‘ save_pktbuf’ set but not used [-Werror=unused-but-set-variable] cc1: all warnings being treated as errors
make[4]: *** [drivers/net/wireless/bcm4329/dhd_linux.o] Error 1 make[3]: *** [drivers/net/wireless/bcm4329] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 ^C[1]+ Exit 2 make V=1 > build.log 2>&1
On Wed, Nov 30, 2011 at 04:13:18PM +0000, Dave Martin wrote:
On Tue, Nov 29, 2011 at 09:43:01PM +0700, tknv wrote:
This issue happend,when I was compiling ARM kernel. I could not get it where -Werror gets overriden in tools/perf. Could you tell me where is it ?
In tools/perf/Makefile:
34:# Define WERROR=0 to disable treating any warnings as errors. 69:ifneq ($(WERROR),0) 70: CFLAGS_WERROR := -Werror 105:CFLAGS = -fno-omit-frame-pointer -ggdb3 -Wall -Wextra -std=gnu99 $(CFLAGS_WERROR) $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
This Makefile _only_ applies to the perf tools. The rest of the kernel uses other Makefiles.
The perf tools are not built automatically, so if you are only trying to build a kernel image then you must have some other problem.
As I suggested previously, can you please run
make V=1
and send the last few lines of output, including the error message *and* the command which caused it.
Without a precise indication of where the error occurs, I can't offer much help.
Cheers ---Dave
linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
linaro-toolchain@lists.linaro.org