Date: Sun, 04 Jan 2015 13:21:51 -0700 From: Ian Lepore <ian@freebsd.org> To: Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no> Cc: freebsd-arm@FreeBSD.org Subject: Re: How to turn off -Werror for kernel build? Message-ID: <1420402911.85983.32.camel@freebsd.org> In-Reply-To: <20150104192442.3eab6a92c51a51094dbd5121@getmail.no> References: <20150104192442.3eab6a92c51a51094dbd5121@getmail.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2015-01-04 at 19:24 +0100, Torfinn Ingolfsen wrote: > I am trying to build an image for a Samsung Chromebook 2 (model XE503C32, "Peach Pi")[4]. > I am following this[1] wiki page. And I'm using the build script[2] Ian Lepore shared with us last year. > The build machine runs FreeBSD 9.3-stable: > tingo@kg-core1$ uname -a > FreeBSD kg-core1.kg4.no 9.3-STABLE FreeBSD 9.3-STABLE #0 r273918: Fri Oct 31 22:52:44 CET 2014 > root@kg-core1.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 > I am trying to build latest -current (revision 276660). > Initially, config/make.conf and config/src.conf are empty. > The kernel config file looks like this: > tingo@kg-core1$ more config/CB2 > # kernel config file for Chromebook 2 Peach Pi > > include "CHROMEBOOK-PEACH-PIT" > ident CHROMEBOOK-PEACH-PI > > #hints "CHROMEBOOK-PEACH-PIT.hints" > > options ROOTDEVNAME=\"ufs:/dev/da0p3\" > > ./mk buildworld works > ./mk buildkernel fails with this: > tingo@kg-core1$ ./mk buildkernel > [... snipped for brevity ...] > --- trap-v6.o --- > cc -c -O -pipe -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -nostdinc -I. -I/zs/tingo/work/chromebook/cb2/src/sys -I/zs/tingo/work/chromebook/cb2/src/sys/contrib/altq -I/zs/tingo/work/chromebook/cb2/src/sys/contrib/libfdt -I/zs/tingo/work/chromebook/cb2/src/sys/gnu/dts/include -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -march=armv7a -funwind-tables -ffreestanding -gdwarf-2 -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -mno-thumb-interwork -std=iso9899:1999 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Werror /z! s/t > ingo/wor > k/chromebook/cb2/src/sys/arm/arm/trap-v6.c > cc1: warnings being treated as errors > /zs/tingo/work/chromebook/cb2/src/sys/arm/arm/trap-v6.c: In function 'abort_handler': > /zs/tingo/work/chromebook/cb2/src/sys/arm/arm/trap-v6.c:280: warning: 'rv' may be used uninitialized in this function > *** [trap-v6.o] Error code 1 > > bmake[1]: stopped in /zs/tingo/work/chromebook/cb2/obj/arm.armv6/zs/tingo/work/chromebook/cb2/src/sys/CB2 > 1 error > > bmake[1]: stopped in /zs/tingo/work/chromebook/cb2/obj/arm.armv6/zs/tingo/work/chromebook/cb2/src/sys/CB2 > *** [buildkernel] Error code 2 > > bmake: stopped in /zs/tingo/work/chromebook/cb2/src > 1 error > > bmake: stopped in /zs/tingo/work/chromebook/cb2/src > *** [buildkernel] Error code 2 > 1 error > 39.78 real 82.19 user 13.60 sys > so I try to "fix" it by turning off -Werror for kernel builds. According to this page[3], you can do that either in src.conf or in make.conf. > I try src.conf first: > tingo@kg-core1$ more config/src.conf > # build world without -Werror > NO_WERROR= > # build kernel without -Werror > WERROR= > (yes, I also tried NO_WERROR, but that didn't help either). > > but warnings are still treated as errors? > tingo@kg-core1$ ./mk buildkernel > [...] > --- trap-v6.o --- > cc1: warnings being treated as errors > /zs/tingo/work/chromebook/cb2/src/sys/arm/arm/trap-v6.c: In function 'abort_handler': > /zs/tingo/work/chromebook/cb2/src/sys/arm/arm/trap-v6.c:280: warning: 'rv' may be used uninitialized in this function > *** [trap-v6.o] Error code 1 > > bmake[1]: stopped in /zs/tingo/work/chromebook/cb2/obj/arm.armv6/zs/tingo/work/chromebook/cb2/src/sys/CB2 > 1 error > > bmake[1]: stopped in /zs/tingo/work/chromebook/cb2/obj/arm.armv6/zs/tingo/work/chromebook/cb2/src/sys/CB2 > *** [buildkernel] Error code 2 > > bmake: stopped in /zs/tingo/work/chromebook/cb2/src > 1 error > > bmake: stopped in /zs/tingo/work/chromebook/cb2/src > *** [buildkernel] Error code 2 > 1 error > 38.41 real 82.90 user 13.57 sys > > I also tried it in config/make.conf. > Any hints? > > > References: > 1) https://wiki.freebsd.org/FreeBSD/arm/Chromebook > 2) http://lists.freebsd.org/pipermail/freebsd-arm/2014-January/007249.html > 3) https://wiki.freebsd.org/BuildingFreeBSDWithClang > 4) http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-chromebook-2 I'm not sure why the WERROR= override didn't work, but there have been several calls recently to eliminate that warning when building with gcc, because it just gets the warning wrong way too often (as it's doing in this case). So I did that in r276666, it should solve your problem. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1420402911.85983.32.camel>