Merge branch 'fix-meson-arch' into 'master'

Fix Meson build for ARM and PPC

See merge request glvnd/libglvnd!209
This commit is contained in:
Matt Turner 2019-12-06 17:11:17 +00:00
commit f45587842f
2 changed files with 5 additions and 5 deletions

View file

@ -55,7 +55,7 @@ if not with_asm.disabled()
add_project_arguments('-DUSE_ARMV7_ASM', language : 'c')
elif host_machine.cpu_family() == 'aarch64'
add_project_arguments('-DUSE_AARCH64_ASM', language : 'c')
elif host_machine.cpu_family() == 'ppc' and host_machine.endian() == 'little'
elif host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
add_project_arguments('-DUSE_PPC64LE_ASM', language : 'c')
elif with_asm.enabled()
error('No ASM available for @0@ (@1@ endian)'.format(host_machine.system(), host_machine.endian()))
@ -118,10 +118,10 @@ if use_asm
elif host_machine.cpu_family() == 'aarch64'
gl_dispatch_type = 'aarch64_tsd'
elif host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
gl_dispatch_type = 'ppc64le_@1@'.format(have_tls ? 'tls' : 'tsd')
gl_dispatch_type = 'ppc64le_@0@'.format(have_tls ? 'tls' : 'tsd')
endif
endif
add_project_arguments('-DGLDISPATCH_TYPE_@0@'.format(gl_dispatch_type.to_upper()), language : ['c'])
message('Using dispatch stub type: @0@'.format(gl_dispatch_type))
if cc.has_function_attribute('constructor')
add_project_arguments('-DUSE_ATTRIBUTE_CONSTRUCTOR', language : ['c'])

View file

@ -55,9 +55,9 @@ else
elif gl_dispatch_type == 'aarch64_tsd'
_entry_files += 'entry_aarch64_tsd.c'
elif gl_dispatch_type == 'ppc64le_tls'
_entry_files += 'entry_aarch64_tls.c'
_entry_files += 'entry_ppc64le_tls.c'
elif gl_dispatch_type == 'ppc64le_tsd'
_entry_files += 'entry_aarch64_tsd.c'
_entry_files += 'entry_ppc64le_tsd.c'
else
error('No matching ASM file for @0@'.format(gl_dispatch_type))
endif