Files
poky/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
MiLo 3991c5520e gcc: Enable OpenMP compiling and library
Multicore embedded systems are getting more and more common.

Remove "--disable-openmp" from the GCC configuration options and
always build libgomp. This only creates a "bigger" compiler but
has no effect on the compiled binaries that don't use openmp.

Tested a clean build on mips32el and arm7a, no problems encountered.

Autoconf will not detect OpenMP after this change, because it will
build and run a target binary on the build system. In order to use
OpenMP, the variable ac_cv_prog_c_openmp=-fopenmp must be set.

(From OE-Core rev: fdf37b792c13a1fc3f63faf471f0403396414a35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:43 +00:00

58 lines
1.6 KiB
PHP

require gcc-configure-common.inc
CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
EXTRA_OECONF_PATHS = " \
--with-gxx-include-dir=${includedir}/c++/ \
--with-sysroot=${STAGING_DIR_TARGET} \
--with-build-sysroot=${STAGING_DIR_TARGET}"
RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
# ?
# libiberty
# libmudflap
# libgfortran
do_configure () {
export CXX="${CXX} -nostdinc++ -nostdlib++"
mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-nativesdk##`
target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
for d in libgcc ${RUNTIMETARGET}; do
echo "Configuring $d"
rm -rf ${B}/$target/$d/
mkdir -p ${B}/$target/$d/
cd ${B}/$target/$d/
chmod a+x ${S}/$d/configure
${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
done
}
do_compile () {
target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
for d in libgcc ${RUNTIMETARGET}; do
cd ${B}/$target/$d/
oe_runmake MULTIBUILDTOP=${B}/$target/$d/
done
}
do_install () {
target=`echo ${TARGET_SYS} | sed -e s#-nativesdk##`
for d in ${RUNTIMETARGET}; do
cd ${B}/$target/$d/
oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
if [ "$d" = "libgomp" ]; then
rm -rf ${D}${datadir}/info/libgomp.info ${D}${datadir}/info/dir
rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
rmdir --ignore-fail-on-non-empty -p ${D}${datadir}/info
fi
done
chown -R root:root ${D}
}
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
BBCLASSEXTEND = "nativesdk"