Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 03/14] package/gcc: fix fortran support
Date: Sun,  3 Jul 2016 15:47:39 +0200	[thread overview]
Message-ID: <20160703134750.7516-4-s.martin49@gmail.com> (raw)
In-Reply-To: <20160703134750.7516-1-s.martin49@gmail.com>

Fortran depends on libquadmath when available, make the buildroot
toolchain option depends on this new hidden symbol,

[Vincent: only do "HOST_GCC_FINAL_USR_LIBS += libquadmath" for i386 and
x86_64, otherwise it will fail saying "libquadmath.a: file not found"]

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

---
changes v1->v2:
- none

changes v2->v3:
- s/BR2_I386/BR2_i386/ (Thomas P.)
- use BR2_TOOLCHAIN_HAS_LIBQUADMATH to install the lib
- rephrase commit log
- update dependencies in Config.in
---
 package/gcc/Config.in.host         | 7 +++++++
 package/gcc/gcc-final/gcc-final.mk | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 44a72f1..8a42828 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -118,8 +118,15 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
 	  C++ language and you want C++ libraries to be installed on
 	  your target system.
 
+comment "Fortran support needs a toolchain w/ wchar"
+	depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH
+	depends on !BR2_USE_WCHAR # libquadmath
+
 config BR2_TOOLCHAIN_BUILDROOT_FORTRAN
 	bool "Enable Fortran support"
+	# on architecture building libqadmath, wchar is required
+	depends on !BR2_TOOLCHAIN_HAS_LIBQUADMATH || \
+		(BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR)
 	help
 	  Enable this option if you want your toolchain to support the
 	  Fortran language and you want Fortran libraries to be
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 78ceeba..284d34c 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -163,6 +163,10 @@ endif
 
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y)
 HOST_GCC_FINAL_USR_LIBS += libgfortran
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
+HOST_GCC_FINAL_USR_LIBS += libquadmath
+endif
 endif
 
 ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
-- 
2.9.0

  parent reply	other threads:[~2016-07-03 13:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-03 13:47 [Buildroot] [PATCH v3 00/14] Fortran support for all toolchains Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 01/14] toolchain/toolchain-common.in: add BR2_TOOLCHAIN_HAS_LIBQUADMATH hidden symbol Samuel Martin
2016-07-04  9:16   ` Arnout Vandecappelle
2016-07-04 14:22     ` Thomas Petazzoni
2016-07-03 13:47 ` [Buildroot] [PATCH v3 02/14] package/gcc: complete the logic on libquadmath Samuel Martin
2016-07-03 13:47 ` Samuel Martin [this message]
2016-07-03 13:47 ` [Buildroot] [PATCH v3 04/14] toolchain: add hidden symbol for fortran support in the toolchain Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 05/14] docs/manual: document dependency on fortran Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 06/14] package/gcc: select BR2_TOOLCHAIN_HAS_FORTRAN when appropriate Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 07/14] pkg-cmake.mk: export the fortran compiler path in the CMake toolchain file Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 08/14] toolchain/helpers: add fortran check Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 09/14] toolchain/toolchain-external: enable fortran check when it is selected Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 10/14] toolchain/toolchain-external: add libgfortran and libquadmath to the TOOLCHAIN_EXTERNAL_LIBS list Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 11/14] toolchain/toolchain-external: add knob for fortran support Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 12/14] toolchain/toolchain-external: update external toolchain configuration with BR2_TOOLCHAIN_HAS_FORTRAN Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 13/14] package/fftw: add fortran support Samuel Martin
2016-07-03 13:47 ` [Buildroot] [PATCH v3 14/14] package/lapack: new package Samuel Martin
2016-07-03 15:02 ` [Buildroot] [PATCH v3 00/14] Fortran support for all toolchains Thomas Petazzoni
2016-07-04 22:56   ` Samuel Martin
2016-07-05  6:33     ` Thomas Petazzoni
2016-07-05  6:48       ` Samuel Martin

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=20160703134750.7516-4-s.martin49@gmail.com \
    --to=s.martin49@gmail.com \
    --cc=buildroot@busybox.net \
    /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