public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Missing __divtf3@@GCC_4.4.0 on ia64
@ 2014-02-19 13:22 Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2014-02-19 13:22 UTC (permalink / raw)
  To: gcc-patches; +Cc: wilson, sellcey

Since there is already the __divtf3@GCC_3.0 compatibility alias in
libgcc we need to attach an explicit symbol version to the real __divtf3
in order to get it exported.  This fixes the unversioned reference in
libgfortran.so, and fixes the failure of gfortran.dg/erf_3.F90.  Tested
on ia64-suse-linux.

Andreas.

gcc/testsuite/
	PR libfortran/59227
	* gfortran.dg/erf_3.F90: Remove XFAIL on ia64-*-linux*.

libgcc/
	PR target/59230
	PR libfortran/59227
	* config/ia64/t-softfp-compat (softfp_file_list): Filter out
	soft-fp/divtf3.c.
	(LIB2ADD): Add config/ia64/divtf3.c.
	* config/ia64/divtf3.c: New file.
---
 gcc/testsuite/gfortran.dg/erf_3.F90 | 5 +----
 libgcc/config/ia64/divtf3.c         | 9 +++++++++
 libgcc/config/ia64/t-softfp-compat  | 3 +++
 3 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 libgcc/config/ia64/divtf3.c

diff --git a/gcc/testsuite/gfortran.dg/erf_3.F90 b/gcc/testsuite/gfortran.dg/erf_3.F90
index d9d6589..e7130f6 100644
--- a/gcc/testsuite/gfortran.dg/erf_3.F90
+++ b/gcc/testsuite/gfortran.dg/erf_3.F90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail spu-*-* ia64-*-linux* } }
+! { dg-do run { xfail spu-*-* } }
 ! { dg-options "-fno-range-check -ffree-line-length-none -O0" }
 ! { dg-add-options ieee }
 !
@@ -7,9 +7,6 @@
 !
 ! XFAILed for SPU targets because our library implementation of
 ! the double-precision erf/erfc functions is not accurate enough.
-!
-! XFAILed for IA64 Linux because of a glibc bug:
-! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59227
 
 program test
   use, intrinsic :: iso_fortran_env
diff --git a/libgcc/config/ia64/divtf3.c b/libgcc/config/ia64/divtf3.c
new file mode 100644
index 0000000..e1afa29
--- /dev/null
+++ b/libgcc/config/ia64/divtf3.c
@@ -0,0 +1,9 @@
+#ifdef SHARED
+#define __divtf3 __divtf3_shared
+#endif
+
+#include "soft-fp/divtf3.c"
+
+#ifdef SHARED
+asm (".symver __divtf3_shared, __divtf3@@GCC_4.4.0");
+#endif
diff --git a/libgcc/config/ia64/t-softfp-compat b/libgcc/config/ia64/t-softfp-compat
index 00f45d5..38bcea7 100644
--- a/libgcc/config/ia64/t-softfp-compat
+++ b/libgcc/config/ia64/t-softfp-compat
@@ -5,3 +5,6 @@ libgcc1-tf-functions = __divxf3  _fixtfdi _fixunstfdi _floatditf
 LIB1ASMFUNCS := $(filter-out $(libgcc1-tf-functions), $(LIB1ASMFUNCS))
 libgcc1-tf-compats = $(addsuffix .S, $(libgcc1-tf-functions))
 LIB2ADD += $(addprefix $(srcdir)/config/ia64/, $(libgcc1-tf-compats))
+# Wrap divtf3.c to set the default symbol version
+softfp_file_list := $(filter-out $(srcdir)/soft-fp/divtf3.c, $(softfp_file_list))
+LIB2ADD += $(srcdir)/config/ia64/divtf3.c
-- 
1.9.0


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* [PATCH] Missing __divtf3@@GCC_4.4.0 on ia64
@ 2013-12-09 11:54 Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2013-12-09 11:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: wilson, sellcey

Since there is already the __divtf3@GCC_3.0 compatibility alias in
libgcc we need to attach an explicit symbol version to the real __divtf3
in order to get it exported.  This fixes the unversioned reference in
libgfortran.so, and fixes the failure of gfortran.dg/erf_3.F90.  Tested
on ia64-suse-linux.

Andreas.

gcc/testsuite/
	PR libfortran/59227
	* gfortran.dg/erf_3.F90: Remove XFAIL on ia64-*-linux*.

libgcc/
	PR target/59230
	PR libfortran/59227
	* config/ia64/t-softfp-compat (softfp_file_list): Filter out
	soft-fp/divtf3.c.
	(LIB2ADD): Add config/ia64/divtf3.c.
	* config/ia64/divtf3.c: New file.
---
 gcc/testsuite/gfortran.dg/erf_3.F90 | 5 +----
 libgcc/config/ia64/divtf3.c         | 9 +++++++++
 libgcc/config/ia64/t-softfp-compat  | 3 +++
 3 files changed, 13 insertions(+), 4 deletions(-)
 create mode 100644 libgcc/config/ia64/divtf3.c

diff --git a/gcc/testsuite/gfortran.dg/erf_3.F90 b/gcc/testsuite/gfortran.dg/erf_3.F90
index d9d6589..e7130f6 100644
--- a/gcc/testsuite/gfortran.dg/erf_3.F90
+++ b/gcc/testsuite/gfortran.dg/erf_3.F90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail spu-*-* ia64-*-linux* } }
+! { dg-do run { xfail spu-*-* } }
 ! { dg-options "-fno-range-check -ffree-line-length-none -O0" }
 ! { dg-add-options ieee }
 !
@@ -7,9 +7,6 @@
 !
 ! XFAILed for SPU targets because our library implementation of
 ! the double-precision erf/erfc functions is not accurate enough.
-!
-! XFAILed for IA64 Linux because of a glibc bug:
-! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59227
 
 program test
   use, intrinsic :: iso_fortran_env
diff --git a/libgcc/config/ia64/divtf3.c b/libgcc/config/ia64/divtf3.c
new file mode 100644
index 0000000..e1afa29
--- /dev/null
+++ b/libgcc/config/ia64/divtf3.c
@@ -0,0 +1,9 @@
+#ifdef SHARED
+#define __divtf3 __divtf3_shared
+#endif
+
+#include "soft-fp/divtf3.c"
+
+#ifdef SHARED
+asm (".symver __divtf3_shared, __divtf3@@GCC_4.4.0");
+#endif
diff --git a/libgcc/config/ia64/t-softfp-compat b/libgcc/config/ia64/t-softfp-compat
index 00f45d5..38bcea7 100644
--- a/libgcc/config/ia64/t-softfp-compat
+++ b/libgcc/config/ia64/t-softfp-compat
@@ -5,3 +5,6 @@ libgcc1-tf-functions = __divxf3  _fixtfdi _fixunstfdi _floatditf
 LIB1ASMFUNCS := $(filter-out $(libgcc1-tf-functions), $(LIB1ASMFUNCS))
 libgcc1-tf-compats = $(addsuffix .S, $(libgcc1-tf-functions))
 LIB2ADD += $(addprefix $(srcdir)/config/ia64/, $(libgcc1-tf-compats))
+# Wrap divtf3.c to set the default symbol version
+softfp_file_list := $(filter-out $(srcdir)/soft-fp/divtf3.c, $(softfp_file_list))
+LIB2ADD += $(srcdir)/config/ia64/divtf3.c
-- 
1.8.5.1

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

end of thread, other threads:[~2014-02-19 13:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 13:22 [PATCH] Missing __divtf3@@GCC_4.4.0 on ia64 Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2013-12-09 11:54 Andreas Schwab

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).