mpers: skip xlat struct definitions in mpers mode

Avoid duplicate definitions of xlat structures in files
compiled in mpers mode.

Each xlat file defines the corresponding xlat struct with
either global or local visibility using the following rules:

- if xlat struct declaration is available in defs.h,
  a global definition is provided in regular mode,
  and nothing is provided in mpers mode;
- otherwise, if xlat file is included by a mpers source file,
  a global definition is provided in regular mode
  (unless no mpers mode is supported on this architecture,
  in that case, a local definition is provided instead),
  and a declaration is provided in mpers mode;
- otherwise, a local definition is provided in regular mode,
  and an error message is printed in mpers mode.

Fallback definitions of constants provided by xlat files
remain available in all modes.

* bootstrap: Invoke generate_mpers_am.sh before xlat/gen.sh.
* defs.h (adjtimex_modes, adjtimex_status, sigev_value): Remove.
* generate_mpers_am.sh: Generate mpers_xlat.h.
* Makefile.am (EXTRA_DIST): Add mpers_xlat.h.
* print_sigevent.c: Include "xlat/sigev_value.h" unconditionally.
* print_timex.c: Include "xlat/adjtimex_modes.h" and
"xlat/adjtimex_status.h" unconditionally.
* xlat/gen.sh (cond_xlat): Move printing of fallback definitions ...
(cond_def): ... here.
(gen_header): Check also mpers_xlat.h for global declarations
of xlat structures.
Process input file twice, first time print directives
only, second time print everything.
Wrap struct xlat into #ifdef IN_MPERS ... #else ... #endif.
* xlat/getrandom_flags.in: Cleanup.
8 files changed
tree: 2b5533835f94526329c64c6cfe50eede8735a034
  1. debian/
  2. linux/
  3. m4/
  4. maint/
  5. qemu_multiarch_testing/
  6. test/
  7. tests/
  8. xlat/
  9. .gitignore
  10. .mailmap
  11. access.c
  12. affinity.c
  13. aio.c
  14. AUTHORS
  15. bjm.c
  16. block.c
  17. bootstrap
  18. bpf.c
  19. build_static_example.sh
  20. cacheflush.c
  21. capability.c
  22. caps0.h
  23. caps1.h
  24. ChangeLog-CVS
  25. chdir.c
  26. chmod.c
  27. clone.c
  28. configure.ac
  29. COPYING
  30. count.c
  31. CREDITS.in
  32. defs.h
  33. desc.c
  34. dirent.c
  35. dirent64.c
  36. empty.h
  37. epoll.c
  38. errnoent.sh
  39. evdev.c
  40. eventfd.c
  41. execve.c
  42. exit.c
  43. fadvise.c
  44. fallocate.c
  45. fanotify.c
  46. fchownat.c
  47. fcntl.c
  48. fetch_seccomp_fprog.c
  49. file.c
  50. flock.c
  51. futex.c
  52. generate_mpers_am.sh
  53. generate_sen.sh
  54. generate_xlat_in.sh
  55. get_robust_list.c
  56. getcpu.c
  57. getcwd.c
  58. getrandom.c
  59. git-set-file-times
  60. git-version-gen
  61. gitlog-to-changelog
  62. HACKING-scripts
  63. hostname.c
  64. inotify.c
  65. INSTALL
  66. io.c
  67. ioctl.c
  68. ioctlsort.c
  69. ioprio.c
  70. ipc_defs.h
  71. ipc_msg.c
  72. ipc_msgctl.c
  73. ipc_sem.c
  74. ipc_shm.c
  75. ipc_shmctl.c
  76. kexec.c
  77. keyctl.c
  78. ldt.c
  79. link.c
  80. loop.c
  81. lseek.c
  82. make-dist
  83. Makefile.am
  84. mem.c
  85. membarrier.c
  86. memfd_create.c
  87. mknod.c
  88. mount.c
  89. mpers.awk
  90. mpers.sh
  91. mpers_test.sh
  92. mpers_type.h
  93. mq.c
  94. mtd.c
  95. native_defs.h
  96. net.c
  97. NEWS
  98. open.c
  99. or1k_atomic.c
  100. pathtrace.c
  101. perf.c
  102. personality.c
  103. poll.c
  104. prctl.c
  105. print_mq_attr.c
  106. print_msgbuf.c
  107. print_sigevent.c
  108. print_time.c
  109. print_timex.c
  110. printmode.c
  111. printrusage.c
  112. printsiginfo.c
  113. printsiginfo.h
  114. printstat.h
  115. process.c
  116. process_vm.c
  117. ptp.c
  118. ptrace.h
  119. quota.c
  120. readahead.c
  121. readlink.c
  122. README
  123. README-hacking
  124. README-linux-ptrace
  125. README-mpers
  126. reboot.c
  127. regs.h
  128. renameat.c
  129. resource.c
  130. rtc.c
  131. sched.c
  132. scsi.c
  133. seccomp.c
  134. seccomp_fprog.h
  135. sendfile.c
  136. sigaltstack.c
  137. signal.c
  138. signalent.sh
  139. signalfd.c
  140. sigreturn.c
  141. sock.c
  142. socketutils.c
  143. sram_alloc.c
  144. statfs.c
  145. strace-graph
  146. strace-log-merge
  147. strace.1
  148. strace.c
  149. strace.spec
  150. stream.c
  151. swapon.c
  152. sync_file_range.c
  153. syscall.c
  154. syscallent.sh
  155. sysctl.c
  156. sysinfo.c
  157. syslog.c
  158. sysmips.c
  159. term.c
  160. time.c
  161. times.c
  162. truncate.c
  163. uid.c
  164. uid16.c
  165. umask.c
  166. umount.c
  167. uname.c
  168. unwind.c
  169. userfaultfd.c
  170. util.c
  171. utime.c
  172. utimes.c
  173. v4l2.c
  174. vsprintf.c
  175. wait.c
  176. xattr.c
  177. xlate.el
  178. xmalloc.c