crosstool-ng: update to crosstool-ng-1.24.0

Fix https://github.com/cirosantilli/linux-kernel-module-cheat/issues/68

Copy source tree into build dir since ./ctng started failing out of tree.
I give up.
This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-05-27 00:00:02 +00:00
parent 8eb312c58d
commit 48079d0843
4 changed files with 31 additions and 14 deletions

View File

@@ -16,20 +16,27 @@ Build crosstool-NG with Newlib for bare metal compilation
def build(self):
build_dir = self.get_build_dir()
defconfig_dest = os.path.join(self.env['crosstool_ng_util_dir'], 'defconfig')
os.makedirs(self.env['crosstool_ng_util_dir'], exist_ok=True)
defconfig_dest = os.path.join(self.env['crosstool_ng_source_copy_dir'], 'defconfig')
os.makedirs(self.env['crosstool_ng_download_dir'], exist_ok=True)
# Bootstrap out-ot-tree WONTFIX. I've tried.
# https://github.com/crosstool-ng/crosstool-ng/issues/1021
os.chdir(self.env['crosstool_ng_source_dir'])
self.sh.run_cmd(
[os.path.join(self.env['crosstool_ng_source_dir'], 'bootstrap'), LF],
#
# Then out-of-tree ./ctng usage also started to fail in 1.24.0.
#
# So instead of fighting upstream, I'll just take the Buildroot approach
# to life and rsync the entire source tree into the build tree. Fun times.
self.sh.copy_dir_if_update(
self.env['crosstool_ng_source_dir'],
self.env['crosstool_ng_source_copy_dir'],
)
os.chdir(self.env['crosstool_ng_source_copy_dir'])
self.sh.run_cmd(
[os.path.join(self.env['crosstool_ng_source_copy_dir'], 'bootstrap'), LF],
)
os.chdir(self.env['crosstool_ng_util_dir'])
self.sh.run_cmd(
[
os.path.join(self.env['crosstool_ng_source_dir'], 'configure'), LF,
os.path.join(self.env['crosstool_ng_source_copy_dir'], 'configure'), LF,
'--enable-local', LF,
],
)