From owner-freebsd-current@FreeBSD.ORG Thu May 16 20:03:50 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 16E61BB4 for ; Thu, 16 May 2013 20:03:50 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id D251FE04 for ; Thu, 16 May 2013 20:03:49 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:1d62:14ca:3c29:bff9]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 6BEB44AC57 for ; Fri, 17 May 2013 00:03:48 +0400 (MSK) Date: Fri, 17 May 2013 00:03:30 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <1326221828.20130517000330@serebryakov.spb.ru> To: freebsd-current@freebsd.org Subject: Problems with buildworld when WITHOUT_CLANG and WITHOUT_GCC are both set -- waring settings are selected not by used compiler, but by built one, what is plainly wrong. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 May 2013 20:03:50 -0000 Hello, Freebsd-current. Now, after Brook Davis work, it is possible to build world with both WITHOUT_CLANGF and WITHOUT_GCC set. Or it isn't? Problem is, that when WITHOUT_CLANG is set, all warning-suppression options are set as fro GCC. What is plainly wrong. buildworld fails: /usr/bin/cc --sysroot=/data/obj.nano/gateway.v2/data/src/tmp -B/data/obj.nano/gateway.v2/data/src/tmp/usr/bin -fpic -DPIC -O2 -pipe -I/data/src/lib/libc/include -I/data/src/lib/libc/../../include -I/data/src/lib/libc/amd64 -D__DBINTERFACE_PRIVATE -I/data/src/lib/libc/../../contrib/gdtoa -I/data/src/lib/libc/../../contrib/libc-vis -DINET6 -I/data/obj.nano/gateway.v2/data/src/lib/libc -I/data/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/data/src/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/data/src/lib/libc/../../contrib/tzcode/stdtime -I/data/src/lib/libc/stdtime -I/data/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/data/src/lib/libc/rpc -DSYMBOL_VERSIONING -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /data/src/lib/libc/net/ip6opt.c -o ip6opt.So /data/src/lib/libc/net/ip6opt.c:384:13: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if (extlen < 0 || (extlen % 8)) ~~~~~~ ^ ~ /data/src/lib/libc/net/ip6opt.c:413:10: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] if (len < 0 || len > 255) ~~~ ^ ~ 2 errors generated. And even if corss-compiler is not used, but both "world" compilers are switched off from build, here is same problem. It is not a problem, that there is no compiler to use (clang is properly built as cross-compiler at first stage in this case), it is problem, that compilation options (warnings suppression) are selected by wrong knobs. Ok, WITHOUT_CLANG is set, but we use clang to build other system! We need clang options in such case! And if (when?) gcc as cross-compiler (without building it for world itself, for second time) will be usable, we will need to pass gcc options to compiler. It looks like, COMPILER_TYPE is not set properly when there are WITHOUT_CLANG and WITHOUT_GCC are both set. -- // Black Lion AKA Lev Serebryakov