local-libgcc-compat-main
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Sat, 16 Dec 2017 14:37:43 +0000 (14:37 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sat, 16 Dec 2017 14:37:43 +0000 (14:37 +0000)
# DP: Description: libgcc-compat symbols for i386, sparc,
#                  alpha, ia64 (derived from RedHat's), s390
# DP: Author: Guido Guenther, GOTO Masanori
# DP: Upstream status: Not submitted
# DP: Date: 2002-10-13, updated 2006-05-28

Gbp-Pq: Topic any
Gbp-Pq: Name local-libgcc-compat-main.diff

sysdeps/i386/Makefile
sysdeps/i386/Versions
sysdeps/i386/libgcc-compat.c [new file with mode: 0644]
sysdeps/s390/s390-32/Makefile
sysdeps/s390/s390-32/Versions
sysdeps/s390/s390-32/libgcc-compat.c [new file with mode: 0644]
sysdeps/sparc/sparc32/Makefile
sysdeps/sparc/sparc32/Versions
sysdeps/sparc/sparc32/libgcc-compat.c [new file with mode: 0644]

index e30e1339f0554dd53be1ab881cb4df04de820792..b4f024aa4596e134ddf8aac2ec93d6da7ea97290 100644 (file)
@@ -9,6 +9,14 @@ ifeq ($(subdir),string)
 sysdep_routines += cacheinfo
 endif
 
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
+
 ifeq ($(subdir),gmon)
 sysdep_routines += i386-mcount
 endif
index 7be44aad7ac00adec5b0eba9007dd157993399b0..9107eb17627c34313f3776419bd91e09ab4392ff 100644 (file)
@@ -8,6 +8,9 @@ libc {
   GLIBC_2.0 {
     # Functions from libgcc.
     __divdi3; __moddi3; __udivdi3; __umoddi3;
+    __cmpdi2; __ucmpdi2;
+    __fixunsdfdi; __fixunssfdi; __fixunsxfdi;
+    __floatdidf;
   }
   GLIBC_2.1 {
     # global variable
diff --git a/sysdeps/i386/libgcc-compat.c b/sysdeps/i386/libgcc-compat.c
new file mode 100644 (file)
index 0000000..52af8fd
--- /dev/null
@@ -0,0 +1,75 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+         return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+extern int64_t __fixunssfdi (float);
+int64_t __fixunssfdi_internal (float d)
+{
+  return __fixunssfdi (d);
+}
+
+symbol_version (__fixunsfdi_internal, __fixunsfdi, GLIBC_2.0);
+
+typedef float XFtype __attribute__ ((mode (XF)));
+
+extern int64_t __fixunsxfdi (XFtype);
+int64_t __fixunsxfdi_internal (XFtype d)
+{
+  return __fixunsxfdi (d);
+}
+
+symbol_version (__fixunsxfdi_internal, __fixunsxfdi, GLIBC_2.0);
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+         return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+#endif
index a07f2986aebb33a140224c23cd90ef91b1ca7cba..9a792e8180242f4544d4a83e4f44398b4b9b5299 100644 (file)
@@ -7,3 +7,11 @@ CFLAGS-rtld.c += -Wno-uninitialized -Wno-unused
 CFLAGS-dl-load.c += -Wno-unused
 CFLAGS-dl-reloc.c += -Wno-unused
 endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
index 2b020f8f58d91b8d310155ed8cbd6cd2862119c1..55b33864e8e76f68e0659050a2f1c2a633d500e3 100644 (file)
@@ -2,5 +2,13 @@ libc {
   GLIBC_2.0 {
     # Functions from libgcc.
     __divdi3; __moddi3; __udivdi3; __umoddi3;
+    __cmpdi2;
+    __fixdfdi;
+    __fixsfdi;
+    __fixunsdfdi;
+    __fixunssfdi;
+    __floatdidf;
+    __floatdisf;
+    __ucmpdi2;
   }
 }
diff --git a/sysdeps/s390/s390-32/libgcc-compat.c b/sysdeps/s390/s390-32/libgcc-compat.c
new file mode 100644 (file)
index 0000000..72e2662
--- /dev/null
@@ -0,0 +1,83 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2003 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by GOTO Masanori <gotom@debian.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+extern int64_t __fixdfdi (double);
+int64_t __fixdfdi_internal (double d)
+{
+  return __fixdfdi (d);
+}
+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
+
+extern int64_t __fixsfdi (float);
+int64_t __fixsfdi_internal (float d)
+{
+  return __fixsfdi (d);
+}
+symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+  return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+extern int64_t __fixunssfdi (float);
+int64_t __fixunssfdi_internal (float d)
+{
+  return __fixunssfdi (d);
+}
+symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+  return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+extern float __floatdisf (int64_t);
+float __floatdisf_internal (int64_t u)
+{
+  return __floatdisf (u);
+}
+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+#endif
index da205898cf62a4226c2636420b1cd1283d3d0259..08408b3ed13ce5ffdb038c2fc3fad5952ab35260 100644 (file)
@@ -19,6 +19,14 @@ ifeq ($(subdir),gnulib)
 sysdep_routines = dotmul umul $(divrem) alloca
 endif  # gnulib
 
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
+
 # We distribute these files, even though they are generated,
 # so as to avoid the need for a functioning m4 to build the library.
 divrem := sdiv udiv rem urem
index 6d3bfe880eb3c40c884a7ed85f84f23785832c7b..edcebb5f9a4d7c6253b14792654b3cb3e734a673 100644 (file)
@@ -1,6 +1,10 @@
 libc {
   GLIBC_2.0 {
     .div; .mul; .rem; .udiv; .umul; .urem;
+    __divdi3; __moddi3; __udivdi3; __umoddi3; __muldi3;
+    __ashldi3; __ashrdi3; __lshrdi3; __cmpdi2; __ucmpdi2;
+    __fixdfdi; __fixsfdi; __fixunsdfdi; __fixunssfdi;
+    __floatdidf; __floatdisf;
   }
 }
 libm {
diff --git a/sysdeps/sparc/sparc32/libgcc-compat.c b/sysdeps/sparc/sparc32/libgcc-compat.c
new file mode 100644 (file)
index 0000000..9aeb390
--- /dev/null
@@ -0,0 +1,121 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int64_t __ashldi3 (int64_t, int32_t);
+int64_t __ashldi3_internal (int64_t u, int32_t b)
+{
+  return __ashldi3 (u, b);
+}
+symbol_version (__ashldi3_internal, __ashldi3, GLIBC_2.0);
+
+
+extern int64_t __ashrdi3 (int64_t, int32_t);
+int64_t __ashrdi3_internal (int64_t u, int32_t b)
+{
+  return __ashrdi3 (u, b);
+}
+symbol_version (__ashrdi3_internal, __ashrdi3, GLIBC_2.0);
+
+
+extern int64_t __lshrdi3 (int64_t, int32_t);
+int64_t __lshrdi3_internal (int64_t u, int32_t b)
+{
+  return __lshrdi3 (u, b);
+}
+symbol_version (__lshrdi3_internal, __lshrdi3, GLIBC_2.0);
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixdfdi (double);
+int64_t __fixdfdi_internal (double d)
+{
+  return __fixdfdi (d);
+}
+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
+
+
+extern int64_t __fixsfdi (float);
+int64_t __fixsfdi_internal (float d)
+{
+  return __fixsfdi (d);
+}
+symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
+
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+         return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+extern int64_t __fixunssfdi (float);
+int64_t __fixunssfdi_internal (float d)
+{
+  return __fixunssfdi (d);
+}
+
+symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
+
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+         return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+
+extern float __floatdisf (int64_t);
+float __floatdisf_internal (int64_t u)
+{
+  return __floatdisf (u);
+}
+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
+
+
+extern int64_t __muldi3 (int64_t, int64_t);
+int64_t __muldi3_internal (int64_t u, int64_t v)
+{
+  return __muldi3 (u, v);
+}
+symbol_version (__muldi3_internal, __muldi3, GLIBC_2.0);
+
+#endif