diff mbox

Missing __divtf3@@GCC_4.4.0 in libgcc on ia64

Message ID mvmvbzlhl21.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab Nov. 21, 2013, 2:43 p.m. UTC
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.

	PR target/59227
	PR target/59230
	* 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.
diff mbox

Patch

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