Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 May 2013 00:03:30 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
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.
Message-ID:  <1326221828.20130517000330@serebryakov.spb.ru>

next in thread | raw e-mail | index | archive | help
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 <lev@FreeBSD.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1326221828.20130517000330>