Date: Fri, 28 Aug 2020 15:09:36 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Adrian Chadd <adrian.chadd@gmail.com> Cc: src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>, svn-src-head <svn-src-head@freebsd.org> Subject: Re: svn commit: r364091 - head/lib/libc/gen Message-ID: <20200828120936.GC2713@kib.kiev.ua> In-Reply-To: <CAJ-VmomUXc=xwyKYGy1panEZWCMqdjCj2ZyKro2igf47T9u8FQ@mail.gmail.com> References: <202008102141.07ALfnDj009838@repo.freebsd.org> <CAJ-VmomUXc=xwyKYGy1panEZWCMqdjCj2ZyKro2igf47T9u8FQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 27, 2020 at 05:28:03PM -0700, Adrian Chadd wrote:
> Hi!
>
> This breaks when compiling FreeBSD-mips on GCC-9. :(
>
> In file included from
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:50,
> from
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir_b.c:29:
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2:
> error: anonymous struct declared inside parameter list will not be visible
> outside of this definition or declarati
> 45 | struct {\
> | ^~~~~~
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:67:5:
> note: in expansion of macro 'DECLARE_BLOCK'
> 67 | DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct
> dirent **))
> | ^~~~~~~~~~~~~
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/include/block_abi.h:45:2:
> error: anonymous struct declared inside parameter list will not be visible
> outside of this definition or declarati
> 45 | struct {\
> | ^~~~~~
> /usr/home/adrian/work/freebsd/head-embedded/src/lib/libc/gen/scandir.c:66:5:
> note: in expansion of macro 'DECLARE_BLOCK'
> 66 | DECLARE_BLOCK(int, select, const struct dirent *),
> | ^~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> --- scandir_b.o ---
> *** [scandir_b.o] Error code 1
You did not show the exact command line for your compilation failure.
Since gcc does not support blocks, I think the best route is to add
something like the following to lib/libc/gen/Makefile.inc:
CWARNFLAGS.gcc.scandir_b.c= -Wno-error
(I did not even tried to test it).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200828120936.GC2713>
