I've been trying to compile the latest Linux v4.8.9 kernel on Ubuntu 16.10 and this error keeps popping up after I've made the default .config, modified it with menuconfig and ran make by itself. I've also run make mrproper as soon as I untarred the file. This is the output right after I run make:
scripts/kconfig/conf --silentoldconfig Kconfig
kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
Kbuild:45: recipe for target 'kernel/bounds.s' failed
make: *** [kernel/bounds.s] Error 1
Makefile:1015: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
I've also tried compiling with the -no-pie option after the make command but it renders a set of new errors, constantly saying that there are "missing targets". I have gcc version 6.2.0. I also have gcc-5 installed because I assumed in the beginning it might be because gcc was too new but the same problem persists in gcc-5. Someone in the mailing lists or another forum mentioned that the problem was resolved by directly cloning from git but that didn't help in my scenario either.
I'm curious if anyone else has run into this problem and if so, what a possible fix might be?
NOTE:I'm running Ubuntu in Virtualbox on a Mac if that might be a possible source of problems.