meson: Add support for SPARC assembly
authorDylan Baker <dylan@pnwbakers.com>
Thu, 7 Jun 2018 17:58:06 +0000 (10:58 -0700)
committerDylan Baker <dylan@pnwbakers.com>
Wed, 13 Jun 2018 17:06:25 +0000 (10:06 -0700)
This was blindly copied from autotools and tested by a helpful gentoo
user.

Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
meson.build
src/mapi/glapi/meson.build
src/mesa/meson.build

index 16866d77ed32cda90e23737796c9b6c623c8aa3d..c78d34098ffb801c6ddecc1a793a3f63dc45335c 100644 (file)
@@ -896,6 +896,11 @@ if with_asm
       with_asm_arch = 'aarch64'
       pre_args += ['-DUSE_AARCH64_ASM']
     endif
+  elif host_machine.cpu_family() == 'sparc64'
+    if system_has_kms_drm
+      with_asm_arch = 'sparc'
+      pre_args += ['-DUSE_SPARC_ASM']
+    endif
   endif
 endif
 
index e241d9ed388bca229a24626828f627f96b485a95..2509e19eaa3a3bed07febbefe4ba709113b5786f 100644 (file)
@@ -64,8 +64,9 @@ else
     static_glapi_files += glapi_x86_s
   elif with_asm_arch == 'x86_64'
     static_glapi_files += glapi_x86_64_s
+  elif with_asm_arch == 'sparc'
+    static_glapi_files += glapi_sparc_s
   endif
-  # TODO: SPARC asm
 endif
 
 libglapi_static = static_library(
index 24b5cc821ccc013165f0d8eae2f6f4173f4dbdce..8fb7db215c8f39212c07acbc596227682717453b 100644 (file)
@@ -649,8 +649,14 @@ if with_asm_arch == 'x86'
 elif with_asm_arch == 'x86_64'
   files_libmesa_common += files('x86-64/x86-64.h', 'x86-64/xform4.S')
   inc_libmesa_asm = include_directories('x86-64')
+elif with_asm_arch == 'sparc'
+  files_libmesa_common += files(
+    'sparc/sparc_clip.S',
+    'sparc/norm.S',
+    'sparc/xform.S',
+  )
+  inc_libmesa_asm = include_directories('sparc')
 endif
-# TODO: sparc
 
 format_fallback_c = custom_target(
   'format_fallback.c',