Commit Graph

13 Commits

Author SHA1 Message Date
Ariel Abreu
23f90472c3
Temporary workaround to build with Clang
This is only temporary so I can build everything for testing purposes; I'll look into removing the usage of blocks so we can use GCC later
2020-09-17 07:26:34 -04:00
Ariel Abreu
8f105c7be5
It compiles! (with Clang); plus: Makefile overhaul
All the files that were building with the previous version of XNU are now building again (with Clang), however, the module does not link yet (due to missing symbols; *lots* of them). A lot of them are probably new additions to XNU, but some of them are probably from me not knowing the `ifdef` certain things that should be.

Also, I completely overhauled the Makefile to make it simpler to manage settings and flags across files, folders, modules, and Linux/KBuild versions. I didn't add this feature (because I don't need it yet), but it can be easily extended to easily allow per-compiler flags

Full list of all missing symbols reported by `MODPOST`:

task_is_driver
thread_get_state_to_user
machine_exception
catch_mach_exception_raise_state_identity
turnstile_has_waiters
mach_vm_allocate_kernel
processor_start_from_user
catch_mach_exception_raise_state
task_violated_guard
hw_atomic_test_and_set32
task_is_importance_donor
catch_mach_exception_raise
ipc_importance_task_reference
work_interval_port_notify
random_bool_init
os_ref_retain_try_internal
mach_zone_info_for_zone
processor_exit_from_user
pqueue_pair_meld
mach_vm_page_range_query
turnstile_complete
mach_vm_wire_external
mach_vm_allocate_external
vm_allocate_kernel
ux_handler_init
uext_server
turnstile_waitq_add_thread_priority_queue
thread_depress_abort_from_user
turnstile_deallocate
_Block_object_assign
turnstile_cleanup
turnstile_kernel_update_inheritor_on_wake_locked
_pthread_priority_normalize_for_ipc
filt_ipc_kqueue_turnstile
lck_spin_assert
IOTaskHasEntitlement
thread_get_requested_qos
task_watchport_elem_deallocate
os_ref_init_count_internal
lck_mtx_lock_spin_always
turnstile_update_inheritor_complete
task_inspect
thread_bootstrap_return
thread_setstatus_from_user
turnstile_recompute_priority_locked
mach_vm_remap_external
zone_require
thread_getstatus_to_user
turnstile_hash_bucket_unlock
_NSConcreteGlobalBlock
filt_machport_kqueue_has_turnstile
mach_continuous_time
ipc_importance_init
turnstile_update_inheritor_locked
turnstile_alloc
ipc_importance_send
ipc_importance_thread_call_init
bank_get_bank_ledger_thread_group_and_persona
turnstile_hash_bucket_lock
filt_machport_turnstile_prepare_lazily
turnstile_deallocate_safe
os_ref_release_barrier_internal
turnstile_reference
vm_map_wire_kernel
thread_deallocate_safe
turnstile_stats_update
thread_set_pending_block_hint
task_info_from_user
thread_inspect_deallocate
catch_exc_subsystem
ux_handler_stop
lck_mtx_assert
mach_vm_map_external
filt_machport_stash_port
ipc_importance_task_hold_internal_assertion
lck_spin_lock_grp
_Block_object_dispose
ipc_importance_check_circularity
task_restartable_subsystem
ipc_importance_task_drop_internal_assertion
random_bool_gen_bits
turnstile_update_inheritor
lck_spin_try_lock_grp
ipc_importance_task_release
kdp_lck_spin_is_acquired
ipc_importance_receive
os_ref_retain_internal
task_inspect_deallocate
_NSConcreteStackBlock
task_get_exc_guard_behavior
pid_from_task
sched_thread_unpromote_reason
memory_entry_subsystem
turnstile_prepare
act_get_state_to_user
sched_thread_promote_reason
task_set_exc_guard_behavior
ipc_importance_task_is_any_receiver_type
knote_vanish
thread_user_promotion_qos_for_pri
2020-09-08 10:06:49 -04:00
Lubos Dolezel
9cf6c731ed Add proper dependency on rtsig.h in case someone builds LKM first 2020-05-14 18:46:33 +02:00
Sergey Bugaev
93d84b67fb Disable xtrace-mig for the LKM copes of .defs 2020-02-10 00:58:36 +03:00
Sergey Bugaev
411a75a94c Don't try to process nonexistent .defs 2020-02-10 00:58:36 +03:00
Lubos Dolezel
9cebd37e05 Resolve many missing symbols 2020-01-16 17:04:03 +01:00
Lubos Dolezel
33efcd5064 Merge commit '89c3484' into xnu-upgrade 2020-01-16 09:32:05 +01:00
Andrew Hyatt
236d38f832 Remove darling-mach.mod.o with every build
darlinghq/darling#382
2018-12-17 15:20:47 -05:00
Lubos Dolezel
e32f8a325e More work on build 2017-07-13 23:55:14 +02:00
Lubos Dolezel
b991929d79 A bit more work on getting this compile 2017-07-13 22:50:17 +02:00
Lubos Dolezel
850e7488d5 Add lkm_generate target that can be used with DKIM 2017-07-10 20:40:59 +02:00
Lubos Dolezel
c5642ffefb Fix 'make lkm_install' 2017-04-07 21:06:03 +02:00
Lubos Dolezel
8326c4afaa Get rid of miggen subdir, use CMake 2017-04-07 18:21:29 +02:00