From 5599cb72d17bce2ba6e2be16ef64d9a388bcfb25 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 25 Jan 2017 00:04:53 +0000 Subject: 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. Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-sanitizers.inc | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'meta/recipes-devtools/gcc/gcc-sanitizers.inc') 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 = "\ " do_configure () { - target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` - - echo "Configuring libsanitizer" - rm -rf ${B}/$target/libsanitizer/ - mkdir -p ${B}/$target/libsanitizer/ - cd ${B}/$target/libsanitizer/ + rm -rf ${B}/${TARGET_SYS}/libsanitizer/ + mkdir -p ${B}/${TARGET_SYS}/libsanitizer/ + cd ${B}/${TARGET_SYS}/libsanitizer/ chmod a+x ${S}/libsanitizer/configure - relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/$target/libsanitizer")} + relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/${TARGET_SYS}/libsanitizer")} $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} # Easiest way to stop bad RPATHs getting into the library since we have a # broken libtool here - sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool + sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libsanitizer/libtool # Link to the sysroot's libstdc++ instead of one gcc thinks it just built - sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile + sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/${TARGET_SYS}/libsanitizer/*/Makefile } EXTRACONFFUNCS += "extract_stashed_builddir" do_configure[depends] += "${COMPILERDEP}" do_compile () { - target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` - cd ${B}/$target/libsanitizer/ - oe_runmake MULTIBUILDTOP=${B}/$target/libsanitizer/ + cd ${B}/${TARGET_SYS}/libsanitizer/ + oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ } do_install () { - target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` - cd ${B}/$target/libsanitizer/ - oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libsanitizer/ install + cd ${B}/${TARGET_SYS}/libsanitizer/ + oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libsanitizer/ install if [ -d ${D}${infodir} ]; then rmdir --ignore-fail-on-non-empty -p ${D}${infodir} fi -- cgit 1.2.3-korg