diff options
Diffstat (limited to 'recipes-devtools/gcc/gcc-configure-runtime.inc')
| -rw-r--r-- | recipes-devtools/gcc/gcc-configure-runtime.inc | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/gcc-configure-runtime.inc b/recipes-devtools/gcc/gcc-configure-runtime.inc new file mode 100644 index 0000000000..f9ad61d129 --- /dev/null +++ b/recipes-devtools/gcc/gcc-configure-runtime.inc | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | require gcc-configure-common.inc | ||
| 2 | |||
| 3 | EXTRA_OECONF_PATHS = " \ | ||
| 4 | --with-local-prefix=${STAGING_DIR_TARGET}${prefix} \ | ||
| 5 | --with-gxx-include-dir=${includedir}/c++/ \ | ||
| 6 | --with-sysroot=${STAGING_DIR_TARGET} \ | ||
| 7 | --with-build-sysroot=${STAGING_DIR_TARGET}" | ||
| 8 | |||
| 9 | RUNTIMETARGET = "libssp libstdc++-v3" | ||
| 10 | # ? | ||
| 11 | # libiberty | ||
| 12 | # libmudflap | ||
| 13 | # libgfortran | ||
| 14 | |||
| 15 | do_configure () { | ||
| 16 | export CXX="${CXX} -nostdinc++ -nostdlib++" | ||
| 17 | for d in ${RUNTIMETARGET}; do | ||
| 18 | echo "Configuring $d" | ||
| 19 | mkdir -p ${B}/$d/ | ||
| 20 | cd ${B}/$d/ | ||
| 21 | chmod a+x ${S}/$d/configure | ||
| 22 | ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
| 23 | done | ||
| 24 | } | ||
| 25 | |||
| 26 | do_compile () { | ||
| 27 | for d in ${RUNTIMETARGET}; do | ||
| 28 | cd ${B}/$d/ | ||
| 29 | oe_runmake | ||
| 30 | done | ||
| 31 | } | ||
| 32 | |||
| 33 | do_install () { | ||
| 34 | target=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##` | ||
| 35 | |||
| 36 | # Install libgcc from our gcc-cross saved data | ||
| 37 | install -d ${D}${base_libdir} ${D}${libdir} | ||
| 38 | cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$target/* ${D} | ||
| 39 | |||
| 40 | for d in ${RUNTIMETARGET}; do | ||
| 41 | cd ${B}/$d/ | ||
| 42 | oe_runmake 'DESTDIR=${D}' install | ||
| 43 | done | ||
| 44 | |||
| 45 | # Move libgcc_s into /lib | ||
| 46 | mkdir -p ${D}${base_libdir} | ||
| 47 | if [ -f ${D}${libdir}/nof/libgcc_s.so ]; then | ||
| 48 | mv ${D}${libdir}/nof/libgcc* ${D}${base_libdir} | ||
| 49 | else | ||
| 50 | mv ${D}${libdir}/libgcc* ${D}${base_libdir} || true | ||
| 51 | fi | ||
| 52 | } | ||
| 53 | |||
| 54 | INHIBIT_DEFAULT_DEPS = "1" | ||
| 55 | DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" | ||
| 56 | PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs" | ||
| 57 | |||
| 58 | BBCLASSEXTEND = "nativesdk" | ||
| 59 | |||
