This is the mail archive of the
mailing list for the GCC project.
Re: [patch, libgfortran, configure] Cross-compile support for libgfortran
- From: Marcus Shawcroft <marcus dot shawcroft at gmail dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: burnus at net-b dot de, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, fortran at gcc dot gnu dot org
- Date: Mon, 23 Sep 2013 16:26:23 +0100
- Subject: Re: [patch, libgfortran, configure] Cross-compile support for libgfortran
- Authentication-results: sourceware.org; auth=none
- References: <9537bcb6-1a09-4bb8-adec-3932a1bfa333 at BAMAIL02 dot ba dot imgtec dot org>
On 4 June 2013 20:49, Steve Ellcey <firstname.lastname@example.org> wrote:
> This patch allows me to build libgfortran for a cross-compiling toolchain
> using newlib. Currently the checks done by AC_CHECK_FUNCS_ONCE fail with
> my toolchain because the compile/link fails due to the configure script not
> using the needed linker script in the link command. The check for with_newlib
> is how libjava deals with the problem and it fixes my build problems.
> My only concern is defining HAVE_STRTOLD, strtold exists in my newlib but
> I am not sure if that is true for all newlib builds. I didn't see any
> flags that I could easily use to check for long double support in the
> libgfortran configure.ac, but it seems to assume that the type exists.
> OK to checkin?
This patch breaks systems where long double is wider than double. The
newlib implementation provides strtold for systems where double is as
wide as long double but not on systems where long double is wider.
I don;t see any issues with AC_CHECK_FUNC_ONCE when cross configuring
aarch64 toolchains but I would have thought that fixing the link test
issue you encountered would be preferable to hard coding assumptions
in the configure script?