2
0

meson.build 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #
  2. # The main gdbstub still relies on per-build definitions of various
  3. # types. The bits pushed to system/user.c try to use guest agnostic
  4. # types such as hwaddr.
  5. #
  6. # We need to build the core gdb code via a library to be able to tweak
  7. # cflags so:
  8. gdb_user_ss = ss.source_set()
  9. gdb_system_ss = ss.source_set()
  10. # We build two versions of gdbstub, one for each mode
  11. gdb_user_ss.add(files('gdbstub.c', 'user.c'))
  12. gdb_system_ss.add(files('gdbstub.c', 'system.c'))
  13. gdb_user_ss = gdb_user_ss.apply({})
  14. gdb_system_ss = gdb_system_ss.apply({})
  15. libgdb_user = static_library('gdb_user',
  16. gdb_user_ss.sources() + genh,
  17. c_args: '-DCONFIG_USER_ONLY',
  18. build_by_default: false)
  19. libgdb_system = static_library('gdb_system',
  20. gdb_system_ss.sources() + genh,
  21. build_by_default: false)
  22. gdb_user = declare_dependency(objects: libgdb_user.extract_all_objects(recursive: false))
  23. user_ss.add(gdb_user)
  24. gdb_system = declare_dependency(objects: libgdb_system.extract_all_objects(recursive: false))
  25. system_ss.add(gdb_system)
  26. common_ss.add(files('syscalls.c'))
  27. # The user-target is specialised by the guest
  28. specific_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-target.c'))