diff options
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-configure-cross.inc | 31 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross.inc | 84 | ||||
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-package-cross.inc | 48 |
3 files changed, 81 insertions, 82 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-configure-cross.inc b/meta/recipes-devtools/gcc/gcc-configure-cross.inc deleted file mode 100644 index db7980ba0c..0000000000 --- a/meta/recipes-devtools/gcc/gcc-configure-cross.inc +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | require gcc-configure-common.inc | ||
| 2 | |||
| 3 | EXTRA_OECONF += " --enable-poison-system-directories \ | ||
| 4 | " | ||
| 5 | |||
| 6 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 7 | |||
| 8 | EXTRA_OECONF_PATHS = " \ | ||
| 9 | --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} \ | ||
| 10 | --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \ | ||
| 11 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
| 12 | --with-build-sysroot=${STAGING_DIR_TARGET}" | ||
| 13 | |||
| 14 | do_configure_prepend () { | ||
| 15 | sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure | ||
| 16 | } | ||
| 17 | do_compile_prepend () { | ||
| 18 | export CC="${BUILD_CC}" | ||
| 19 | export AR_FOR_TARGET="${TARGET_SYS}-ar" | ||
| 20 | export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" | ||
| 21 | export LD_FOR_TARGET="${TARGET_SYS}-ld" | ||
| 22 | export NM_FOR_TARGET="${TARGET_SYS}-nm" | ||
| 23 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" | ||
| 24 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
| 25 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
| 26 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
| 27 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
| 28 | } | ||
| 29 | |||
| 30 | LIBGCCS_VAR = "-lgcc_s" | ||
| 31 | LIBGCCS_VAR_avr32 = "" | ||
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index c3542e297c..bf22101807 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc | |||
| @@ -3,8 +3,38 @@ inherit cross | |||
| 3 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" | 3 | DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}" |
| 4 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | 4 | PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" |
| 5 | 5 | ||
| 6 | require gcc-configure-cross.inc | 6 | require gcc-configure-common.inc |
| 7 | require gcc-package-cross.inc | 7 | |
| 8 | EXTRA_OECONF += " --enable-poison-system-directories \ | ||
| 9 | " | ||
| 10 | |||
| 11 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 12 | |||
| 13 | EXTRA_OECONF_PATHS = " \ | ||
| 14 | --with-headers=${STAGING_DIR_TARGET}${SYSTEMHEADERS} \ | ||
| 15 | --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \ | ||
| 16 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
| 17 | --with-build-sysroot=${STAGING_DIR_TARGET}" | ||
| 18 | |||
| 19 | do_configure_prepend () { | ||
| 20 | sed -i 's/BUILD_INFO=info/BUILD_INFO=/' ${S}/gcc/configure | ||
| 21 | } | ||
| 22 | |||
| 23 | do_compile_prepend () { | ||
| 24 | export CC="${BUILD_CC}" | ||
| 25 | export AR_FOR_TARGET="${TARGET_SYS}-ar" | ||
| 26 | export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib" | ||
| 27 | export LD_FOR_TARGET="${TARGET_SYS}-ld" | ||
| 28 | export NM_FOR_TARGET="${TARGET_SYS}-nm" | ||
| 29 | export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}" | ||
| 30 | export CFLAGS_FOR_TARGET="${TARGET_CFLAGS}" | ||
| 31 | export CPPFLAGS_FOR_TARGET="${TARGET_CPPFLAGS}" | ||
| 32 | export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" | ||
| 33 | export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" | ||
| 34 | } | ||
| 35 | |||
| 36 | LIBGCCS_VAR = "-lgcc_s" | ||
| 37 | LIBGCCS_VAR_avr32 = "" | ||
| 8 | 38 | ||
| 9 | EXTRADEPENDS = "" | 39 | EXTRADEPENDS = "" |
| 10 | python () { | 40 | python () { |
| @@ -118,5 +148,53 @@ EXTRA_OECONF_PATHS = " \ | |||
| 118 | --with-sysroot=${STAGING_DIR_TARGET} \ | 148 | --with-sysroot=${STAGING_DIR_TARGET} \ |
| 119 | --with-build-sysroot=${STAGING_DIR_TARGET}" | 149 | --with-build-sysroot=${STAGING_DIR_TARGET}" |
| 120 | 150 | ||
| 121 | |||
| 122 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" | 151 | ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${target_includedir}" |
| 152 | |||
| 153 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 154 | |||
| 155 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
| 156 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}"))}" | ||
| 157 | |||
| 158 | do_install () { | ||
| 159 | oe_runmake 'DESTDIR=${D}' install-host | ||
| 160 | |||
| 161 | install -d ${D}${target_base_libdir} | ||
| 162 | install -d ${D}${target_libdir} | ||
| 163 | |||
| 164 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 | ||
| 165 | # gfortran is fully backwards compatible. This is a safe and practical solution. | ||
| 166 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true | ||
| 167 | |||
| 168 | |||
| 169 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
| 170 | # found. These need to be relative paths so they work in different locations. | ||
| 171 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
| 172 | install -d $dest | ||
| 173 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
| 174 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | ||
| 175 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t | ||
| 176 | done | ||
| 177 | |||
| 178 | # Remove things we don't need but keep share/java | ||
| 179 | for d in info man share/doc share/locale share/man share/info; do | ||
| 180 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d | ||
| 181 | done | ||
| 182 | |||
| 183 | # We use libiberty from binutils | ||
| 184 | find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f | ||
| 185 | find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f | ||
| 186 | |||
| 187 | # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build | ||
| 188 | case ${PN} in | ||
| 189 | *gcc-cross|*gcc-crosssdk) | ||
| 190 | dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS} | ||
| 191 | cp -fpPR . $dest | ||
| 192 | ;; | ||
| 193 | esac | ||
| 194 | } | ||
| 195 | |||
| 196 | do_package[noexec] = "1" | ||
| 197 | do_packagedata[noexec] = "1" | ||
| 198 | do_package_write_ipk[noexec] = "1" | ||
| 199 | do_package_write_rpm[noexec] = "1" | ||
| 200 | do_package_write_deb[noexec] = "1" | ||
diff --git a/meta/recipes-devtools/gcc/gcc-package-cross.inc b/meta/recipes-devtools/gcc/gcc-package-cross.inc deleted file mode 100644 index 3d8167703f..0000000000 --- a/meta/recipes-devtools/gcc/gcc-package-cross.inc +++ /dev/null | |||
| @@ -1,48 +0,0 @@ | |||
| 1 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 2 | |||
| 3 | # Compute how to get from libexecdir to bindir in python (easier than shell) | ||
| 4 | BINRELPATH = "${@oe.path.relative(d.expand("${libexecdir}/gcc/${TARGET_SYS}/${BINV}"), d.expand("${STAGING_DIR_NATIVE}${prefix_native}/bin/${MULTIMACH_TARGET_SYS}"))}" | ||
| 5 | |||
| 6 | do_install () { | ||
| 7 | oe_runmake 'DESTDIR=${D}' install-host | ||
| 8 | |||
| 9 | install -d ${D}${target_base_libdir} | ||
| 10 | install -d ${D}${target_libdir} | ||
| 11 | |||
| 12 | # Link gfortran to g77 to satisfy not-so-smart configure or hard coded g77 | ||
| 13 | # gfortran is fully backwards compatible. This is a safe and practical solution. | ||
| 14 | ln -sf ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}gfortran ${STAGING_DIR_NATIVE}${prefix_native}/bin/${TARGET_PREFIX}g77 || true | ||
| 15 | |||
| 16 | |||
| 17 | # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are | ||
| 18 | # found. These need to be relative paths so they work in different locations. | ||
| 19 | dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/ | ||
| 20 | install -d $dest | ||
| 21 | for t in ar as ld nm objcopy objdump ranlib strip g77 gcc cpp gfortran; do | ||
| 22 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t $dest$t | ||
| 23 | ln -sf ${BINRELPATH}/${TARGET_PREFIX}$t ${dest}${TARGET_PREFIX}$t | ||
| 24 | done | ||
| 25 | |||
| 26 | # Remove things we don't need but keep share/java | ||
| 27 | for d in info man share/doc share/locale share/man share/info; do | ||
| 28 | rm -rf ${D}${STAGING_DIR_NATIVE}${prefix_native}/$d | ||
| 29 | done | ||
| 30 | |||
| 31 | # We use libiberty from binutils | ||
| 32 | find ${D}${exec_prefix}/lib -name libiberty.a | xargs rm -f | ||
| 33 | find ${D}${exec_prefix}/lib -name libiberty.h | xargs rm -f | ||
| 34 | |||
| 35 | # gcc-runtime installs libgcc into a special location in staging since it breaks doing a standalone build | ||
| 36 | case ${PN} in | ||
| 37 | *gcc-cross|*gcc-crosssdk) | ||
| 38 | dest=${D}/${includedir}/gcc-build-internal-${MULTIMACH_TARGET_SYS} | ||
| 39 | cp -fpPR . $dest | ||
| 40 | ;; | ||
| 41 | esac | ||
| 42 | } | ||
| 43 | |||
| 44 | do_package[noexec] = "1" | ||
| 45 | do_packagedata[noexec] = "1" | ||
| 46 | do_package_write_ipk[noexec] = "1" | ||
| 47 | do_package_write_rpm[noexec] = "1" | ||
| 48 | do_package_write_deb[noexec] = "1" | ||
