Openembedded Core Discussions
 help / color / mirror / Atom feed
From: <kai.kang@windriver.com>
To: <richard.purdie@linuxfoundation.org>
Cc: <openembedded-core@lists.openembedded.org>
Subject: [PATCH v3 1/1] gfortran: update runtime dependencies
Date: Sun, 16 Jun 2024 23:31:35 +0800	[thread overview]
Message-ID: <20240616153135.3058410-2-kai.kang@windriver.com> (raw)
In-Reply-To: <20240616153135.3058410-1-kai.kang@windriver.com>

From: Kai Kang <kai.kang@windriver.com>

It fails to run both `gcc` and `gfortran` with errors:

| root@qemux86-64:~# x86_64-poky-linux-gcc a.c
| x86_64-poky-linux-gcc: fatal error: cannot execute 'as': posix_spawnp: No such file or directory

then add binutils which provides `as` to RDEPENDS of gcc.

libgfortran-dev provides libgfortran.spec which required by gfortran:

| root@qemux86-64:~# gfortran hello.f95
| gfortran: fatal error: cannot read spec file 'libgfortran.spec': No such file or directory

And gcc provides liblto_plugin.so:

| root@qemux86-64:~# gfortran hello.f95
| gfortran: fatal error: '-fuse-linker-plugin', but liblto_plugin.so not found

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-devtools/gcc/gcc-target.inc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 8e9693b4cb..e9187fc444 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -33,7 +33,7 @@ PACKAGES = "\
     ${PN} ${PN}-plugins ${PN}-symlinks \
     g++ g++-symlinks \
     cpp cpp-symlinks \
-    gfortran gfortran-symlinks \
+    ${@bb.utils.contains('FORTRAN', ',fortran', 'gfortran gfortran-symlinks', '', d)} \
     gcov gcov-symlinks \
     ${PN}-doc \
     ${PN}-dev \
@@ -60,7 +60,7 @@ RRECOMMENDS:${PN} += "\
     libssp \
     libssp-dev \
 "
-RDEPENDS:${PN} += "cpp"
+RDEPENDS:${PN} += "binutils cpp"
 
 FILES:${PN}-dev = "\
     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
@@ -80,10 +80,15 @@ FILES:${PN}-plugins = "\
 "
 ALLOW_EMPTY:${PN}-plugins = "1"
 
+INSANE_SKIP:${MLPREFIX}gfortran += "dev-deps"
 FILES:gfortran = "\
     ${bindir}/${TARGET_PREFIX}gfortran \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/f951 \
 "
+RDEPENDS:gfortran = "\
+    gcc \
+    libgfortran-dev \
+"
 RRECOMMENDS:gfortran = "\
     libquadmath \
     libquadmath-dev \
-- 
2.34.1



  reply	other threads:[~2024-06-16 15:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16 15:31 [PATCH v3 0/1] Update for gfortran kai.kang
2024-06-16 15:31 ` kai.kang [this message]
2024-06-19 13:24   ` [OE-core] [PATCH v3 1/1] gfortran: update runtime dependencies Martin Jansa
     [not found]   ` <17DA6AA6C1087792.28936@lists.openembedded.org>
2024-06-19 15:00     ` Martin Jansa
2024-06-24 10:12       ` Kai
2024-07-15  9:59         ` Martin Jansa
2024-07-15 10:20           ` Kai
2024-07-15 10:37             ` Richard Purdie
     [not found]             ` <17E25C9ABAE28545.4882@lists.openembedded.org>
2024-07-15 12:15               ` Richard Purdie
2024-06-18  6:40 ` [OE-core] [PATCH v3 0/1] Update for gfortran Alexandre Belloni
2024-06-18  7:14   ` Alexandre Belloni
2024-06-24 10:06   ` Kai
2024-06-27 22:16     ` Alexandre Belloni
2024-07-01  3:28       ` Kai

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=20240616153135.3058410-2-kai.kang@windriver.com \
    --to=kai.kang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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