build: Don't error out if clang is too old. Instead, build with GCC.

This commit is contained in:
Patrick Walton 2011-08-05 08:57:39 -07:00
parent 684df97ef0
commit ad925955d8
2 changed files with 9 additions and 5 deletions

7
configure vendored
View File

@ -287,12 +287,17 @@ then
case $CFG_CLANG_VERSION in
(3.0svn | 3.0)
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
CFG_C_COMPILER="clang"
;;
(*)
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
msg "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn; disabling"
CFG_C_COMPILER="gcc"
;;
esac
else
CFG_C_COMPILER="gcc"
fi
putvar CFG_C_COMPILER
putvar CFG_LLVM_ROOT
putvar CFG_LLVM_INCDIR

View File

@ -135,8 +135,8 @@ ifdef CFG_WINDOWSY
endif
ifdef CFG_CLANG
CFG_INFO := $(info cfg: using clang)
CFG_INFO := $(info cfg: using $(CFG_C_COMPILER))
ifeq ($(CFG_C_COMPILER),clang)
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -fno-exceptions -g
CFG_GCCISH_LINK_FLAGS += -g
CFG_COMPILE_C = $(CFG_GCCISH_CROSS)clang++ $(CFG_GCCISH_CFLAGS) \
@ -146,8 +146,7 @@ ifdef CFG_CLANG
CFG_LINK_C = $(CFG_GCCISH_CROSS)clang++ $(CFG_GCCISH_LINK_FLAGS) -o $(1) \
$(CFG_GCCISH_DEF_FLAG)$(3) $(2)
else
ifdef CFG_GCC
CFG_INFO := $(info cfg: using gcc)
ifeq ($(CFG_C_COMPILER),gcc)
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -fno-exceptions -g
CFG_GCCISH_LINK_FLAGS += -g
CFG_COMPILE_C = $(CFG_GCCISH_CROSS)g++ $(CFG_GCCISH_CFLAGS) \