From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Khem Raj <raj.khem@gmail.com>,
openembedded-core@lists.openembedded.org,
Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Subject: Re: [PATCH 8/9] gcc-7.2: Fix libgfortran build
Date: Tue, 19 Dec 2017 11:08:45 +0000 [thread overview]
Message-ID: <1513681725.16507.62.camel@linuxfoundation.org> (raw)
In-Reply-To: <20171212172317.601-8-raj.khem@gmail.com>
On Tue, 2017-12-12 at 09:23 -0800, Khem Raj wrote:
> From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
>
> 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@gmail.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/recipes-devtools/gcc/gcc-7.2.inc | 1 +
> .../gcc/gcc-7.2/0051-Fix-gfortran-build.patch | 53
> ++++++++++++++++++++++
> 2 files changed, 54 insertions(+)
> create mode 100644 meta/recipes-devtools/gcc/gcc-7.2/0051-Fix-
> gfortran-build.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-
> devtools/gcc/gcc-7.2.inc
> index 1d40cba731..baf98aeba8 100644
> --- a/meta/recipes-devtools/gcc/gcc-7.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-7.2.inc
> @@ -75,6 +75,7 @@ SRC_URI = "\
> file://0048-gcc-Enable-static-PIE.patch \
> file://fix-segmentation-fault-precompiled-hdr.patch \
> file://0050-RISC-V-Handle-non-legitimate-address-in-
> riscv_legiti.patch \
> + file://0051-Fix-gfortran-build.patch \
> ${BACKPORTS} \
> "
> BACKPORTS = "\
> diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0051-Fix-gfortran-
> build.patch b/meta/recipes-devtools/gcc/gcc-7.2/0051-Fix-gfortran-
> build.patch
> new file mode 100644
> index 0000000000..a71b6b0bee
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-7.2/0051-Fix-gfortran-build.patch
> @@ -0,0 +1,53 @@
> +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'
> +
> +Upstream-Status: Inappropriate [OE specific]
> +Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
> +
> +diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am
> +index 2857af5943f9..e07760069a3c 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 \
> + $(HWCAP_LDFLAGS) \
> + -lm $(extra_ldflags_libgfortran) \
> + $(version_arg) -Wc,-shared-libgcc
> +@@ -64,7 +64,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 05b183dcadb0..c9e0280e412c 100644
> +--- a/libgfortran/Makefile.in
> ++++ b/libgfortran/Makefile.in
> +@@ -581,7 +581,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 \
> + $(HWCAP_LDFLAGS) \
> + -lm $(extra_ldflags_libgfortran) \
> + $(version_arg) -Wc,-shared-libgcc
> +@@ -602,7 +602,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 = \
Did you try this for something other than x86_64? I think this won't
work when cross compiling and host != target.
I do have a better fix which might work in mind...
Cheers,
Richard
next prev parent reply other threads:[~2017-12-19 11:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-12 17:23 [PATCH 1/9] binutils: update to 2.29.1 Khem Raj
2017-12-12 17:23 ` [PATCH 2/9] binutils: Convert SRC_URI and SRCREV to weak defines Khem Raj
2017-12-12 17:23 ` [PATCH 3/9] gdb: Upgrade to 8.0.1 Khem Raj
2017-12-12 17:23 ` [PATCH 4/9] gcc6: enable FL_LPAE flag for armv7ve cores Khem Raj
2017-12-12 17:23 ` [PATCH 5/9] musl: Disable thumb1 ISA Khem Raj
2017-12-12 17:23 ` [PATCH 6/9] musl: Update to latest Khem Raj
2017-12-12 17:23 ` [PATCH 7/9] glibc: Upgrade to latest on 2.26 release Khem Raj
2017-12-12 17:23 ` [PATCH 8/9] gcc-7.2: Fix libgfortran build Khem Raj
2017-12-19 11:08 ` Richard Purdie [this message]
2017-12-19 14:19 ` Ricardo Ribalda Delgado
2017-12-12 17:23 ` [PATCH 9/9] gcc-6.4: " Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1513681725.16507.62.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=ricardo.ribalda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox