diff --git a/efi/meson.build b/efi/meson.build index eb31a5c..2e75cb1 100644 --- a/efi/meson.build +++ b/efi/meson.build @@ -311,11 +311,16 @@ if efi_crtdir == join_paths(meson.current_build_dir(), 'crt0') fwupd_so_deps += [o_crt0] endif +efi_cc_ldflags = [] +foreach flag : efi_ldflags + efi_cc_ldflags += ['-Wl,' + flag] +endforeach + so = custom_target('fwup.so', input : o_files, output : 'fwup.so', - command : [ld, '-o', '@OUTPUT@'] + - efi_ldflags + ['@INPUT@'] + + command : [cc.cmd_array(), '-nostdlib', '-o', '@OUTPUT@'] + + efi_cc_ldflags + ['@INPUT@'] + ['-lefi', '-lgnuefi', libgcc_file_name], depends: fwupd_so_deps) diff --git a/meson.build b/meson.build index 163f986..906575b 100644 --- a/meson.build +++ b/meson.build @@ -9,7 +9,6 @@ conf = configuration_data() conf.set_quoted('PACKAGE_VERSION', meson.project_version()) cc = meson.get_compiler('c') -ld = cc.get_linker_id() objcopy = find_program('objcopy') objcopy_version = run_command(objcopy, '--version', check: true).stdout().split('\n')[0].split(' ')[-1]