The subject probably seems like a FAQ, but bear with me.
I'm trying to come up with a way to cross compile kernel/world on an older version of FreeBSD (12.1-R) that works on both 12.x and 13.x systems.
I'm in a situation where a newer version of LLVM emits a misleading indentation warning during kernel build, and because the -Werror option is added by the makefile it aborts the build process.
To avoid this I've tried (on a 12.3-R system)
1.
2.
3.
4. Adding NO_WERROR= and WERROR= to /etc/src.conf ... still includes -Werror
I can manually compile the single source file it complains about, but as this build process will be part of a HOWTO I'd prefer it to be less hacky. For the same reason, an edit of the source to fix the warning is not really viable.
I've spent some time on this and nothing seems to work. I think #3 is probably the best option as it bypasses only one specific warning, but perhaps += doesn't work on the commandline.
What am I missing? Thanks.
I'm trying to come up with a way to cross compile kernel/world on an older version of FreeBSD (12.1-R) that works on both 12.x and 13.x systems.
I'm in a situation where a newer version of LLVM emits a misleading indentation warning during kernel build, and because the -Werror option is added by the makefile it aborts the build process.
To avoid this I've tried (on a 12.3-R system)
1.
make -DWITHOUT_WARNS ...
(from src.conf(5)) ... still includes -Werror2.
make -DNO_WERROR ...
... still includes -Werror3.
make CFLAGS+=-Wno-misleading-indentation ...
but this clears CFLAGS, rather than appending (note I used "+="), so build quickly bombs out4. Adding NO_WERROR= and WERROR= to /etc/src.conf ... still includes -Werror
I can manually compile the single source file it complains about, but as this build process will be part of a HOWTO I'd prefer it to be less hacky. For the same reason, an edit of the source to fix the warning is not really viable.
I've spent some time on this and nothing seems to work. I think #3 is probably the best option as it bypasses only one specific warning, but perhaps += doesn't work on the commandline.
What am I missing? Thanks.