diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-09-20 04:51:41 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-09-20 04:51:41 -0400 |
commit | 46fe624223cfe62fb6c2fbb609be42f2f1d1734b (patch) | |
tree | d0a72f17636f6bf310485222c653234b87f46375 /libsandbox | |
parent | sandbox.conf: allow writing to /dev/ptmx (diff) | |
download | sandbox-46fe624223cfe62fb6c2fbb609be42f2f1d1734b.tar.gz sandbox-46fe624223cfe62fb6c2fbb609be42f2f1d1734b.tar.bz2 sandbox-46fe624223cfe62fb6c2fbb609be42f2f1d1734b.zip |
libsandbox: rework abi syscall header generation
Probe the availability of multilib headers at configure time so that we
can show the status more cleanly. This allows the header generation to
be done in parallel and not output confusing warning messages to users.
URL: https://bugs.gentoo.org/536582
Reported-by: cmue81@gmx.de
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libsandbox')
-rw-r--r-- | libsandbox/Makefile.am | 19 | ||||
-rw-r--r-- | libsandbox/trace/linux/x86_64.c | 6 |
2 files changed, 18 insertions, 7 deletions
diff --git a/libsandbox/Makefile.am b/libsandbox/Makefile.am index 529d835..cbc73ba 100644 --- a/libsandbox/Makefile.am +++ b/libsandbox/Makefile.am @@ -70,18 +70,23 @@ TRACE_MAKE_HEADER = \ $(SB_AWK) $(GEN_TRACE_SCRIPT) -v MODE=gen | \ $(COMPILE) -E -P -include $(top_srcdir)/headers.h - $$f | \ $(SB_AWK) $(GEN_TRACE_SCRIPT) -v syscall_prefix=$$t > $$header -trace_syscalls.h: $(GEN_TRACE_SCRIPT) Makefile +trace_syscalls.h: $(GEN_TRACE_SCRIPT) $(SB_SCHIZO_HEADERS) if SB_SCHIZO + $(AM_V_GEN)touch $@ +else + $(AM_V_GEN)t= f= header=$@; $(TRACE_MAKE_HEADER) +endif + +$(SB_SCHIZO_HEADERS): $(GEN_TRACE_SCRIPT) $(AM_V_GEN)for pers in $(SB_SCHIZO_SETTINGS) ; do \ t=_$${pers%:*}; \ f=$${pers#*:}; \ - header=trace_syscalls$${t}.h; \ - $(TRACE_MAKE_HEADER) || exit $$?; \ + header="trace_syscalls$${t}.h"; \ + if [ "$$header" = "$@" ]; then \ + $(TRACE_MAKE_HEADER) || exit $$?; \ + break; \ + fi; \ done - @touch $@ -else - $(AM_V_GEN)t= f= header=$@; $(TRACE_MAKE_HEADER) -endif EXTRA_DIST = $(SYMBOLS_FILE) $(SYMBOLS_WRAPPERS) $(SB_NR_FILE) $(TRACE_FILES) headers.h diff --git a/libsandbox/trace/linux/x86_64.c b/libsandbox/trace/linux/x86_64.c index 5bd1361..82c492d 100644 --- a/libsandbox/trace/linux/x86_64.c +++ b/libsandbox/trace/linux/x86_64.c @@ -4,21 +4,27 @@ #ifdef SB_SCHIZO static const struct syscall_entry syscall_table_32[] = { +#ifdef SB_SCHIZO_x86 #define S(s) { SB_SYS_x86_##s, SB_NR_##s, #s }, #include "trace_syscalls_x86.h" #undef S +#endif { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_64[] = { +#ifdef SB_SCHIZO_x86_64 #define S(s) { SB_SYS_x86_64_##s, SB_NR_##s, #s }, #include "trace_syscalls_x86_64.h" #undef S +#endif { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; static const struct syscall_entry syscall_table_x32[] = { +#ifdef SB_SCHIZO_x32 #define S(s) { SB_SYS_x32_##s, SB_NR_##s, #s }, #include "trace_syscalls_x32.h" #undef S +#endif { SB_NR_UNDEF, SB_NR_UNDEF, NULL }, }; |