[OE-core] [PATCH RFC] gcc-runtime: Hacks for libgfortran with gcc-4.8
Khem Raj
raj.khem at gmail.com
Fri Sep 6 07:08:03 UTC 2013
On Sep 5, 2013, at 2:17 PM, Richard Purdie <richard.purdie at linuxfoundation.org> wrote:
> These are the hacks I needed to make libgfortran build. This is ugly, no
> argument from me. We could probably get better results if we patch
> configure and libtool to stop doing nasty things. I've probably taken
> this as far as I'd want to though, not being a particular fan of
> fortran...
>
> Khem: Any thoughts on this?
>
> Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
> ---
> diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
> index 2599760..395623f 100644
> --- a/meta/recipes-devtools/gcc/gcc-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
> @@ -18,6 +18,9 @@ RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
> # libmudflap
> # libgfortran
>
> +DEPENDS_append = " chrpath-replacement-native"
> +EXTRANATIVEPATH += "chrpath-native"
> +
> do_configure () {
> export CXX="${CXX} -nostdinc++ -nostdlib++"
> mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
> @@ -30,6 +33,11 @@ do_configure () {
> cd ${B}/$target/$d/
> chmod a+x ${S}/$d/configure
> ${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
> + # Ugly hack, libgfortran configure looks for ../libquadmath/libquadmath.la
Maybe we should explicitly --enable-libquadmath in gcc-cross when fortran is asked for in RUNTIMETARGETS
might avoid some of below.
>
> + # so we need to compile it before configure
> + if [ "$d" = "libquadmath" ]; then
> + oe_runmake MULTIBUILDTOP=${B}/$target/$d/
> + fi
> done
> }
>
> @@ -38,6 +46,16 @@ do_compile () {
> for d in libgcc ${RUNTIMETARGET}; do
> cd ${B}/$target/$d/
> oe_runmake MULTIBUILDTOP=${B}/$target/$d/
> + if [ "$d" = "libgfortran" ]; then
> + # libtool needs libdir to match the final installation directory which configure
> + # sets from output from this command (e.g. both set to /usr/lib/../lib
> + # It also adds bogus RPATHS which we have to delete
> + fulllibdir=`$CC -print-multi-os-directory`
> + if [ $fulllibdir != "." ]; then
> + sed -i -e "s#relink_command=.*#relink_command=#" ${B}/$target/$d/libgfortran.la
> + chrpath -d `readlink -f ${B}/$target/$d/.libs/libgfortran.so`
> + fi
> + fi
hmm remind me but I think we use unmodified libtool that comes with gcc IIRC. if we used libtool-cross then this could
be fixed there
> done
> }
>
>
>
>
More information about the Openembedded-core
mailing list