Skip to content

Commit

Permalink
build: Add missing flags for x86 asm support
Browse files Browse the repository at this point in the history
  • Loading branch information
amyspark committed Nov 13, 2024
1 parent 8c7008a commit 2a6ed6d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ cpp_lib = '-lstdc++'
libm_dep = cpp.find_library('m', required : false)
deps += [libm_dep]

# https://github.com/cisco/openh264/issues/2534
if cpu_family == 'x86'
c_args += ['-DX86_32_PICASM']
cpp_args += ['-DX86_32_PICASM']
asm_args += ['-DX86_32_PICASM']
endif

if ['linux', 'android', 'ios', 'darwin'].contains(system)
asm_format32 = 'elf'
asm_format64 = 'elf64'
Expand Down Expand Up @@ -195,11 +202,15 @@ subdir ('test')

libopenh264 = library('openh264',
link_whole: [libcommon, libprocessing, libencoder, libdecoder],
# failsafe for ASM relocations
c_link_args: cpp.get_supported_link_arguments(['-Wl,-Bsymbolic', '-Wl,-z,notext']),
install: true,
soversion: major_version,
version: meson.project_version(),
vs_module_defs: 'openh264.def',
dependencies: deps)
dependencies: deps,
pic: true
)

openh264_dep = declare_dependency(
link_with: libopenh264,
Expand Down

0 comments on commit 2a6ed6d

Please sign in to comment.