diff --git a/meson_options.txt b/meson_options.txt index 7b1f61bf46..92e8fadcc5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -278,9 +278,9 @@ option('dbus', type : 'combo', choices : ['auto', 'true', 'false'], option('gnu-efi', type : 'combo', choices : ['auto', 'true', 'false'], description : 'gnu-efi support for sd-boot') -option('efi-cc', type : 'string', value : 'gcc', +option('efi-cc', type : 'string', description : 'the compiler to use for EFI modules') -option('efi-ld', type : 'string', value : 'ld', +option('efi-ld', type : 'string', description : 'the linker to use for EFI modules') option('efi-libdir', type : 'string', description : 'path to the EFI lib directory') diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index c5509e73d1..39fbf7ec11 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -34,7 +34,13 @@ stub_sources = ''' if conf.get('ENABLE_EFI') == 1 and get_option('gnu-efi') != 'false' efi_cc = get_option('efi-cc') + if efi_cc == '' + efi_cc = ' '.join(cc.cmd_array()) + endif efi_ld = get_option('efi-ld') + if efi_ld == '' + efi_ld = find_program('ld', required: true) + endif efi_incdir = get_option('efi-includedir') gnu_efi_path_arch = ''