Dang, vladimir1986, you've exceeded my personal knowledge base
I downloaded and built the virtualbox-kernel package without any errors.
Worse, there were no instances of -Werror in any of the virtualbox-kernel Makefiles.
Maybe you could find the -Werror in the Makefiles and modify the already-existing sed command in the Slackbuild ?
[EDIT] I just noticed that virtualbox-kernel.SlackBuild does not set CFLAGS, CCFLAGS or SLKFLAGS.
Nor does it invoke a configure script.
I suppose you'll have to `sed` the Makefiles to eliminate the -Werror Args ...
[/EDIT]
-- kjh
Code:
# get into the SBo source dir
#
cd /tmp/SBo/virtualbox-kernel-5.0.14
#
# find the Makefiles
#
find -type f -iname "Makefile*"
./vboxdrv/Makefile
./vboxnetflt/Makefile
./vboxpci/Makefile
./vboxnetadp/Makefile
./Makefile
#
# look for -Werror in the Makefiles
#
grep -- -Werror $(find . -type f -iname Makefile)
<<no output>>
#
# look for -W in the Makefiles
#
grep -- -W $(find . -type f -iname Makefile)
./vboxdrv/Makefile: -Wno-declaration-after-statement
./vboxnetflt/Makefile: -Wno-declaration-after-statement
./vboxnetadp/Makefile: -Wno-declaration-after-statement