From: GNU Libc Maintainers Date: Wed, 29 Nov 2017 03:00:21 +0000 (+0000) Subject: local-libgcc-compat-main X-Git-Tag: archive/raspbian/2.25-3+rpi1~30 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=53d388544e07267476b0265f9cf2c1b6594b5c98;p=glibc.git local-libgcc-compat-main # 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 --- diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile index e30e1339f..b4f024aa4 100644 --- a/sysdeps/i386/Makefile +++ b/sysdeps/i386/Makefile @@ -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 diff --git a/sysdeps/i386/Versions b/sysdeps/i386/Versions index 7be44aad7..9107eb176 100644 --- a/sysdeps/i386/Versions +++ b/sysdeps/i386/Versions @@ -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 index 000000000..52af8fdbc --- /dev/null +++ b/sysdeps/i386/libgcc-compat.c @@ -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 + + 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 +#include + +#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 diff --git a/sysdeps/s390/s390-32/Makefile b/sysdeps/s390/s390-32/Makefile index a07f2986a..9a792e818 100644 --- a/sysdeps/s390/s390-32/Makefile +++ b/sysdeps/s390/s390-32/Makefile @@ -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 diff --git a/sysdeps/s390/s390-32/Versions b/sysdeps/s390/s390-32/Versions index 2b020f8f5..55b33864e 100644 --- a/sysdeps/s390/s390-32/Versions +++ b/sysdeps/s390/s390-32/Versions @@ -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 index 000000000..72e2662f9 --- /dev/null +++ b/sysdeps/s390/s390-32/libgcc-compat.c @@ -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 + + 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 +#include + +#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 diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile index da205898c..08408b3ed 100644 --- a/sysdeps/sparc/sparc32/Makefile +++ b/sysdeps/sparc/sparc32/Makefile @@ -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 diff --git a/sysdeps/sparc/sparc32/Versions b/sysdeps/sparc/sparc32/Versions index 6d3bfe880..edcebb5f9 100644 --- a/sysdeps/sparc/sparc32/Versions +++ b/sysdeps/sparc/sparc32/Versions @@ -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 index 000000000..9aeb39050 --- /dev/null +++ b/sysdeps/sparc/sparc32/libgcc-compat.c @@ -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 + + 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 +#include + +#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