mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
userland: only link to lkmc.o if needed
This commit is contained in:
@@ -206,7 +206,7 @@ Default: build all examples that have their package dependencies met, e.g.:
|
||||
build_dir,
|
||||
dirpath_relative_root
|
||||
)
|
||||
common_objs_dir = [common_obj]
|
||||
common_objs_dir = []
|
||||
cc_flags_after = []
|
||||
cc_flags_dir = cc_flags.copy()
|
||||
if dirpath_relative_root_components_len > 0:
|
||||
@@ -270,12 +270,15 @@ Default: build all examples that have their package dependencies met, e.g.:
|
||||
))
|
||||
if my_path_properties['pedantic']:
|
||||
cc_flags_file.extend(['-pedantic', LF])
|
||||
common_objs_file = common_objs_dir.copy()
|
||||
if my_path_properties['lkmc_common_obj']:
|
||||
common_objs_file.append(common_obj)
|
||||
error = thread_pool.submit({
|
||||
'c_std': my_path_properties['c_std'],
|
||||
'cc_flags': cc_flags_file + my_path_properties['cc_flags'],
|
||||
'cc_flags_after': cc_flags_after,
|
||||
'cxx_std': my_path_properties['cxx_std'],
|
||||
'extra_objs': common_objs_dir,
|
||||
'extra_objs': common_objs_file,
|
||||
'in_path': in_path,
|
||||
'out_path': self.resolve_userland_executable(in_path),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user