From owner-freebsd-arm@FreeBSD.ORG Sun Jan 4 18:32:46 2015 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97A71B52 for ; Sun, 4 Jan 2015 18:32:46 +0000 (UTC) Received: from galore.getmail.no (galore.getmail.no [84.210.184.6]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5DA8F8 for ; Sun, 4 Jan 2015 18:32:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by galore.getmail.no (Postfix) with ESMTP id 9C5765A1FB for ; Sun, 4 Jan 2015 19:24:46 +0100 (CET) Received: from galore.getmail.no ([127.0.0.1]) by localhost (galore.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fYnI01q5twFA for ; Sun, 4 Jan 2015 19:24:42 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by galore.getmail.no (Postfix) with ESMTP id C886045BE8 for ; Sun, 4 Jan 2015 19:24:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.8.4 galore.getmail.no C886045BE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=getmail.no; s=8A9C8B4C-D727-11E2-8095-B6466E6B3FA2; t=1420395882; bh=r759LtS6oX77wDTv48Kg+S85cwfJIxcswyMifTQFbBI=; h=Date:From:To:Subject:Message-Id:Mime-Version:Content-Type: Content-Transfer-Encoding; b=dkoO/DgNLEuxoY8pjAaCG2M8sloI+DyEF7WiRydg/TFUC25DU5ocaFMGsNk+J4ViT CBmfuWRVc2q0fHz0RQIGp3RFEXkncXOze37mDip9phWsKnsXgn7S/8NLSVXCq4Dmj7 TiTfsceX1s2uQnwyL1z6515BXp6Wk4xR8dejGwe0= X-Virus-Scanned: amavisd-new at galore.get.c.bitbit.net Received: from galore.getmail.no ([127.0.0.1]) by localhost (galore.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BZJVYjJq6muQ for ; Sun, 4 Jan 2015 19:24:42 +0100 (CET) Received: from kg-core1.kg4.no (cm-84.215.180.206.getinternet.no [84.215.180.206]) by galore.getmail.no (Postfix) with ESMTPSA id 92FE3456D3 for ; Sun, 4 Jan 2015 19:24:42 +0100 (CET) Date: Sun, 4 Jan 2015 19:24:42 +0100 From: Torfinn Ingolfsen To: freebsd-arm@FreeBSD.org Subject: How to turn off -Werror for kernel build? Message-Id: <20150104192442.3eab6a92c51a51094dbd5121@getmail.no> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.25; amd64-portbld-freebsd9.3) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 18:32:46 -0000 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 /zs/tingo/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 -- Torfinn Ingolfsen