Index: meson/arch/sparc64/meson.build
===================================================================
--- meson/arch/sparc64/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ meson/arch/sparc64/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
@@ -0,0 +1,62 @@
+arch_uspace_c_args = [ '-D__BE__', '-m64', '-mcmodel=medlow', '-mhard-float', '-m' + QUADFLOAT + '-quad-float' ]
+
+if PROCESSOR == 'sun4v'
+	arch_uspace_c_args += [ '-mcpu=niagara', '-mno-vis' ]
+else
+	arch_uspace_c_args += [ '-mcpu=ultrasparc' ]
+endif
+
+if PROCESSOR == 'us' or PROCESSOR == 'us3'
+	arch_uspace_c_args += [ '-DSUN4U' ]
+elif PROCESSOR == 'sun4v'
+	arch_uspace_c_args += [ '-DSUN4V' ]
+else
+	error('Unknown PROCESSOR: ' + PROCESSOR)
+endif
+
+
+arch_kernel_c_args = [ '-D__BE__', '-m64', '-mcmodel=medlow', '-mcpu=ultrasparc', '-mno-fpu' ]
+
+if PROCESSOR == 'us'
+	arch_kernel_c_args += [
+		'-DUS',
+		'-DSUN4U',
+	]
+elif PROCESSOR == 'us3'
+	arch_kernel_c_args += [
+		'-DUS3',
+		'-DSUN4U',
+	]
+elif PROCESSOR == 'sun4v'
+	arch_kernel_c_args += [
+		'-DSUN4V',
+		#MH
+		'-DUS',
+	]
+endif
+
+
+arch_kernel_link_args = [ '-nostdlib', '-Wl,-no-check-sections' ]
+arch_uspace_link_args = [ '-nostdlib', '-lgcc' ]
+
+if PROCESSOR == 'sun4v'
+	arch_uspace_link_args += [ '-Wl,-z,max-page-size=0x2000' ]
+else
+	arch_uspace_link_args += [ '-Wl,-z,max-page-size=0x4000' ]
+endif
+
+
+if PROCESSOR == 'sun4v'
+	rd_essential += [
+		'drv/platform/sun4v',
+		'drv/char/sun4v-con',
+	]
+else
+	rd_essential += [
+		'drv/platform/sun4u',
+		'drv/bus/pci/pciintel',
+		'drv/bus/isa',
+		'drv/intctl/obio',
+		'drv/char/ns8250',
+	]
+endif
Index: meson/cross/sparc64
===================================================================
--- meson/cross/sparc64	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ meson/cross/sparc64	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
@@ -0,0 +1,26 @@
+# See http://mesonbuild.com/Cross-compilation.html
+
+[binaries]
+c = 'sparc64-helenos-gcc'
+cpp = 'sparc64-helenos-g++'
+ar = 'sparc64-helenos-ar'
+strip = 'sparc64-helenos-strip'
+nm = 'sparc64-helenos-nm'
+objcopy = 'sparc64-helenos-objcopy'
+objdump = 'sparc64-helenos-objdump'
+as = 'sparc64-helenos-as'
+ld = 'sparc64-helenos-ld'
+
+[properties]
+has_function_printf = true
+needs_exe_wrapper = true
+
+cc_arch = 'sparc64'
+h_arch = 'sparc64'
+bits = 64
+
+[host_machine]
+system = 'helenos'
+cpu_family = 'sparc64'
+cpu = 'sparc64'
+endian = 'big'
