diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-sanitizers.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-sanitizers.inc | 25 |
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 | ||
14 | do_configure () { | 14 | do_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 | } |
30 | EXTRACONFFUNCS += "extract_stashed_builddir" | 27 | EXTRACONFFUNCS += "extract_stashed_builddir" |
31 | do_configure[depends] += "${COMPILERDEP}" | 28 | do_configure[depends] += "${COMPILERDEP}" |
32 | 29 | ||
33 | do_compile () { | 30 | do_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 | ||
39 | do_install () { | 35 | do_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 |