This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libgfortran, configure] Cross-compile support for libgfortran


On 23/09/13 18:43, Steve Ellcey wrote:
> On Mon, 2013-09-23 at 16:26 +0100, Marcus Shawcroft wrote:
>> On 4 June 2013 20:49, Steve Ellcey <sellcey@mips.com> 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?
>>
>> Cheers
>> /Marcus
> 
> AC_CHECK_FUNC_ONCE may work for aarch64 but I don't think there is
> anyway to make it work generally for all platforms.  In the libjava
> configure.ac file is the comments:
> 

I think it would be preferable to check whether link tests do something
sane and only fall back to hard coding choices when that is not the
case.  As you've currently written things we do it the other way around.
 Historically that's caused problems as newlib has evolved.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]