This is the mail archive of the 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: [RFC] PowerPC 128 bit long double compatibility (PR target/19019)

On Mon, Feb 14, 2005 at 06:56:00PM -0500, David Edelsohn wrote:
> Richard> You can't make this change without breaking binary compatibility
> Richard> on ELF. 
> 	Yes, we know.

This patch on top of yours provides versioned symbols for backwards
compatibility.  I've put the new syms as GCC_3.4.4 rather than GCC_4.0
as I'm assuming you'll port your patch to gcc-3.4 too.

Note!  The Darwin support hasn't been checked.  I'm not certain whether
the Darwin assembler even supports .symver.

diff -urp gcc-dje/gcc/config/rs6000/darwin-ldouble.c gcc-alan/gcc/config/rs6000/darwin-ldouble.c
--- gcc-dje/gcc/config/rs6000/darwin-ldouble.c	2005-02-15 19:51:11.872609608 +1030
+++ gcc-alan/gcc/config/rs6000/darwin-ldouble.c	2005-02-15 20:02:10.975688136 +1030
@@ -67,6 +67,29 @@ extern long double __gcc_qsub (double, d
 extern long double __gcc_qmul (double, double, double, double);
 extern long double __gcc_qdiv (double, double, double, double);
+#ifdef __ELF__
+/* Provide definitions of the old symbol names to statisfy apps and
+   shared libs built against an older libgcc.  To access the _xlq
+   symbols an explicit version reference is needed, so these won't
+   satisfy an unadorned reference like _xlqadd.  If dot symbols are
+   not needed, the assembler will remove the aliases from the symbol
+   table.  */
+__asm__ (".symver __gcc_qadd,_xlqadd@GCC_3.4\n\t"
+	 ".symver __gcc_qsub,_xlqsub@GCC_3.4\n\t"
+	 ".symver __gcc_qmul,_xlqmul@GCC_3.4\n\t"
+	 ".symver __gcc_qdiv,_xlqdiv@GCC_3.4\n\t"
+	 ".symver .__gcc_qadd,._xlqadd@GCC_3.4\n\t"
+	 ".symver .__gcc_qsub,._xlqsub@GCC_3.4\n\t"
+	 ".symver .__gcc_qmul,._xlqmul@GCC_3.4\n\t"
+	 ".symver .__gcc_qdiv,._xlqdiv@GCC_3.4");
+#ifdef __MACH__
+__asm__ (".symver ___gcc_qadd,__xlqadd@GCC_3.4\n\t"
+	 ".symver ___gcc_qsub,__xlqsub@GCC_3.4\n\t"
+	 ".symver ___gcc_qmul,__xlqmul@GCC_3.4\n\t"
+	 ".symver ___gcc_qdiv,__xlqdiv@GCC_3.4");
 typedef union
   long double ldval;
diff -urp gcc-dje/gcc/config/rs6000/libgcc-ppc64.ver gcc-alan/gcc/config/rs6000/libgcc-ppc64.ver
--- gcc-dje/gcc/config/rs6000/libgcc-ppc64.ver	2005-02-15 19:51:11.873609450 +1030
+++ gcc-alan/gcc/config/rs6000/libgcc-ppc64.ver	2005-02-15 19:08:13.131266227 +1030
@@ -1,4 +1,4 @@
-GCC_3.4 {
+GCC_3.4.4 {
   # long double support

Alan Modra
IBM OzLabs - Linux Technology Centre

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