Re: Unable to buildworld with ccache
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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)