Sort the syscalls.mk files, give all generated files the same header.
No non-comment changes to the .S files. Change-Id: Iafcfd004c3ea92b64268f80ab16df615b97cefac
This commit is contained in:
@@ -4,7 +4,14 @@
|
||||
# the header files listing all available system calls, and the
|
||||
# makefiles used to build all the stubs.
|
||||
|
||||
import sys, os.path, glob, re, commands, filecmp, shutil
|
||||
import commands
|
||||
import filecmp
|
||||
import glob
|
||||
import os.path
|
||||
import re
|
||||
import shutil
|
||||
import stat
|
||||
import sys
|
||||
|
||||
from bionic_utils import *
|
||||
|
||||
@@ -13,6 +20,8 @@ bionic_libc_root = os.environ["ANDROID_BUILD_TOP"] + "/bionic/libc/"
|
||||
# temp directory where we store all intermediate files
|
||||
bionic_temp = "/tmp/bionic_gensyscalls/"
|
||||
|
||||
warning = "Generated by gensyscalls.py. Do not edit."
|
||||
|
||||
DRY_RUN = False
|
||||
|
||||
def make_dir(path):
|
||||
@@ -30,7 +39,8 @@ def create_file(relpath):
|
||||
return open(bionic_temp + relpath, "w")
|
||||
|
||||
|
||||
syscall_stub_header = """/* autogenerated by gensyscalls.py */
|
||||
syscall_stub_header = "/* " + warning + " */\n" + \
|
||||
"""
|
||||
#include <asm/unistd.h>
|
||||
#include <linux/err.h>
|
||||
#include <machine/asm.h>
|
||||
@@ -81,7 +91,8 @@ END(%(func)s)
|
||||
# MIPS assembler templates for each syscall stub
|
||||
#
|
||||
|
||||
mips_call = """/* autogenerated by gensyscalls.py */
|
||||
mips_call = "/* " + warning + " */\n" + \
|
||||
"""
|
||||
#include <asm/unistd.h>
|
||||
.text
|
||||
.globl %(func)s
|
||||
@@ -359,7 +370,7 @@ class State:
|
||||
glibc_syscalls_h_path = "include/sys/glibc-syscalls.h"
|
||||
D("generating " + glibc_syscalls_h_path)
|
||||
glibc_fp = create_file(glibc_syscalls_h_path)
|
||||
glibc_fp.write("/* Auto-generated by gensyscalls.py; do not edit. */\n")
|
||||
glibc_fp.write("/* %s */\n" % warning)
|
||||
glibc_fp.write("#ifndef _BIONIC_GLIBC_SYSCALLS_H_\n")
|
||||
glibc_fp.write("#define _BIONIC_GLIBC_SYSCALLS_H_\n")
|
||||
|
||||
@@ -383,9 +394,9 @@ class State:
|
||||
path = "arch-%s/syscalls.mk" % arch
|
||||
D("generating " + path)
|
||||
fp = create_file(path)
|
||||
fp.write("# Auto-generated by gensyscalls.py. Do not edit.\n")
|
||||
fp.write("# %s\n" % warning)
|
||||
fp.write("syscall_src :=\n")
|
||||
for syscall in self.syscalls:
|
||||
for syscall in sorted(self.syscalls, key=lambda syscall: syscall["func"]):
|
||||
if syscall.has_key("asm-%s" % arch):
|
||||
fp.write("syscall_src += arch-%s/syscalls/%s.S\n" % (arch, syscall["func"]))
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user