summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-sanitizers.inc
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-25 00:04:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-26 10:44:27 +0000
commit7c55daec93754349b0c4bac1f788db80a88804f8 (patch)
tree22c59d16c16f0519cef70301aeab325d4cb85299 /meta/recipes-devtools/gcc/gcc-sanitizers.inc
parent1d75635ac53589beccdcb72138bfcd28d82d8d14 (diff)
downloadpoky-7c55daec93754349b0c4bac1f788db80a88804f8.tar.gz
gcc: Clean up unnecessary variable confusion
SDKPKGSUFFIX could only really be "nativesdk" and TARGET_SYS never contains that so the code manipulating TARGET_SYS is pointless. I suspect this once worked against MULTIMACH_TARGET_SYS which would be a different question but it no longer does. Its been cut and pasted everywhere. This patch cleans up the variable references to make things a little more readable. (From OE-Core rev: 5599cb72d17bce2ba6e2be16ef64d9a388bcfb25) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-sanitizers.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers.inc25
1 files changed, 10 insertions, 15 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index ae3afe00b3..f97885b372 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -12,34 +12,29 @@ EXTRA_OECONF_PATHS = "\
12" 12"
13 13
14do_configure () { 14do_configure () {
15 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 15 rm -rf ${B}/${TARGET_SYS}/libsanitizer/
16 16 mkdir -p ${B}/${TARGET_SYS}/libsanitizer/
17 echo "Configuring libsanitizer" 17 cd ${B}/${TARGET_SYS}/libsanitizer/
18 rm -rf ${B}/$target/libsanitizer/
19 mkdir -p ${B}/$target/libsanitizer/
20 cd ${B}/$target/libsanitizer/
21 chmod a+x ${S}/libsanitizer/configure 18 chmod a+x ${S}/libsanitizer/configure
22 relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/$target/libsanitizer")} 19 relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/${TARGET_SYS}/libsanitizer")}
23 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} 20 $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
24 # Easiest way to stop bad RPATHs getting into the library since we have a 21 # Easiest way to stop bad RPATHs getting into the library since we have a
25 # broken libtool here 22 # broken libtool here
26 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool 23 sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libsanitizer/libtool
27 # Link to the sysroot's libstdc++ instead of one gcc thinks it just built 24 # Link to the sysroot's libstdc++ instead of one gcc thinks it just built
28 sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile 25 sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/${TARGET_SYS}/libsanitizer/*/Makefile
29} 26}
30EXTRACONFFUNCS += "extract_stashed_builddir" 27EXTRACONFFUNCS += "extract_stashed_builddir"
31do_configure[depends] += "${COMPILERDEP}" 28do_configure[depends] += "${COMPILERDEP}"
32 29
33do_compile () { 30do_compile () {
34 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 31 cd ${B}/${TARGET_SYS}/libsanitizer/
35 cd ${B}/$target/libsanitizer/ 32 oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/
36 oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/
37} 33}
38 34
39do_install () { 35do_install () {
40 target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` 36 cd ${B}/${TARGET_SYS}/libsanitizer/
41 cd ${B}/$target/libsanitizer/ 37 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install
42 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install
43 if [ -d ${D}${infodir} ]; then 38 if [ -d ${D}${infodir} ]; then
44 rmdir --ignore-fail-on-non-empty -p ${D}${infodir} 39 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
45 fi 40 fi