From owner-freebsd-arm@FreeBSD.ORG Sun Jan 4 20:22:00 2015 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC7157A5 for ; Sun, 4 Jan 2015 20:22:00 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8D937C2 for ; Sun, 4 Jan 2015 20:21:59 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Y7rgP-000HzK-6Y; Sun, 04 Jan 2015 20:21:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t04KLpDY018095; Sun, 4 Jan 2015 13:21:51 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+3WUNg47l6t9aplCPby5nw Message-ID: <1420402911.85983.32.camel@freebsd.org> Subject: Re: How to turn off -Werror for kernel build? From: Ian Lepore To: Torfinn Ingolfsen Date: Sun, 04 Jan 2015 13:21:51 -0700 In-Reply-To: <20150104192442.3eab6a92c51a51094dbd5121@getmail.no> References: <20150104192442.3eab6a92c51a51094dbd5121@getmail.no> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2015 20:22:00 -0000 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