From owner-freebsd-current@FreeBSD.ORG Mon Feb 20 07:46:55 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA01106566B for ; Mon, 20 Feb 2012 07:46:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id C26AF8FC15 for ; Mon, 20 Feb 2012 07:46:54 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a18d:99fb:f958:a941] (unknown [IPv6:2001:7b8:3a7:0:a18d:99fb:f958:a941]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 621AD5C59; Mon, 20 Feb 2012 08:46:53 +0100 (CET) Message-ID: <4F41FA6D.4020805@FreeBSD.org> Date: Mon, 20 Feb 2012 08:46:53 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120216 Thunderbird/11.0 MIME-Version: 1.0 To: Jia-Shiun Li References: In-Reply-To: X-Enigmail-Version: 1.4a1pre Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Failed to compile current kernel with llvm/clang X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Feb 2012 07:46:55 -0000 On 2012-02-20 02:54, Jia-Shiun Li wrote: > I am trying to build world and kernel with llvm according to > instructions on wiki: > > http://wiki.freebsd.org/BuildingFreeBSDWithClang > > buildworld is fine, but when building GENERIC kernel it failed on hpt27xx: > > ===> hpt27xx (all) > /usr/src/sys/modules/hpt27xx/../../dev/hpt27xx/osm_bsd.c:1180:25: > error: format string is not a string literal (potentially insecure) > [-Werror,-Wformat-security] > S_IRUSR | S_IWUSR, driver_name); > ^~~~~~~~~~~ > @/dev/hpt27xx/hpt27xx_config.h:46:21: note: expanded from: > #define driver_name hpt27xx_driver_name > ^~~~~~~~~~~~~~~~~~~ > > I cannot find symbol hpt27xx_driver_name in that directory. Is it > expanded from some macros I am not aware of? This is one of the very few warnings left in the kernel. Userland already compiles without any fatal warning. Because the hpt driver is submitted by the vendor, the warning you are encountering can't easily be fixed. It will hopefully be fixed on the next code drop from the vendor. In the meantime, I will put a band-aid in the Makefile.