2016-11-14 Joseph Myers <joseph@codesourcery.com>
+ * scripts/build-many-glibcs.py (os.path): Do not import.
+ (Context): Inherit explicitly from object. Remove blank line
+ between class and docstring.
+ (Config): Likewise.
+ (Glibc): Likewise.
+ (Command): Likewise.
+ (CommandList): Likewise.
+ (Context.write_files): Store chmod mode in a variable.
+
* sysdeps/unix/sysv/linux/tile/tilegx/configure.ac: Use
LIBC_SLIBDIR_RTLDDIR for tilegx32.
* sysdeps/unix/sysv/linux/tile/tilegx/configure: Regenerated.
import argparse
import os
-import os.path
import re
import shutil
import stat
import urllib.request
-class Context:
-
+class Context(object):
"""The global state associated with builds in a given directory."""
def __init__(self, topdir, parallelism, keep, action):
'record_status PASS\n')
with open(self.wrapper, 'w') as f:
f.write(wrapper_text)
- os.chmod(self.wrapper,
- (stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|
- stat.S_IROTH|stat.S_IXOTH))
+ # Mode 0o755.
+ mode_exec = (stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|
+ stat.S_IROTH|stat.S_IXOTH)
+ os.chmod(self.wrapper, mode_exec)
save_logs_text = (
'#!/bin/sh\n'
'if ! [ -f tests.sum ]; then\n'
'done\n')
with open(self.save_logs, 'w') as f:
f.write(save_logs_text)
- os.chmod(self.save_logs,
- (stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|
- stat.S_IROTH|stat.S_IXOTH))
+ os.chmod(self.save_logs, mode_exec)
def do_build(self):
"""Do the actual build."""
os.remove(filename)
-class Config:
-
+class Config(object):
"""A configuration for building a compiler and associated libraries."""
def __init__(self, ctx, arch, os_name, variant=None, gcc_cfg=None,
self.build_cross_tool(cmdlist, 'gcc', tool_build, cfg_opts)
-class Glibc:
-
+class Glibc(object):
"""A configuration for building glibc."""
def __init__(self, compiler, arch=None, os_name=None, variant=None,
cmdlist.cleanup_dir()
-class Command:
-
+class Command(object):
"""A command run in the build process."""
def __init__(self, desc, num, dir, path, command, always_run=False):
return self.shell_make_quote_list(self.command, True)
-class CommandList:
-
+class CommandList(object):
"""A list of commands run in the build process."""
def __init__(self, desc, keep):