[OE-core] [PATCH 1/3] gcc-6.3: Fix libgfortran build

Khem Raj raj.khem at gmail.com
Mon Jul 3 16:03:47 UTC 2017


On Fri, Jun 30, 2017 at 1:51 AM, Ricardo Ribalda Delgado
<ricardo.ribalda at gmail.com> wrote:
> Without this patch libbacktrace cannot be included/link during
> libgfortran build.
>
> libbtool: link: cannot find the library `../libbacktrace/libbacktrace.la'
> or unhandled argument `../libbacktrace/libbacktrace.la'
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
> ---
>  meta/recipes-devtools/gcc/gcc-6.3.inc              |  1 +
>  .../gcc/gcc-6.3/0099-Fix-gfortran-build.patch      | 44 ++++++++++++++++++++++
>  2 files changed, 45 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-6.3/0099-Fix-gfortran-build.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-6.3.inc b/meta/recipes-devtools/gcc/gcc-6.3.inc
> index 86b3e9ff19a4..36a116d48fb4 100644
> --- a/meta/recipes-devtools/gcc/gcc-6.3.inc
> +++ b/meta/recipes-devtools/gcc/gcc-6.3.inc
> @@ -74,6 +74,7 @@ SRC_URI = "\
>             file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
>             file://0048-sync-gcc-stddef.h-with-musl.patch \
>             file://0054_all_nopie-all-flags.patch \
> +           file://0099-Fix-gfortran-build.patch \

call it 0055 for legibility sake.

>             ${BACKPORTS} \
>  "
>  BACKPORTS = "\
> diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0099-Fix-gfortran-build.patch b/meta/recipes-devtools/gcc/gcc-6.3/0099-Fix-gfortran-build.patch
> new file mode 100644
> index 000000000000..32b2f9a0567f
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-6.3/0099-Fix-gfortran-build.patch
> @@ -0,0 +1,44 @@
> +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
> +index 39d3e11d223c..b5efe6dfe195 100644
> +--- a/libgfortran/Makefile.am
> ++++ b/libgfortran/Makefile.am
> +@@ -37,7 +37,7 @@ toolexeclib_LTLIBRARIES = libgfortran.la
> + toolexeclib_DATA = libgfortran.spec
> + libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
> + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
> +-      $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \
> ++      $(LTLDFLAGS) $(LIBQUADLIB) ../../libbacktrace/libbacktrace.la \
> +       -lm $(extra_ldflags_libgfortran) \
> +       $(version_arg) -Wc,-shared-libgcc
> + libgfortran_la_DEPENDENCIES = $(version_dep) libgfortran.spec $(LIBQUADLIB_DEP)
> +@@ -63,7 +63,7 @@ AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \
> +             -I$(MULTIBUILDTOP)../libgcc \
> +             -I$(srcdir)/$(MULTISRCTOP)../libbacktrace \
> +             -I$(MULTIBUILDTOP)../libbacktrace \
> +-            -I../libbacktrace
> ++            -I../../libbacktrace
> +
> + # Fortran rules for complex multiplication and division
> + AM_CFLAGS += -fcx-fortran-rules
> +diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in
> +index 7ed080cf7b0d..d197fbd6b683 100644
> +--- a/libgfortran/Makefile.in
> ++++ b/libgfortran/Makefile.in
> +@@ -598,7 +598,7 @@ toolexeclib_LTLIBRARIES = libgfortran.la
> + toolexeclib_DATA = libgfortran.spec
> + libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
> + libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
> +-      $(LTLDFLAGS) $(LIBQUADLIB) ../libbacktrace/libbacktrace.la \
> ++      $(LTLDFLAGS) $(LIBQUADLIB) ../../libbacktrace/libbacktrace.la \
> +       -lm $(extra_ldflags_libgfortran) \
> +       $(version_arg) -Wc,-shared-libgcc
> +
> +@@ -618,7 +618,7 @@ AM_CPPFLAGS = -iquote$(srcdir)/io -I$(srcdir)/$(MULTISRCTOP)../gcc \
> +             -I$(MULTIBUILDTOP)../libgcc \
> +             -I$(srcdir)/$(MULTISRCTOP)../libbacktrace \
> +             -I$(MULTIBUILDTOP)../libbacktrace \
> +-            -I../libbacktrace
> ++            -I../../libbacktrace
> +
> + gfor_io_src = io/size_from_kind.c $(am__append_2)
> + gfor_io_headers = \
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list