From: Samuel Martin <s.martin49@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 08/14] toolchain/helpers: add fortran check
Date: Sun, 3 Jul 2016 15:47:44 +0200 [thread overview]
Message-ID: <20160703134750.7516-9-s.martin49@gmail.com> (raw)
In-Reply-To: <20160703134750.7516-1-s.martin49@gmail.com>
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:
- use real files as input/output in the test (Thomas P.)
---
toolchain/helpers.mk | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 108fdaa..74ec944 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -311,6 +311,24 @@ check_cplusplus = \
fi
#
+#
+# Check that the external toolchain supports Fortran
+#
+# $1: cross-gfortran path
+#
+check_fortran = \
+ __CROSS_FC=$(strip $1) ; \
+ __o=$(BUILD_DIR)/.br-toolchain-test-fortran.tmp.f.o ; \
+ printf 'program hello\n\tprint *, "Hello Fortran!\\n"\nend program hello\n' | \
+ $${__CROSS_FC} -x f95 -o $${__o} - ; \
+ if test $$? -ne 0 ; then \
+ rm -f $${__o}* ; \
+ echo "Fortran support is selected but is not available in external toolchain" ; \
+ exit 1 ; \
+ fi ; \
+ rm -f $${__o}* \
+
+#
# Check that the cross-compiler given in the configuration exists
#
# $1: cross-gcc path
--
2.9.0
next prev 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 ` [Buildroot] [PATCH v3 03/14] package/gcc: fix fortran support Samuel Martin
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 ` Samuel Martin [this message]
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-9-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