/[packages]/cauldron/virtualbox/current/SOURCES/VirtualBox-5.1.14-linux-4.9-buildfix.patch
ViewVC logotype

Contents of /cauldron/virtualbox/current/SOURCES/VirtualBox-5.1.14-linux-4.9-buildfix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1088176 - (show annotations) (download)
Tue Feb 28 17:26:22 2017 UTC (7 years, 1 month ago) by tmb
File size: 1272 byte(s)
- configure: don't compile the host/guest kernel modules as part of the
  normal build process if we detect Linux 4.9 or later (upstream)


1 Index: trunk/configure
2 ===================================================================
3 --- trunk/configure
4 +++ trunk/configure
5 @@ -1921,9 +1921,32 @@
6 else
7 if test_execute; then
8 - cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
9 - fi
10 - fi
11 -}
12 -
13 + cat > $ODIR.tmp_src.c << EOF
14 +#include <linux/version.h>
15 +int printf(const char *format, ...);
16 +int main(void)
17 +{
18 + return LINUX_VERSION_CODE > KERNEL_VERSION(4,8,0) ? 1 : 0;
19 +}
20 +EOF
21 + echo "compiling the following source file:" >> $LOG
22 + cat $ODIR.tmp_src.c >> $LOG
23 + echo "using the following command line:" >> $LOG
24 + echo "$CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include " \
25 + "-I$LINUX/include/generated/uapi" >> $LOG
26 + $CC -O -Wall -o $ODIR.tmp_out $ODIR.tmp_src.c -nostdinc -I$LINUX/include \
27 + -I$LINUX/include/generated/uapi >> $LOG 2>&1
28 + if [ $? -eq 0 ]; then
29 + $ODIR.tmp_out
30 + if [ $? -ne 0 ]; then
31 + cnf_append "VBOX_WITH_VBOXDRV" ""
32 + cnf_append "VBOX_WITH_ADDITION_DRIVERS" ""
33 + echo "Detected Linux >= 4.8 -- disabling compiling of Linux kernel modules."
34 + else
35 + cnf_append "VBOX_LINUX_SRC" "`cd $LINUX ; pwd`"
36 + fi
37 + fi
38 + fi
39 + fi
40 +}
41
42 #

  ViewVC Help
Powered by ViewVC 1.1.30