f31522130f
Build system (5 gaps hardened): - COOKBOOK_OFFLINE defaults to true (fork-mode) - normalize_patch handles diff -ruN format - New 'repo validate-patches' command (25/25 relibc patches) - 14 patched Qt/Wayland/display recipes added to protected list - relibc archive regenerated with current patch chain Boot fixes (fixable): - Full ISO EFI partition: 16 MiB → 1 MiB (matches mini, BIOS hardcoded 2 MiB offset) - D-Bus system bus: absolute /usr/bin/dbus-daemon path (was skipped) - redbear-sessiond: absolute /usr/bin/redbear-sessiond path (was skipped) - daemon framework: silenced spurious INIT_NOTIFY warnings for oneshot_async services (P0-daemon-silence-init-notify.patch) - udev-shim: demoted INIT_NOTIFY warning to INFO (expected for oneshot_async) - relibc: comprehensive named semaphores (sem_open/close/unlink) replacing upstream todo!() stubs - greeterd: Wayland socket timeout 15s → 30s (compositor DRM wait) - greeter-ui: built and linked (header guard unification, sem_compat stubs removed) - mc: un-ignored in both configs, fixed glib/libiconv/pcre2 transitive deps - greeter config: removed stale keymapd dependency from display/greeter services - prefix toolchain: relibc headers synced, _RELIBC_STDLIB_H guard unified Unfixable (diagnosed, upstream): - i2c-hidd: abort on no-I2C-hardware (QEMU) — process::exit → relibc abort - kded6/greeter-ui: page fault 0x8 — Qt library null deref - Thread panics fd != -1 — Rust std library on Redox - DHCP timeout / eth0 MAC — QEMU user-mode networking - hwrngd/thermald — no hardware RNG/thermal in VM - live preload allocation — BIOS memory fragmentation, continues on demand
144 lines
3.2 KiB
Meson
144 lines
3.2 KiB
Meson
prog_scan_sh = find_program('scan.sh')
|
|
|
|
libwayland = [
|
|
dependency('wayland-client'),
|
|
dependency('wayland-server'),
|
|
]
|
|
|
|
# Check that each protocol passes through the scanner
|
|
foreach protocol_file : protocol_files
|
|
protocol_path = join_paths(wayland_protocols_srcdir, protocol_file)
|
|
test_name = 'scan-@0@'.format(protocol_file.underscorify())
|
|
test(test_name, prog_scan_sh,
|
|
args: protocol_path,
|
|
env: [
|
|
'SCANNER=@0@'.format(prog_scanner.full_path()),
|
|
]
|
|
)
|
|
endforeach
|
|
|
|
# Check buildability
|
|
|
|
add_languages('c', 'cpp', native: false)
|
|
replace = find_program('replace.py')
|
|
|
|
extra_linker_flags = meson.get_compiler('c').get_supported_link_arguments([
|
|
'-Wl,--unresolved-symbols=ignore-all',
|
|
])
|
|
|
|
foreach protocol_file : protocol_files
|
|
xml_file = fs.name(protocol_file)
|
|
xml_components = xml_file.split('.')
|
|
protocol_base_file_name = xml_components[0]
|
|
|
|
protocol_path = files(join_paths(wayland_protocols_srcdir, protocol_file))
|
|
client_header_path = '@0@-client.h'.format(protocol_base_file_name)
|
|
server_header_path = '@0@-server.h'.format(protocol_base_file_name)
|
|
code_path = '@0@-code.c'.format(protocol_base_file_name)
|
|
client_header = custom_target(
|
|
client_header_path,
|
|
output: client_header_path,
|
|
input: protocol_path,
|
|
command: [
|
|
prog_scanner,
|
|
'--strict',
|
|
'client-header',
|
|
'@INPUT@',
|
|
'@OUTPUT@',
|
|
],
|
|
install: false,
|
|
)
|
|
server_header = custom_target(
|
|
server_header_path,
|
|
output: server_header_path,
|
|
input: protocol_path,
|
|
command: [
|
|
prog_scanner,
|
|
'--strict',
|
|
'server-header',
|
|
'@INPUT@',
|
|
'@OUTPUT@',
|
|
],
|
|
install: false,
|
|
)
|
|
code = custom_target(
|
|
code_path,
|
|
output: code_path,
|
|
input: protocol_path,
|
|
command: [
|
|
prog_scanner,
|
|
'--strict',
|
|
'private-code',
|
|
'@INPUT@',
|
|
'@OUTPUT@',
|
|
],
|
|
install: false,
|
|
)
|
|
|
|
replace_command = [
|
|
replace,
|
|
'@INPUT@',
|
|
'@OUTPUT@',
|
|
'PROTOCOL_CLIENT_INCLUDE_FILE',
|
|
client_header.full_path(),
|
|
'PROTOCOL_SERVER_INCLUDE_FILE',
|
|
server_header.full_path(),
|
|
]
|
|
|
|
# Check that header can be included by a pedantic C99 compiler
|
|
test_name = 'test-build-pedantic-@0@'.format(protocol_file.underscorify())
|
|
test_name_source = '@0@.c'.format(test_name)
|
|
test_source = custom_target(
|
|
test_name_source,
|
|
input: 'build-pedantic.c.in',
|
|
output: test_name_source,
|
|
command: replace_command,
|
|
)
|
|
pedantic_test_executable = executable(
|
|
test_name,
|
|
[
|
|
test_source,
|
|
client_header,
|
|
server_header,
|
|
code
|
|
],
|
|
link_args: extra_linker_flags,
|
|
dependencies: libwayland,
|
|
c_args: [
|
|
'-std=c99',
|
|
'-pedantic',
|
|
'-Wall',
|
|
'-Werror' ],
|
|
install: false,
|
|
)
|
|
test(test_name, pedantic_test_executable)
|
|
|
|
# Check that the header
|
|
if not protocol_file.contains('xdg-foreign-unstable-v1')
|
|
test_name = 'test-build-cxx-@0@'.format(protocol_file.underscorify())
|
|
test_name_source = '@0@.cc'.format(test_name)
|
|
test_source = custom_target(
|
|
test_name_source,
|
|
input: 'build-cxx.cc.in',
|
|
output: test_name_source,
|
|
command: replace_command,
|
|
)
|
|
cxx_test_executable = executable(
|
|
test_name,
|
|
[
|
|
test_source,
|
|
client_header,
|
|
server_header,
|
|
],
|
|
link_args: extra_linker_flags,
|
|
dependencies: libwayland,
|
|
cpp_args: [
|
|
'-Wall',
|
|
'-Werror',
|
|
],
|
|
install: false,
|
|
)
|
|
test(test_name, cxx_test_executable)
|
|
endif
|
|
endforeach
|