public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/fw/builtin-syscalls-3] build-many-glibcs.py: Add update-syscalls command Date: Thu, 12 Dec 2019 08:41:00 -0000 [thread overview] Message-ID: <20191212084106.46436.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c36c2c43fe850f7bbc505bc8ca64f062a6e1a4e0 commit c36c2c43fe850f7bbc505bc8ca64f062a6e1a4e0 Author: Florian Weimer <fweimer@redhat.com> Date: Wed Dec 11 19:55:20 2019 +0100 build-many-glibcs.py: Add update-syscalls command This command should use a temporary Linux tree as well, which is currently missing. Diff: --- scripts/build-many-glibcs.py | 49 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index b7edbb6..f2b940f 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -488,7 +488,10 @@ class Context(object): old_components = ('gmp', 'mpfr', 'mpc', 'binutils', 'gcc', 'linux', 'mig', 'gnumach', 'hurd') old_versions = self.build_state['compilers']['build-versions'] - self.build_glibcs(configs) + if action == 'update-syscalls': + self.update_syscalls(configs) + else: + self.build_glibcs(configs) self.write_files() self.do_build() if configs: @@ -679,6 +682,15 @@ class Context(object): for c in configs: self.glibc_configs[c].build() + def update_syscalls(self, configs): + """Update the glibc syscall lists.""" + if not configs: + self.remove_dirs(os.path.join(self.builddir, 'syscalls')) + self.remove_dirs(os.path.join(self.logsdir, 'syscalls')) + configs = sorted(self.glibc_configs.keys()) + for c in configs: + self.glibc_configs[c].for_syscalls().update_syscalls() + def load_versions_json(self): """Load information about source directory versions.""" if not os.access(self.versions_json, os.F_OK): @@ -911,7 +923,7 @@ class Context(object): self.build_state = json.load(f) else: self.build_state = {} - for k in ('host-libraries', 'compilers', 'glibcs'): + for k in ('host-libraries', 'compilers', 'glibcs', 'update-syscalls'): if k not in self.build_state: self.build_state[k] = {} if 'build-time' not in self.build_state[k]: @@ -1408,6 +1420,12 @@ class GlibcBase(abc.ABC): self.cfg = cfg self.ccopts = ccopts + def for_syscalls(self): + """Return the system call updater for this configuration.""" + return GlibcForSyscalls(compiler=self.compiler, arch=self.arch, + os_name=self.os, variant=self.variant, + cfg=self.cfg, ccopts=self.ccopts) + def tool_name(self, tool): """Return the name of a cross-compilation tool.""" ctool = '%s-%s' % (self.compiler.triplet, tool) @@ -1516,6 +1534,30 @@ class Glibc(GlibcBase): cmdlist.add_command('save-logs', [self.ctx.save_logs], always_run=True) +class GlibcForSyscalls(GlibcBase): + def builddir(self): + return self.ctx.component_builddir('syscalls', self.name, 'glibc') + + def installdir(self): + raise RuntimeError("Installation not supported") + + def update_syscalls(self): + """Run make update-syscall-lists for this glibc configuraton.""" + logsdir = os.path.join(self.ctx.logsdir, 'syscalls', self.name) + self.ctx.remove_recreate_dirs(self.builddir(), logsdir) + cmdlist = CommandList('syscalls-%s' % self.name, self.ctx.keep) + cmdlist.add_command('check-compilers', + ['test', '-f', + os.path.join(self.compiler.installdir, 'ok')]) + cmdlist.use_path(self.compiler.bindir) + + cmdlist.create_use_dir(self.builddir()) + cmdlist.add_command('configure', self.configure_command()) + cmdlist.add_command('build', ['make', 'update-syscall-lists']) + cmdlist.cleanup_dir() + self.ctx.add_makefile_cmdlist('syscalls-%s' % self.name, cmdlist, + logsdir) + class Command(object): """A command run in the build process.""" @@ -1682,7 +1724,8 @@ def get_parser(): parser.add_argument('action', help='What to do', choices=('checkout', 'bot-cycle', 'bot', - 'host-libraries', 'compilers', 'glibcs')) + 'host-libraries', 'compilers', 'glibcs', + 'update-syscalls')) parser.add_argument('configs', help='Versions to check out or configurations to build', nargs='*')
reply other threads:[~2019-12-12 8:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20191212084106.46436.qmail@sourceware.org \ --to=fw@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).