Skip to content

Commit

Permalink
Modify to use cc as ld
Browse files Browse the repository at this point in the history
  • Loading branch information
dataCobra authored and superm1 committed Feb 15, 2024
1 parent 9485b04 commit e4a4611
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 7 additions & 2 deletions efi/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit e4a4611

Please sign in to comment.