build: use just gcc instead of x86_64-linux-gnu-gcc when host arch == target arch and --gcc-which host

This is particularly important to easily build userland content on host,
as different distros will have different prefixes as mentioned at:
https://github.com/cirosantilli/linux-kernel-module-cheat/issues/66
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-21 00:00:00 +00:00
parent 635e5e3133
commit 878eb0ad98
3 changed files with 11 additions and 4 deletions

View File

@@ -102,7 +102,7 @@ Run `make modules_install` after `make`.
'make', LF,
'-j', str(self.env['nproc']), LF,
'ARCH={}'.format(self.env['linux_arch']), LF,
'CROSS_COMPILE={}-'.format(self.env['toolchain_prefix']), LF,
'CROSS_COMPILE={}'.format(self.env['toolchain_prefix_dash']), LF,
'CC={}'.format(cc), LF,
'O={}'.format(build_dir), LF,
] + verbose