diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-25 00:04:53 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-26 10:44:27 +0000 |
| commit | 7c55daec93754349b0c4bac1f788db80a88804f8 (patch) | |
| tree | 22c59d16c16f0519cef70301aeab325d4cb85299 /meta | |
| parent | 1d75635ac53589beccdcb72138bfcd28d82d8d14 (diff) | |
| download | poky-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')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-runtime.inc | 19 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-sanitizers.inc | 25 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/libgcc-common.inc | 9 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/libgfortran.inc | 23 |
4 files changed, 30 insertions, 46 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index 00856ad8bc..745cf74f86 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc | |||
| @@ -32,15 +32,14 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \ | |||
| 32 | 32 | ||
| 33 | do_configure () { | 33 | do_configure () { |
| 34 | export CXX="${CXX} -nostdinc++ -nostdlib++" | 34 | export CXX="${CXX} -nostdinc++ -nostdlib++" |
| 35 | target=${TARGET_SYS} | ||
| 36 | 35 | ||
| 37 | for d in libgcc ${RUNTIMETARGET}; do | 36 | for d in libgcc ${RUNTIMETARGET}; do |
| 38 | echo "Configuring $d" | 37 | echo "Configuring $d" |
| 39 | rm -rf ${B}/$target/$d/ | 38 | rm -rf ${B}/${TARGET_SYS}/$d/ |
| 40 | mkdir -p ${B}/$target/$d/ | 39 | mkdir -p ${B}/${TARGET_SYS}/$d/ |
| 41 | cd ${B}/$target/$d/ | 40 | cd ${B}/${TARGET_SYS}/$d/ |
| 42 | chmod a+x ${S}/$d/configure | 41 | chmod a+x ${S}/$d/configure |
| 43 | relpath=${@os.path.relpath("${S}/$d", "${B}/$target/$d")} | 42 | relpath=${@os.path.relpath("${S}/$d", "${B}/${TARGET_SYS}/$d")} |
| 44 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | 43 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} |
| 45 | done | 44 | done |
| 46 | } | 45 | } |
| @@ -48,18 +47,16 @@ EXTRACONFFUNCS += "extract_stashed_builddir" | |||
| 48 | do_configure[depends] += "${COMPILERDEP}" | 47 | do_configure[depends] += "${COMPILERDEP}" |
| 49 | 48 | ||
| 50 | do_compile () { | 49 | do_compile () { |
| 51 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | ||
| 52 | for d in libgcc ${RUNTIMETARGET}; do | 50 | for d in libgcc ${RUNTIMETARGET}; do |
| 53 | cd ${B}/$target/$d/ | 51 | cd ${B}/${TARGET_SYS}/$d/ |
| 54 | oe_runmake MULTIBUILDTOP=${B}/$target/$d/ | 52 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ |
| 55 | done | 53 | done |
| 56 | } | 54 | } |
| 57 | 55 | ||
| 58 | do_install () { | 56 | do_install () { |
| 59 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | ||
| 60 | for d in ${RUNTIMETARGET}; do | 57 | for d in ${RUNTIMETARGET}; do |
| 61 | cd ${B}/$target/$d/ | 58 | cd ${B}/${TARGET_SYS}/$d/ |
| 62 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install | 59 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install |
| 63 | done | 60 | done |
| 64 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir | 61 | rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir |
| 65 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir | 62 | rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir |
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 |
diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc index c0efc29437..848a476207 100644 --- a/meta/recipes-devtools/gcc/libgcc-common.inc +++ b/meta/recipes-devtools/gcc/libgcc-common.inc | |||
| @@ -5,10 +5,9 @@ require gcc-configure-common.inc | |||
| 5 | INHIBIT_DEFAULT_DEPS = "1" | 5 | INHIBIT_DEFAULT_DEPS = "1" |
| 6 | 6 | ||
| 7 | do_configure () { | 7 | do_configure () { |
| 8 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | ||
| 9 | install -d ${D}${base_libdir} ${D}${libdir} | 8 | install -d ${D}${base_libdir} ${D}${libdir} |
| 10 | mkdir -p ${B}/${BPN} | 9 | mkdir -p ${B}/${BPN} |
| 11 | mkdir -p ${B}/$target/${BPN}/ | 10 | mkdir -p ${B}/${TARGET_SYS}/${BPN}/ |
| 12 | cd ${B}/${BPN} | 11 | cd ${B}/${BPN} |
| 13 | chmod a+x ${S}/${BPN}/configure | 12 | chmod a+x ${S}/${BPN}/configure |
| 14 | relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")} | 13 | relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")} |
| @@ -18,15 +17,13 @@ EXTRACONFFUNCS += "extract_stashed_builddir" | |||
| 18 | do_configure[depends] += "${COMPILERDEP}" | 17 | do_configure[depends] += "${COMPILERDEP}" |
| 19 | 18 | ||
| 20 | do_compile () { | 19 | do_compile () { |
| 21 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | ||
| 22 | cd ${B}/${BPN} | 20 | cd ${B}/${BPN} |
| 23 | oe_runmake MULTIBUILDTOP=${B}/$target/${BPN}/ | 21 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ |
| 24 | } | 22 | } |
| 25 | 23 | ||
| 26 | do_install () { | 24 | do_install () { |
| 27 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | ||
| 28 | cd ${B}/${BPN} | 25 | cd ${B}/${BPN} |
| 29 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/${BPN}/ install | 26 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/${BPN}/ install |
| 30 | 27 | ||
| 31 | # Move libgcc_s into /lib | 28 | # Move libgcc_s into /lib |
| 32 | mkdir -p ${D}${base_libdir} | 29 | mkdir -p ${D}${base_libdir} |
diff --git a/meta/recipes-devtools/gcc/libgfortran.inc b/meta/recipes-devtools/gcc/libgfortran.inc index d3e2b411c8..4846decbb8 100644 --- a/meta/recipes-devtools/gcc/libgfortran.inc +++ b/meta/recipes-devtools/gcc/libgfortran.inc | |||
| @@ -6,32 +6,27 @@ EXTRA_OECONF_PATHS = "\ | |||
| 6 | " | 6 | " |
| 7 | 7 | ||
| 8 | do_configure () { | 8 | do_configure () { |
| 9 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | 9 | rm -rf ${B}/${TARGET_SYS}/libgfortran/ |
| 10 | 10 | mkdir -p ${B}/${TARGET_SYS}/libgfortran/ | |
| 11 | echo "Configuring libgfortran" | 11 | cd ${B}/${TARGET_SYS}/libgfortran/ |
| 12 | rm -rf ${B}/$target/libgfortran/ | ||
| 13 | mkdir -p ${B}/$target/libgfortran/ | ||
| 14 | cd ${B}/$target/libgfortran/ | ||
| 15 | chmod a+x ${S}/libgfortran/configure | 12 | chmod a+x ${S}/libgfortran/configure |
| 16 | relpath=${@os.path.relpath("${S}/libgfortran", "${B}/$target/libgfortran")} | 13 | relpath=${@os.path.relpath("${S}/libgfortran", "${B}/${TARGET_SYS}/libgfortran")} |
| 17 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | 14 | $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} |
| 18 | # Easiest way to stop bad RPATHs getting into the library since we have a | 15 | # Easiest way to stop bad RPATHs getting into the library since we have a |
| 19 | # broken libtool here | 16 | # broken libtool here |
| 20 | sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libgfortran/libtool | 17 | sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/${TARGET_SYS}/libgfortran/libtool |
| 21 | } | 18 | } |
| 22 | EXTRACONFFUNCS += "extract_stashed_builddir" | 19 | EXTRACONFFUNCS += "extract_stashed_builddir" |
| 23 | do_configure[depends] += "${COMPILERDEP}" | 20 | do_configure[depends] += "${COMPILERDEP}" |
| 24 | 21 | ||
| 25 | do_compile () { | 22 | do_compile () { |
| 26 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | 23 | cd ${B}/${TARGET_SYS}/libgfortran/ |
| 27 | cd ${B}/$target/libgfortran/ | 24 | oe_runmake MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ |
| 28 | oe_runmake MULTIBUILDTOP=${B}/$target/libgfortran/ | ||
| 29 | } | 25 | } |
| 30 | 26 | ||
| 31 | do_install () { | 27 | do_install () { |
| 32 | target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##` | 28 | cd ${B}/${TARGET_SYS}/libgfortran/ |
| 33 | cd ${B}/$target/libgfortran/ | 29 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/libgfortran/ install |
| 34 | oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/libgfortran/ install | ||
| 35 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then | 30 | if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then |
| 36 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude | 31 | rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude |
| 37 | fi | 32 | fi |
