Index: uspace/drv/meson.build
===================================================================
--- uspace/drv/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ uspace/drv/meson.build	(revision 5f176da24d28494c81340ae9aed9fb8d6d7a36fa)
@@ -64,5 +64,5 @@
 
 # sun4u driver won't compile on 32-bit targets
-if h_arch == 'sparc64'
+if UARCH == 'sparc64'
 	drvs += 'platform/sun4u'
 endif
Index: uspace/lib/c/arch/riscv64/Makefile.inc
===================================================================
--- uspace/lib/c/arch/riscv64/Makefile.inc	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#
-# Copyright (c) 2016 Martin Decky
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# - Redistributions of source code must retain the above copyright
-#   notice, this list of conditions and the following disclaimer.
-# - Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in the
-#   documentation and/or other materials provided with the distribution.
-# - The name of the author may not be used to endorse or promote products
-#   derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-
-ARCH_SOURCES = \
-	arch/$(UARCH)/src/entryjmp.c \
-	arch/$(UARCH)/src/thread_entry.c \
-	arch/$(UARCH)/src/fibril.c \
-	arch/$(UARCH)/src/tls.c \
-	arch/$(UARCH)/src/syscall.c \
-	arch/$(UARCH)/src/stacktrace.c
-
-ARCH_AUTOCHECK_HEADERS = \
-	arch/$(UARCH)/include/libarch/fibril_context.h
Index: uspace/lib/c/arch/riscv64/meson.build
===================================================================
--- uspace/lib/c/arch/riscv64/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ uspace/lib/c/arch/riscv64/meson.build	(revision 5f176da24d28494c81340ae9aed9fb8d6d7a36fa)
@@ -1,2 +1,30 @@
+#
+# Copyright (c) 2016 Martin Decky
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
 arch_src += [ autocheck.process('include/libarch/fibril_context.h') ]
 
Index: uspace/lib/c/meson.build
===================================================================
--- uspace/lib/c/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ uspace/lib/c/meson.build	(revision 5f176da24d28494c81340ae9aed9fb8d6d7a36fa)
@@ -1,5 +1,5 @@
 # libarch
 arch_src = []
-subdir(join_paths('arch', h_arch))
+subdir('arch' / UARCH)
 
 c_args = [ '-fno-builtin', '-D_LIBC_SOURCE' ]
@@ -9,6 +9,6 @@
 incdirs = [
 	'include',
-	'arch' / h_arch / 'include',
-	root_path / 'abi' / 'arch' / h_arch / 'include',
+	'arch' / UARCH / 'include',
+	root_path / 'abi' / 'arch' / UARCH / 'include',
 	root_path / 'abi' / 'include',
 ]
Index: uspace/srv/loader/meson.build
===================================================================
--- uspace/srv/loader/meson.build	(revision 41408d9416b973ae77a095adf3dc309772bd1c56)
+++ uspace/srv/loader/meson.build	(revision 5f176da24d28494c81340ae9aed9fb8d6d7a36fa)
@@ -1,4 +1,4 @@
 
-if h_arch == 'ia64'
+if UARCH == 'ia64'
 	link_args += [ '-T', meson.current_source_dir() / 'elf64_ia64_loader.x' ]
 else
