-PKG_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION))
-
-PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-
-ifeq ($(PKG_VERSION),3.4.6)
- PKG_MD5SUM:=4a21ac777d4b5617283ce488b808da7b
-endif
-ifeq ($(PKG_VERSION),4.1.2)
- PKG_MD5SUM:=a4a3eb15c96030906d8494959eeda23c
-endif
-ifeq ($(PKG_VERSION),4.2.4)
- PKG_MD5SUM:=d79f553e7916ea21c556329eacfeaa16
-endif
-ifeq ($(PKG_VERSION),4.3.1)
- PKG_MD5SUM:=4afa0290cc3a41ac8822666f1110de98
-endif
-ifeq ($(PKG_VERSION),4.3.2)
- PKG_MD5SUM:=5dfac5da961ecd5f227c3175859a486d
+GCC_VERSION:=$(call qstrip,$(CONFIG_GCC_VERSION))
+PKG_VERSION:=$(firstword $(subst +, ,$(GCC_VERSION)))
+GCC_DIR:=$(PKG_NAME)-$(PKG_VERSION)
+
+ifdef CONFIG_GCC_VERSION_LLVM
+ PKG_SOURCE_VERSION:=c98c494b72ff875884c0c7286be67f16f9f6d7ab
+ PKG_REV:=83504
+ GCC_DIR:=llvm-gcc-4.2-r$(PKG_REV)
+ PKG_VERSION:=4.2.1
+ PKG_SOURCE:=$(GCC_DIR).tar.gz
+ PKG_SOURCE_PROTO:=git
+ PKG_SOURCE_URL:=git://repo.or.cz/llvm-gcc-4.2.git
+ PKG_SOURCE_SUBDIR:=$(GCC_DIR)
+ HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GCC_DIR)
+else
+ PKG_SOURCE_URL:=@GNU/gcc/gcc-$(PKG_VERSION)
+ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+
+ ifeq ($(PKG_VERSION),3.4.6)
+ PKG_MD5SUM:=4a21ac777d4b5617283ce488b808da7b
+ endif
+ ifeq ($(PKG_VERSION),4.1.2)
+ PKG_MD5SUM:=a4a3eb15c96030906d8494959eeda23c
+ endif
+ ifeq ($(PKG_VERSION),4.2.4)
+ PKG_MD5SUM:=d79f553e7916ea21c556329eacfeaa16
+ endif
+ ifeq ($(PKG_VERSION),4.3.3)
+ PKG_MD5SUM:=cc3c5565fdb9ab87a05ddb106ba0bd1f
+ endif
+ ifeq ($(PKG_VERSION),4.4.0)
+ PKG_MD5SUM:=cf5d787bee57f38168b74d65a7c0e6fd
+ endif
+ ifeq ($(PKG_VERSION),4,4,1)
+ PKG_MD5SUM:=927eaac3d44b22f31f9c83df82f26436
+ endif
+ ifeq ($(PKG_VERSION),4.4.2)
+ PKG_MD5SUM:=70f5ac588a79e3c9901d5b34f58d896d
+ endif
+ ifeq ($(PKG_VERSION),4.4.3)
+ PKG_MD5SUM:=fe1ca818fc6d2caeffc9051fe67ff103
+ endif