efi_cc = get_option('efi-cc')
efi_ld = get_option('efi-ld')
-efi_objcopy = get_option('efi-objcopy')
efi_ldsdir = get_option('efi-ldsdir')
efi_incdir = get_option('efi-includedir')
generate_sbat,
'@OUTPUT@',
'--cc', efi_cc,
- '--objcopy', efi_objcopy,
+ '--objcopy', objcopy,
'--project-name', meson.project_name(),
'--project-version', meson.project_version(),
'--sbat-version', '1',
'@INPUT@', '@OUTPUT@',
'--arch', gnu_efi_arch,
'--os', host_machine.system(),
- '--objcopy', efi_objcopy,
+ '--objcopy', objcopy,
'--genpeimg', genpeimg.found() ? genpeimg : ''
],
install : true,
dbg = custom_target('efi_debug',
input : so,
output : efi_name + '.debug',
- command : [efi_objcopy,
+ command : [objcopy,
'-j', '.text',
'-j', '.sdata',
'-j', '.data',
)
cc = meson.get_compiler('c')
+objcopy = find_program('objcopy')
prefix = get_option('prefix')
libdir = join_paths(prefix, get_option('libdir'))
option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules')
option('efi-ld', type : 'string', value : 'ld', description : 'the linker to use for EFI modules')
-option('efi-objcopy', type : 'string', value : 'objcopy', description : 'the objcopy utility to use for EFI modules')
option('efi-libdir', type : 'string', description : 'path to the EFI lib directory')
option('efi-ldsdir', type : 'string', description : 'path to the EFI lds directory')
option('efi-includedir', type : 'string', value : '/usr/include/efi', description : 'path to the EFI header directory')