svn commit: r364091 - head/lib/libc/gen

Konstantin Belousov kostikbel at gmail.com
Fri Aug 28 12:09:51 UTC 2020


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).


More information about the svn-src-head mailing list