2013-08-22 09:43:59 +00:00
|
|
|
GCCMULTILIB = "--enable-multilib"
|
|
|
|
require gcc-configure-common.inc
|
|
|
|
|
2014-08-14 19:05:51 +00:00
|
|
|
EXTRA_OECONF_PATHS = "\
|
2013-08-22 09:43:59 +00:00
|
|
|
--with-sysroot=/ \
|
|
|
|
--with-build-sysroot=${STAGING_DIR_TARGET} \
|
|
|
|
--with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
|
2014-08-14 19:05:51 +00:00
|
|
|
--with-gxx-include-dir=${includedir}/c++/${BINV} \
|
|
|
|
"
|
2013-08-22 09:43:59 +00:00
|
|
|
|
2014-08-14 19:05:55 +00:00
|
|
|
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
|
|
|
|
|
2014-08-14 19:05:56 +00:00
|
|
|
EXTRA_OECONF_GCC_FLOAT = "${@get_gcc_float_setting(bb, d)}"
|
2014-05-01 15:40:19 +00:00
|
|
|
|
2008-03-18 10:41:39 +00:00
|
|
|
PACKAGES = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${PN} ${PN}-plugins ${PN}-symlinks \
|
|
|
|
g++ g++-symlinks \
|
|
|
|
cpp cpp-symlinks \
|
|
|
|
g77 g77-symlinks \
|
|
|
|
gfortran gfortran-symlinks \
|
|
|
|
gcov gcov-symlinks \
|
|
|
|
${PN}-plugin-dev \
|
|
|
|
${PN}-doc \
|
|
|
|
${PN}-dev \
|
|
|
|
${PN}-dbg \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
FILES_${PN} = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/${TARGET_PREFIX}gcc* \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/collect2 \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc* \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lto* \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/liblto*${SOLIBSDEV} \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/*.o \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/specs \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBS} \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/include \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
2011-09-26 20:13:21 +00:00
|
|
|
INSANE_SKIP_${PN} += "dev-so"
|
|
|
|
|
2011-07-05 21:28:00 +00:00
|
|
|
FILES_${PN}-dbg += "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
|
2011-07-05 21:28:00 +00:00
|
|
|
"
|
|
|
|
FILES_${PN}-dev = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
|
2011-07-05 21:28:00 +00:00
|
|
|
"
|
2012-03-02 22:29:21 +00:00
|
|
|
FILES_${PN}-plugin-dev = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/include/ \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/gengtype \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin/gtype.state \
|
2012-03-02 22:29:21 +00:00
|
|
|
"
|
2008-03-18 10:41:39 +00:00
|
|
|
FILES_${PN}-symlinks = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/cc \
|
|
|
|
${bindir}/gcc \
|
|
|
|
${bindir}/gccbug \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
|
2012-04-19 18:18:00 +00:00
|
|
|
FILES_${PN}-plugins = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/plugin \
|
2012-04-19 18:18:00 +00:00
|
|
|
"
|
|
|
|
ALLOW_EMPTY_${PN}-plugins = "1"
|
|
|
|
|
2008-03-18 10:41:39 +00:00
|
|
|
FILES_g77 = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/${TARGET_PREFIX}g77 \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f771 \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
FILES_g77-symlinks = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/g77 \
|
|
|
|
${bindir}/f77 \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
FILES_gfortran = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/${TARGET_PREFIX}gfortran \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
FILES_gfortran-symlinks = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/gfortran \
|
|
|
|
${bindir}/f95"
|
2008-03-18 10:41:39 +00:00
|
|
|
|
|
|
|
FILES_cpp = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/${TARGET_PREFIX}cpp \
|
|
|
|
${base_libdir}/cpp \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1"
|
2008-03-18 10:41:39 +00:00
|
|
|
FILES_cpp-symlinks = "${bindir}/cpp"
|
|
|
|
|
|
|
|
FILES_gcov = "${bindir}/${TARGET_PREFIX}gcov"
|
|
|
|
FILES_gcov-symlinks = "${bindir}/gcov"
|
|
|
|
|
|
|
|
FILES_g++ = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/${TARGET_PREFIX}g++ \
|
|
|
|
${libexecdir}/gcc/${TARGET_SYS}/${BINV}/cc1plus \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
FILES_g++-symlinks = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${bindir}/c++ \
|
|
|
|
${bindir}/g++ \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
FILES_${PN}-doc = "\
|
2014-08-14 19:05:51 +00:00
|
|
|
${infodir} \
|
|
|
|
${mandir} \
|
|
|
|
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
|
2008-03-18 10:41:39 +00:00
|
|
|
"
|
|
|
|
|
2014-04-27 00:23:46 +00:00
|
|
|
do_compile () {
|
|
|
|
oe_runmake all-host
|
|
|
|
}
|
|
|
|
|
2008-03-18 10:41:39 +00:00
|
|
|
do_install () {
|
2010-03-29 21:27:13 +00:00
|
|
|
oe_runmake 'DESTDIR=${D}' install-host
|
2014-04-27 00:23:46 +00:00
|
|
|
|
|
|
|
# Add unwind.h, it comes from libgcc which we don't want to build again
|
|
|
|
install ${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/gcc/${TARGET_SYS}/${BINV}/include/unwind.h ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/
|
|
|
|
|
2014-04-02 12:25:35 +00:00
|
|
|
# Info dir listing isn't interesting at this point so remove it if it exists.
|
|
|
|
if [ -e "${D}${infodir}/dir" ]; then
|
|
|
|
rm -f ${D}${infodir}/dir
|
|
|
|
fi
|
2008-03-18 10:41:39 +00:00
|
|
|
|
|
|
|
# Cleanup some of the ${libdir}{,exec}/gcc stuff ...
|
|
|
|
rm -r ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
|
|
|
rm -r ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/install-tools
|
2011-07-18 08:16:07 +00:00
|
|
|
rm -rf ${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/*.la
|
2012-04-19 18:18:00 +00:00
|
|
|
rmdir ${D}${includedir}
|
2013-09-05 21:14:45 +00:00
|
|
|
rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
|
2008-03-18 10:41:39 +00:00
|
|
|
|
|
|
|
# Hack around specs file assumptions
|
|
|
|
test -f ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs && sed -i -e '/^*cross_compile:$/ { n; s/1/0/; }' ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/specs
|
|
|
|
|
|
|
|
# Cleanup manpages..
|
|
|
|
rm -rf ${D}${mandir}/man7
|
|
|
|
|
|
|
|
cd ${D}${bindir}
|
|
|
|
|
|
|
|
# We care about g++ not c++
|
|
|
|
rm -f *c++
|
|
|
|
|
|
|
|
# We don't care about the gcc-<version> ones for this
|
|
|
|
rm -f *gcc-?.?*
|
|
|
|
|
2011-03-01 14:44:12 +00:00
|
|
|
# We use libiberty from binutils
|
2013-02-04 09:20:23 +00:00
|
|
|
find ${D}${libdir} -name libiberty.a | xargs rm -f
|
|
|
|
find ${D}${libdir} -name libiberty.h | xargs rm -f
|
2011-03-01 14:44:12 +00:00
|
|
|
|
2011-07-05 21:28:00 +00:00
|
|
|
# Not sure why we end up with these but we don't want them...
|
|
|
|
rm -f ${TARGET_PREFIX}${TARGET_PREFIX}*
|
|
|
|
|
2008-03-18 10:41:39 +00:00
|
|
|
# Symlinks so we can use these trivially on the target
|
2011-07-05 21:28:00 +00:00
|
|
|
if [ -e ${TARGET_PREFIX}g77 ]; then
|
|
|
|
ln -sf ${TARGET_PREFIX}g77 g77 || true
|
|
|
|
ln -sf g77 f77 || true
|
|
|
|
fi
|
|
|
|
if [ -e ${TARGET_PREFIX}gfortran ]; then
|
|
|
|
ln -sf ${TARGET_PREFIX}gfortran gfortran || true
|
|
|
|
ln -sf gfortran f95 || true
|
|
|
|
fi
|
2011-05-04 19:26:12 +00:00
|
|
|
ln -sf ${TARGET_PREFIX}g++ g++
|
|
|
|
ln -sf ${TARGET_PREFIX}gcc gcc
|
2011-07-05 21:28:00 +00:00
|
|
|
ln -sf ${TARGET_PREFIX}cpp cpp
|
2011-11-16 09:49:44 +00:00
|
|
|
install -d ${D}${base_libdir}
|
|
|
|
ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp
|
2008-03-18 10:41:39 +00:00
|
|
|
ln -sf g++ c++
|
|
|
|
ln -sf gcc cc
|
2011-06-24 18:26:11 +00:00
|
|
|
|
|
|
|
chown -R root:root ${D}
|
2008-03-18 10:41:39 +00:00
|
|
|
}
|