Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Jun 2012 17:51:49 +0100
From:      "Sevan / Venture37" <venture37@gmail.com>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Unable to buildworld with ccache
Message-ID:  <CA%2BU3Mf6ROOgEHEEQEcNmjd50LKGqS8Zyg6TZxQ_r9O_0gdduZw@mail.gmail.com>
In-Reply-To: <4FCF35BF.5080006@FreeBSD.org>
References:  <4FCE8306.1020000@gmail.com> <4FCF35BF.5080006@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6 June 2012 11:49, Dimitry Andric <dim@freebsd.org> wrote:
> This is because clang suppresses a number of warnings for specific
> patterns in macros. =C2=A0Since ccache passes clang the preprocessed file=
,
> those suppressions will not work, and some additional warnings can be
> triggered.
>
> See also the following threads on the cfe-dev mailing list:
>
> =C2=A0http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/017250.ht=
ml
> =C2=A0http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/021824.html
>
> That said, I had a look at the specific warnings you posted for libc,
> and they are easy enough to fix. =C2=A0Please try the attached patch.

Worked a treat, now it barfs on libelf

/usr/local/libexec/ccache/world/cc  -O2 -fno-strict-aliasing -pipe
-march=3Dcore2 -I/usr/src/lib/libelf -I/usr/src/lib/libelf/../../sys
-DLIBELF_TEST_HOOKS -std=3Dgnu99 -Qunused-arguments -fstack-protector
-Wsystem-headers -Werror -Wall -Wno-format-y2k -W
-Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes
-Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch
-Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline
-Wnested-externs -Wredundant-decls -Wold-style-definition
-Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c
/usr/src/lib/libelf/elf_strptr.c -o elf_strptr.o
In file included from /usr/src/lib/libelf/elf_scn.c:1:
/usr/src/lib/libelf/elf_scn.c:198:41: error: equality comparison with
extraneous parentheses [-Werror,-Wparentheses-equality]
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/src/lib/libelf/elf_scn.c:198:41: note: remove extraneous
parentheses around the comparison to silence this warning
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
     ~                                  ^             ~
/usr/src/lib/libelf/elf_scn.c:198:41: note: use '=3D' to turn this
equality comparison into an assignment
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
                                        ^~
                                        =3D
1 error generated.
*** [elf_scn.So] Error code 1
In file included from /usr/src/lib/libelf/elf_scn.c:1:
/usr/src/lib/libelf/elf_scn.c:198:41: error: equality comparison with
extraneous parentheses [-Werror,-Wparentheses-equality]
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/src/lib/libelf/elf_scn.c:198:41: note: remove extraneous
parentheses around the comparison to silence this warning
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
     ~                                  ^             ~
/usr/src/lib/libelf/elf_scn.c:198:41: note: use '=3D' to turn this
equality comparison into an assignment
 if (((&e->e_u.e_elf.e_scn)->stqh_first =3D=3D ((void *)0))) {
                                        ^~
                                        =3D
1 error generated.
*** [elf_scn.o] Error code 1
In file included from /usr/src/lib/libelf/elf_update.c:1:
/usr/src/lib/libelf/elf_update.c:570:32: error: equality comparison
with extraneous parentheses [-Werror,-Wparentheses-equality]
 if (((&s->s_data)->stqh_first =3D=3D ((void *)0))) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/usr/src/lib/libelf/elf_update.c:570:32: note: remove extraneous
parentheses around the comparison to silence this warning
 if (((&s->s_data)->stqh_first =3D=3D ((void *)0))) {
     ~                         ^             ~
/usr/src/lib/libelf/elf_update.c:570:32: note: use '=3D' to turn this
equality comparison into an assignment
 if (((&s->s_data)->stqh_first =3D=3D ((void *)0))) {
                               ^~
                               =3D
1 error generated.
*** [elf_update.o] Error code 1



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