summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/clang.conf11
-rw-r--r--recipes-devtools/clang/clang/disable-xml2-config.patch208
-rw-r--r--recipes-devtools/clang/clang_git.bb53
-rw-r--r--recipes-devtools/clang/compiler-rt_git.bb2
4 files changed, 51 insertions, 223 deletions
diff --git a/conf/clang.conf b/conf/clang.conf
index 312f4cd..0d13d1d 100644
--- a/conf/clang.conf
+++ b/conf/clang.conf
@@ -1,9 +1,10 @@
1TOOLCHAIN ?= "" 1TOOLCHAIN ?= ""
2 2
3CC_toolchain-clang = "${TARGET_PREFIX}clang ${TOOLCHAIN_OPTIONS}" 3CC_toolchain-clang = "${TARGET_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
4CXX_toolchain-clang = "${TARGET_PREFIX}clang++ ${TOOLCHAIN_OPTIONS}" 4CXX_toolchain-clang = "${TARGET_PREFIX}clang++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
5CPP_toolchain-clang = "${TARGET_PREFIX}clang ${TOOLCHAIN_OPTIONS} -E" 5CPP_toolchain-clang = "${TARGET_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -E"
6CCLD_toolchain-clang = "${TARGET_PREFIX}clang ${TOOLCHAIN_OPTIONS}" 6CCLD_toolchain-clang = "${TARGET_PREFIX}clang ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
7THUMB_TUNE_CCARGS_remove_toolchain-clang = "-mthumb-interwork"
7 8
8TOOLCHAIN_pn-lzo = "clang" 9TOOLCHAIN_pn-lzo = "clang"
9DEPENDS_append_pn-lzo = " clang-cross-${TARGET_ARCH} " 10DEPENDS_append_pn-lzo = " clang-cross-${TARGET_ARCH} "
@@ -17,3 +18,5 @@ DEPENDS_append_pn-toybox = " clang-cross-${TARGET_ARCH} "
17TOOLCHAIN_pn-compiler-rt = "clang" 18TOOLCHAIN_pn-compiler-rt = "clang"
18DEPENDS_append_pn-compiler-rt = " clang-cross-${TARGET_ARCH} " 19DEPENDS_append_pn-compiler-rt = " clang-cross-${TARGET_ARCH} "
19 20
21TOOLCHAIN_pn-clang = "clang"
22DEPENDS_append_pn-clang = " clang-cross-${TARGET_ARCH} "
diff --git a/recipes-devtools/clang/clang/disable-xml2-config.patch b/recipes-devtools/clang/clang/disable-xml2-config.patch
deleted file mode 100644
index 13edc56..0000000
--- a/recipes-devtools/clang/clang/disable-xml2-config.patch
+++ /dev/null
@@ -1,208 +0,0 @@
1Index: git/autoconf/configure.ac
2===================================================================
3--- git.orig/autoconf/configure.ac 2014-08-26 12:58:29.187543502 -0700
4+++ git/autoconf/configure.ac 2014-08-26 13:18:55.484200981 -0700
5@@ -1560,16 +1560,13 @@
6 dnl Check for libxml2
7 dnl Right now we're just checking for the existence, we could also check for a
8 dnl particular version via --version on xml2-config
9-AC_CHECK_PROGS(XML2CONFIG, xml2-config)
10-
11-AC_MSG_CHECKING(for libxml2 includes)
12-if test "x$XML2CONFIG" = "x"; then
13- AC_MSG_RESULT(xml2-config not found)
14-else
15- LIBXML2_INC=`$XML2CONFIG --cflags`
16- AC_MSG_RESULT($LIBXML2_INC)
17- AC_CHECK_LIB(xml2, xmlReadFile,[AC_DEFINE([CLANG_HAVE_LIBXML],1,[Define if we have libxml2])
18- LIBXML2_LIBS="-lxml2"])
19+PKG_CHECK_MODULES(LIBXML2, [libxml-2.0],,
20+ [AC_MSG_ERROR([Could not find libxml-2.0])]
21+)
22+if test "x$LIBXML2_CFLAGS" != "x"; then
23+ LIBXML2_INC=${LIBXML2_CFLAGS}
24+ LIBXML2_LIBS=${LIBXML2_LIBS}
25+ AC_DEFINE([CLANG_HAVE_LIBXML],1,[Define if we have libxml2])
26 fi
27 AC_SUBST(LIBXML2_LIBS)
28 AC_SUBST(LIBXML2_INC)
29Index: git/configure
30===================================================================
31--- git.orig/configure 2014-08-26 12:58:29.194210168 -0700
32+++ git/configure 2014-08-26 13:19:00.424200963 -0700
33@@ -769,7 +769,6 @@
34 HAVE_TERMINFO
35 USE_OPROFILE
36 USE_INTEL_JITEVENTS
37-XML2CONFIG
38 LIBXML2_LIBS
39 LIBXML2_INC
40 CXXCPP
41@@ -10164,144 +10163,17 @@
42 _ACEOF
43
44
45-for ac_prog in xml2-config
46-do
47- # Extract the first word of "$ac_prog", so it can be a program name with args.
48-set dummy $ac_prog; ac_word=$2
49-{ echo "$as_me:$LINENO: checking for $ac_word" >&5
50-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
51-if test "${ac_cv_prog_XML2CONFIG+set}" = set; then
52- echo $ECHO_N "(cached) $ECHO_C" >&6
53-else
54- if test -n "$XML2CONFIG"; then
55- ac_cv_prog_XML2CONFIG="$XML2CONFIG" # Let the user override the test.
56-else
57-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
58-for as_dir in $PATH
59-do
60- IFS=$as_save_IFS
61- test -z "$as_dir" && as_dir=.
62- for ac_exec_ext in '' $ac_executable_extensions; do
63- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
64- ac_cv_prog_XML2CONFIG="$ac_prog"
65- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
66- break 2
67- fi
68-done
69-done
70-IFS=$as_save_IFS
71-
72-fi
73-fi
74-XML2CONFIG=$ac_cv_prog_XML2CONFIG
75-if test -n "$XML2CONFIG"; then
76- { echo "$as_me:$LINENO: result: $XML2CONFIG" >&5
77-echo "${ECHO_T}$XML2CONFIG" >&6; }
78-else
79- { echo "$as_me:$LINENO: result: no" >&5
80-echo "${ECHO_T}no" >&6; }
81-fi
82-
83-
84- test -n "$XML2CONFIG" && break
85-done
86-
87-
88-{ echo "$as_me:$LINENO: checking for libxml2 includes" >&5
89-echo $ECHO_N "checking for libxml2 includes... $ECHO_C" >&6; }
90-if test "x$XML2CONFIG" = "x"; then
91- { echo "$as_me:$LINENO: result: xml2-config not found" >&5
92-echo "${ECHO_T}xml2-config not found" >&6; }
93-else
94- LIBXML2_INC=`$XML2CONFIG --cflags`
95- { echo "$as_me:$LINENO: result: $LIBXML2_INC" >&5
96-echo "${ECHO_T}$LIBXML2_INC" >&6; }
97- { echo "$as_me:$LINENO: checking for xmlReadFile in -lxml2" >&5
98-echo $ECHO_N "checking for xmlReadFile in -lxml2... $ECHO_C" >&6; }
99-if test "${ac_cv_lib_xml2_xmlReadFile+set}" = set; then
100- echo $ECHO_N "(cached) $ECHO_C" >&6
101-else
102- ac_check_lib_save_LIBS=$LIBS
103-LIBS="-lxml2 $LIBS"
104-cat >conftest.$ac_ext <<_ACEOF
105-/* confdefs.h. */
106-_ACEOF
107-cat confdefs.h >>conftest.$ac_ext
108-cat >>conftest.$ac_ext <<_ACEOF
109-/* end confdefs.h. */
110-
111-/* Override any GCC internal prototype to avoid an error.
112- Use char because int might match the return type of a GCC
113- builtin and then its argument prototype would still apply. */
114-#ifdef __cplusplus
115-extern "C"
116-#endif
117-char xmlReadFile ();
118-int
119-main ()
120-{
121-return xmlReadFile ();
122- ;
123- return 0;
124-}
125-_ACEOF
126-rm -f conftest.$ac_objext conftest$ac_exeext
127-if { (ac_try="$ac_link"
128-case "(($ac_try" in
129- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
130- *) ac_try_echo=$ac_try;;
131-esac
132-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
133- (eval "$ac_link") 2>conftest.er1
134- ac_status=$?
135- grep -v '^ *+' conftest.er1 >conftest.err
136- rm -f conftest.er1
137- cat conftest.err >&5
138- echo "$as_me:$LINENO: \$? = $ac_status" >&5
139- (exit $ac_status); } &&
140- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
141- { (case "(($ac_try" in
142- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
143- *) ac_try_echo=$ac_try;;
144-esac
145-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
146- (eval "$ac_try") 2>&5
147- ac_status=$?
148- echo "$as_me:$LINENO: \$? = $ac_status" >&5
149- (exit $ac_status); }; } &&
150- { ac_try='test -s conftest$ac_exeext'
151- { (case "(($ac_try" in
152- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
153- *) ac_try_echo=$ac_try;;
154-esac
155-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
156- (eval "$ac_try") 2>&5
157- ac_status=$?
158- echo "$as_me:$LINENO: \$? = $ac_status" >&5
159- (exit $ac_status); }; }; then
160- ac_cv_lib_xml2_xmlReadFile=yes
161-else
162- echo "$as_me: failed program was:" >&5
163-sed 's/^/| /' conftest.$ac_ext >&5
164-
165- ac_cv_lib_xml2_xmlReadFile=no
166-fi
167-
168-rm -f core conftest.err conftest.$ac_objext \
169- conftest$ac_exeext conftest.$ac_ext
170-LIBS=$ac_check_lib_save_LIBS
171-fi
172-{ echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_xmlReadFile" >&5
173-echo "${ECHO_T}$ac_cv_lib_xml2_xmlReadFile" >&6; }
174-if test $ac_cv_lib_xml2_xmlReadFile = yes; then
175+PKG_CHECK_MODULES(LIBXML2, libxml-2.0,,
176+ AC_MSG_ERROR([Could not find libxml-2.0])
177+)
178+if test "x$LIBXML2_CFLAGS" != "x"; then
179+ LIBXML2_INC=${LIBXML2_CFLAGS}
180+ LIBXML2_LIBS=${LIBXML2_LIBS}
181
182 cat >>confdefs.h <<\_ACEOF
183 #define CLANG_HAVE_LIBXML 1
184 _ACEOF
185
186- LIBXML2_LIBS="-lxml2"
187-fi
188-
189 fi
190
191
192@@ -19700,7 +19572,6 @@
193 HAVE_TERMINFO!$HAVE_TERMINFO$ac_delim
194 USE_OPROFILE!$USE_OPROFILE$ac_delim
195 USE_INTEL_JITEVENTS!$USE_INTEL_JITEVENTS$ac_delim
196-XML2CONFIG!$XML2CONFIG$ac_delim
197 LIBXML2_LIBS!$LIBXML2_LIBS$ac_delim
198 LIBXML2_INC!$LIBXML2_INC$ac_delim
199 CXXCPP!$CXXCPP$ac_delim
200@@ -19729,7 +19600,7 @@
201 LTLIBOBJS!$LTLIBOBJS$ac_delim
202 _ACEOF
203
204- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
205+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then
206 break
207 elif $ac_last_try; then
208 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb
index baf66d1..a1d3cf6 100644
--- a/recipes-devtools/clang/clang_git.bb
+++ b/recipes-devtools/clang/clang_git.bb
@@ -16,8 +16,8 @@ SRC_URI = "git://github.com/llvm-mirror/llvm.git;branch=${BRANCH};name=llvm \
16 git://github.com/llvm-mirror/clang.git;branch=${BRANCH};destsuffix=git/tools/clang;name=clang \ 16 git://github.com/llvm-mirror/clang.git;branch=${BRANCH};destsuffix=git/tools/clang;name=clang \
17 " 17 "
18 18
19SRCREV_llvm = "2c64a1129f14d6322631e1c6d610b92c4c4871d0" 19SRCREV_llvm = "08709687efd951d1d6c3ad5f8d518129c068c737"
20SRCREV_clang = "070ffd29fb0a5a558e8f9bd464f784ff24ef1a54" 20SRCREV_clang = "75805b9d66425462798c88596376b14d69193429"
21 21
22SRCREV_FORMAT = "llvm_clang" 22SRCREV_FORMAT = "llvm_clang"
23 23
@@ -25,20 +25,51 @@ S = "${WORKDIR}/git"
25 25
26inherit perlnative pythonnative cmake 26inherit perlnative pythonnative cmake
27 27
28def get_clang_target_arch(bb, d):
29 target_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
30 clang_arches = {
31 "i586" : "X86",
32 "x86-64" : "X86",
33 "powerpc" : "PowerPC",
34 "mips" : "Mips",
35 "arm" : "ARM",
36 "arm64" : "AArch64",
37 "aarch64" : "AArch64",
38 }
39
40 if target_arch in clang_arches:
41 return clang_arches[target_arch]
42 return ""
43
44#TUNE_CCARGS_remove = "-mthumb-interwork"
45#TUNE_CCARGS_remove = "-march=armv7-a"
46#TUNE_CCARGS_remove = "-marm"
47
28EXTRA_OECMAKE="-DLLVM_ENABLE_RTTI:BOOL=True \ 48EXTRA_OECMAKE="-DLLVM_ENABLE_RTTI:BOOL=True \
29 -DLLVM_ENABLE_FFI:BOOL=False \ 49 -DLLVM_ENABLE_FFI:BOOL=False \
30 -DCMAKE_SYSTEM_NAME=Linux \ 50 -DCMAKE_SYSTEM_NAME=Linux \
31 -DCMAKE_BUILD_TYPE:STRING=Release \ 51 -DCMAKE_BUILD_TYPE:STRING=Release \
32 -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=True \ 52 -DLLVM_BUILD_EXTERNAL_COMPILER_RT:BOOL=True \
33 -DLLVM_TARGETS_TO_BUILD:STRING='AArch64;ARM;Mips;PowerPC;X86' \
34 " 53 "
35 54
55EXTRA_OECMAKE_append_class-native = "\
56 -DLLVM_TARGETS_TO_BUILD:STRING='AArch64;ARM;Mips;PowerPC;X86' \
57"
58EXTRA_OECMAKE_append_class-nativesdk = "\
59 -DLLVM_TARGETS_TO_BUILD:STRING='AArch64;ARM;Mips;PowerPC;X86' \
60"
36EXTRA_OECMAKE_append_class-target = "\ 61EXTRA_OECMAKE_append_class-target = "\
37 -DCMAKE_CROSSCOMPILING=True \ 62 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
63 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
64 -DLLVM_TARGETS_TO_BUILD:STRING='${@get_clang_target_arch(bb, d)}' \
65 -DLLVM_TARGET_ARCH:STRING='${@get_clang_target_arch(bb, d)}' \
38" 66"
67# -DCMAKE_CXX_FLAGS='-target armv7a -ccc-gcc-name ${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -v -I ${PKG_CONFIG_SYSROOT_DIR}${includedir}/c++/5.1.0 -I ${PKG_CONFIG_SYSROOT_DIR}${includedir}/c++/5.1.0/arm-rdk-linux-gnueabi' \
68# -DCMAKE_C_FLAGS='-target armv7a -ccc-gcc-name ${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} -v -I ${PKG_CONFIG_SYSROOT_DIR}${includedir}/c++/5.1.0 -I ${PKG_CONFIG_SYSROOT_DIR}${includedir}/c++/5.1.0/arm-rdk-linux-gnueabi' \
69#
70#
39EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1" 71EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1"
40 72
41
42DEPENDS = "zlib libffi libxml2-native binutils" 73DEPENDS = "zlib libffi libxml2-native binutils"
43 74
44do_configure_prepend() { 75do_configure_prepend() {
@@ -52,12 +83,14 @@ do_configure_prepend() {
52 sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp 83 sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp
53} 84}
54 85
55do_compile_prepend() {
56 oe_runmake LLVMNativeTableGen
57 oe_runmake CLANGNativeTableGen
58}
59
60do_install_append_class-native () { 86do_install_append_class-native () {
87 install -Dm 0755 ${B}/NATIVE/bin/clang-tblgen ${D}${bindir}/clang-tblgen
88 for f in `find ${D}${bindir} -executable -type f -not -type l`; do
89 test -n "`file $f|grep -i ELF`" && ${STRIP} $f
90 done
91}
92do_install_append_class-nativesdk () {
93 install -Dm 0755 ${B}/NATIVE/bin/clang-tblgen ${D}${bindir}/clang-tblgen
61 for f in `find ${D}${bindir} -executable -type f -not -type l`; do 94 for f in `find ${D}${bindir} -executable -type f -not -type l`; do
62 test -n "`file $f|grep -i ELF`" && ${STRIP} $f 95 test -n "`file $f|grep -i ELF`" && ${STRIP} $f
63 done 96 done
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb
index db45bff..5f8a81d 100644
--- a/recipes-devtools/clang/compiler-rt_git.bb
+++ b/recipes-devtools/clang/compiler-rt_git.bb
@@ -19,7 +19,7 @@ SRC_URI = "git://github.com/llvm-mirror/compiler-rt.git;branch=${BRANCH};name=co
19 file://0001-support-a-new-embedded-linux-target.patch \ 19 file://0001-support-a-new-embedded-linux-target.patch \
20 " 20 "
21 21
22SRCREV_compiler-rt = "bc4648a579d99cb2a382c40a0fc9fe075da2b330" 22SRCREV_compiler-rt = "0a93a02dc42d75bad5b7c7dad975a488e2833fcc"
23 23
24SRCREV_FORMAT = "compiler-rt" 24SRCREV_FORMAT = "compiler-rt"
25 25