Index: kernel/arch/amd64/Makefile.inc
===================================================================
--- kernel/arch/amd64/Makefile.inc	(revision bf85e56c7095e7c326a3411862e8cfe45fe52b80)
+++ kernel/arch/amd64/Makefile.inc	(revision 95e370f88ddd131bc637e55642805b5db53b4e99)
@@ -30,5 +30,4 @@
 BFD_ARCH = i386:x86-64
 BFD = binary
-CLANG_TARGET = x86_64-unknown-linux
 
 FPU_NO_CFLAGS = -mno-sse -mno-sse2
Index: kernel/arch/ia32/Makefile.inc
===================================================================
--- kernel/arch/ia32/Makefile.inc	(revision bf85e56c7095e7c326a3411862e8cfe45fe52b80)
+++ kernel/arch/ia32/Makefile.inc	(revision 95e370f88ddd131bc637e55642805b5db53b4e99)
@@ -30,5 +30,4 @@
 BFD_ARCH = i386
 BFD = binary
-CLANG_TARGET = i386-unknown-linux
 
 BITS = 32
Index: tools/autotool.py
===================================================================
--- tools/autotool.py	(revision bf85e56c7095e7c326a3411862e8cfe45fe52b80)
+++ tools/autotool.py	(revision 95e370f88ddd131bc637e55642805b5db53b4e99)
@@ -182,5 +182,5 @@
 		             "Please contact the developers of HelenOS."])
 
-def get_target(config, needs_clang = False):
+def get_target(config):
 	target = None
 	gnu_target = None
@@ -205,5 +205,5 @@
 		target = config['PLATFORM']
 		gnu_target = "amd64-linux-gnu"
-		clang_target = "x86_64-uknown-linux"
+		clang_target = "x86_64-unknown-linux"
 	
 	if (config['PLATFORM'] == "arm32"):
@@ -214,5 +214,5 @@
 		target = config['PLATFORM']
 		gnu_target = "i686-pc-linux-gnu"
-		clang_target = "i386-uknown-linux"
+		clang_target = "i386-unknown-linux"
 	
 	if (config['PLATFORM'] == "ia64"):
@@ -247,8 +247,4 @@
 		target = config['PLATFORM']
 		gnu_target = "sparc64-linux-gnu"
-	
-	if (target is None) or (gnu_target is None) or (clang_target is None and needs_clang):
-		print_error(["Failed to determine target for compiler.",
-		             "Please contact the developers of HelenOS."])
 	
 	return (target, cc_args, gnu_target, clang_target)
@@ -714,5 +710,10 @@
 		common['CC_ARGS'] = []
 		if (config['COMPILER'] == "gcc_cross"):
-			target, cc_args, gnu_target, clang_target_unused = get_target(config)
+			target, cc_args, gnu_target, clang_target = get_target(config)
+			
+			if (target is None) or (gnu_target is None):
+				print_error(["Unsupported compiler target for GNU GCC.",
+				             "Please contact the developers of HelenOS."])
+			
 			path = "%s/%s/bin" % (cross_prefix, target)
 			prefix = "%s-" % gnu_target
@@ -739,15 +740,23 @@
 		
 		if (config['COMPILER'] == "clang"):
-			target, cc_args, gnu_target, clang_target = get_target(config, True)
+			target, cc_args, gnu_target, clang_target = get_target(config)
+			
+			if (target is None) or (gnu_target is None) or (clang_target is None):
+				print_error(["Unsupported compiler target for clang.",
+				             "Please contact the developers of HelenOS."])
+			
 			path = "%s/%s/bin" % (cross_prefix, target)
 			prefix = "%s-" % gnu_target
 			
+			check_app(["clang", "--version"], "clang compiler", "preferably version 1.0 or newer")
+			check_gcc(path, prefix, common, PACKAGE_GCC)
+			check_binutils(path, prefix, common, PACKAGE_BINUTILS)
+			
+			check_common(common, "GCC")
 			common['CC'] = "clang"
 			common['CC_ARGS'].extend(cc_args)
 			common['CC_ARGS'].append("-target")
 			common['CC_ARGS'].append(clang_target)
-			check_app([common['CC'], "--version"], "Clang compiler", "preferably version 1.0 or newer")
-			check_gcc(path, prefix, common, PACKAGE_GCC)
-			check_binutils(path, prefix, common, PACKAGE_BINUTILS)
+			common['CLANG_TARGET'] = clang_target
 		
 		# Platform-specific utilities
Index: uspace/lib/c/arch/amd64/Makefile.common
===================================================================
--- uspace/lib/c/arch/amd64/Makefile.common	(revision bf85e56c7095e7c326a3411862e8cfe45fe52b80)
+++ uspace/lib/c/arch/amd64/Makefile.common	(revision 95e370f88ddd131bc637e55642805b5db53b4e99)
@@ -27,5 +27,4 @@
 #
 
-CLANG_TARGET = x86_64-unknown-linux
 GCC_CFLAGS += -fno-omit-frame-pointer
 CLANG_CFLAGS += -fno-omit-frame-pointer
Index: uspace/lib/c/arch/ia32/Makefile.common
===================================================================
--- uspace/lib/c/arch/ia32/Makefile.common	(revision bf85e56c7095e7c326a3411862e8cfe45fe52b80)
+++ uspace/lib/c/arch/ia32/Makefile.common	(revision 95e370f88ddd131bc637e55642805b5db53b4e99)
@@ -27,6 +27,4 @@
 #
 
-CLANG_TARGET = i386-unknown-linux
-
 ifeq ($(PROCESSOR),i486)
 	GCC_CFLAGS += -march=i486 -fno-omit-frame-pointer
