public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix tilegx libgcc with multilib
@ 2016-01-01 21:32 Bernd Edlinger
  2016-02-12 21:24 ` Walter Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Edlinger @ 2016-01-01 21:32 UTC (permalink / raw)
  To: Walter Lee, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 844 bytes --]

Hi Walter,


while playing with the tilegx cross compiler I noticed another defect.

Currently building a tilegx cross compiler fails in libgcc multilib configuration,
because of the following static assert in _FP_FROM_INT:

          _FP_STATIC_ASSERT ((rsize) <= 2 * _FP_W_TYPE_SIZE,            \
                             "rsize too large");                        \

previously that macro used to abort at run-time.  This happens apparently in all
float to ti-int conversions in the 32-bit target configuration.  So I assume that
softfp_int_modes should only contain ti for 64-bit target configurations.

The following patch makes the multilib libgcc build succeed for me,
but I can not test if the result is actually usable.

Really AFAICT these machines must be pretty cool, but I don't own one...


Thanks
Bernd.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-tilegx-libgcc.diff --]
[-- Type: text/x-patch; name="patch-tilegx-libgcc.diff", Size: 805 bytes --]

2016-01-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	*  config.host (tilegx*-*-linux*): Don't include
	tilegx/t-softfp in 32-bit configurations.

Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 231954)
+++ libgcc/config.host	(working copy)
@@ -1268,7 +1268,11 @@ tic6x-*-elf)
 	unwind_header=config/c6x/unwind-c6x.h
 	;;
 tilegx*-*-linux*)
-	tmake_file="${tmake_file} tilegx/t-crtstuff t-softfp-sfdf tilegx/t-softfp t-softfp tilegx/t-tilegx"
+	tmake_file="${tmake_file} tilegx/t-crtstuff t-softfp-sfdf"
+	if test "${host_address}" = 64; then
+		tmake_file="${tmake_file} tilegx/t-softfp"
+	fi
+	tmake_file="${tmake_file} t-softfp tilegx/t-tilegx"
 	md_unwind_header=tilepro/linux-unwind.h
         ;;
 tilepro*-*-linux*)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix tilegx libgcc with multilib
  2016-01-01 21:32 [PATCH] Fix tilegx libgcc with multilib Bernd Edlinger
@ 2016-02-12 21:24 ` Walter Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Walter Lee @ 2016-02-12 21:24 UTC (permalink / raw)
  To: Bernd Edlinger, gcc-patches

Hi Bernd.  Thanks for looking into that.  Your patch looks good and I 
have checked it in myself.

Walter

On 1/1/2016 4:31 PM, Bernd Edlinger wrote:
> Hi Walter,
>
>
> while playing with the tilegx cross compiler I noticed another defect.
>
> Currently building a tilegx cross compiler fails in libgcc multilib configuration,
> because of the following static assert in _FP_FROM_INT:
>
>            _FP_STATIC_ASSERT ((rsize) <= 2 * _FP_W_TYPE_SIZE,            \
>                               "rsize too large");                        \
>
> previously that macro used to abort at run-time.  This happens apparently in all
> float to ti-int conversions in the 32-bit target configuration.  So I assume that
> softfp_int_modes should only contain ti for 64-bit target configurations.
>
> The following patch makes the multilib libgcc build succeed for me,
> but I can not test if the result is actually usable.
>
> Really AFAICT these machines must be pretty cool, but I don't own one...
>
>
> Thanks
> Bernd.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-12 21:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01 21:32 [PATCH] Fix tilegx libgcc with multilib Bernd Edlinger
2016-02-12 21:24 ` Walter Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).