File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -257,6 +257,13 @@ objcopy = find_program('objcopy', required : false)
257257################################################################################
258258
259259if get_option (' efi' ).enabled()
260+ fs = import (' fs' )
261+
262+ efi_crt0_file = ' /usr/lib/crt0-efi-' + host_machine .cpu_family() + ' .o'
263+ if (not fs.is_file(efi_crt0_file))
264+ efi_crt0_file = ' /usr/lib64/crt0-efi-' + host_machine .cpu_family() + ' .o'
265+ endif
266+
260267 # https://wiki.osdev.org/GNU-EFI
261268 add_global_arguments ([
262269 ' -fno-stack-protector' ,
@@ -271,7 +278,7 @@ if get_option('efi').enabled()
271278 ' -shared' ,
272279 ' -Wl,-Bsymbolic' ,
273280 ' -T/usr/lib64/elf_' + host_machine .cpu_family() + ' _efi.lds' ,
274- ' /usr/lib64/crt0-efi- ' + host_machine .cpu_family() + ' .o ' ,
281+ efi_crt0_file ,
275282 ],
276283 language : ' c' )
277284
You can’t perform that action at this time.
0 commit comments