libgcc-compat patch and gcc 2.95.4 on ppclinux
H. J. Lu
hjl@lucon.org
Fri Jul 12 22:43:00 GMT 2002
On Thu, Jul 11, 2002 at 10:30:24PM -0400, Jack Howarth wrote:
> Has anyone else tried to build the current glibc-2-2-branch
> with gcc 2.95.4 on ppclinux? On my debian ppc sid machine, I am
> finding the the patches contained in glibc-2-2-branch for
> the libgcc-compat support on the powerpc build and work fine under
> gcc 3.1.x. However, my attempts at building the same glibc 2.2.5
> under gcc 2.95.4 have failed due to duplicate symbols for the
> same symbols declared in sysdeps/powerpc/libgcc-compat.c. Isn't this
> bound to happen? My understanding was that gcc 2.95.4 was flawed
> and would link in these same symbols from it libgcc. Thus if
> you build the libgcc-compat support in glibc-2-2-branch with
> gcc 2.95.4 wouldn't these symbols be defined twice when libc6.so
> is linked? Once for the copies incorrectly linked in by gcc 2.95.4
> and once for the internal declarations in sysdeps/powerpc/libgcc-compat.c.
> Don't we need some wrappers for this libgcc-compat support that only
> allows it to be built if the gcc used is < 3.1? Thanks in advance
> for any insights on this.
> Jack
> ps I do understand that libgcc-compat doesn't export these symbols
> for linking. However isn't there a still a problem in terms of
> symbols internal to libc6.so if libgcc brings in the same ones
> as libgcc-compat has? I bring this up because I assume the same
> patches exist in the trunk as well which would imply that the
> trunk will only build on ppclinux under gcc >= 3.1 as well without
> running into this duplicate symbols.
Please try this patch. The problem is gcc 2.95.4 won't make those
libgcc functions hidden. We have to help it.
H.J.
-------------- next part --------------
2002-07-12 H.J. Lu <hjl@gnu.org>
* sysdeps/powerpc/libgcc-compat.c (__ashldi3): Make it hidden.
(__ashrdi3): Likewise.
(__lshrdi3): Likewise.
(__cmpdi2): Likewise.
(__ucmpdi2): Likewise.
(__fixdfdi): Likewise.
(__fixunsdfdi): Likewise.
(__fixsfdi): Likewise.
(__fixunssfdi): Likewise.
(__floatdidf): Likewise.
(__floatdisf): Likewise.
--- libc/sysdeps/powerpc/libgcc-compat.c.gcc Mon May 20 17:19:09 2002
+++ libc/sysdeps/powerpc/libgcc-compat.c Fri Jul 12 22:39:18 2002
@@ -23,6 +23,7 @@
#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+__asm__(".hidden __ashldi3");
extern int64_t __ashldi3 (int64_t, int32_t);
int64_t INTUSE (__ashldi3) (int64_t u, int32_t b)
{
@@ -31,6 +32,7 @@ int64_t INTUSE (__ashldi3) (int64_t u, i
symbol_version (INTUSE (__ashldi3), __ashldi3, GLIBC_2.0);
+__asm__(".hidden __ashrdi3");
extern int64_t __ashrdi3 (int64_t, int32_t);
int64_t INTUSE (__ashrdi3) (int64_t u, int32_t b)
{
@@ -39,6 +41,7 @@ int64_t INTUSE (__ashrdi3) (int64_t u, i
symbol_version (INTUSE (__ashrdi3), __ashrdi3, GLIBC_2.0);
+__asm__(".hidden __lshrdi3");
extern int64_t __lshrdi3 (int64_t, int32_t);
int64_t INTUSE (__lshrdi3) (int64_t u, int32_t b)
{
@@ -47,6 +50,7 @@ int64_t INTUSE (__lshrdi3) (int64_t u, i
symbol_version (INTUSE (__lshrdi3), __lshrdi3, GLIBC_2.0);
+__asm__(".hidden __cmpdi2");
extern int32_t __cmpdi2 (int64_t, int64_t);
int32_t INTUSE (__cmpdi2) (int64_t u, int64_t v)
{
@@ -55,6 +59,7 @@ int32_t INTUSE (__cmpdi2) (int64_t u, in
symbol_version (INTUSE (__cmpdi2), __cmpdi2, GLIBC_2.0);
+__asm__(".hidden __ucmpdi2");
extern int32_t __ucmpdi2 (int64_t, int64_t);
int32_t INTUSE (__ucmpdi2) (int64_t u, int64_t v)
{
@@ -63,6 +68,7 @@ int32_t INTUSE (__ucmpdi2) (int64_t u, i
symbol_version (INTUSE (__ucmpdi2), __ucmpdi2, GLIBC_2.0);
+__asm__(".hidden __fixdfdi");
extern int64_t __fixdfdi (double);
int64_t INTUSE (__fixdfdi) (double d)
{
@@ -71,6 +77,7 @@ int64_t INTUSE (__fixdfdi) (double d)
symbol_version (INTUSE (__fixdfdi), __fixdfdi, GLIBC_2.0);
+__asm__(".hidden __fixunsdfdi");
extern int64_t __fixunsdfdi (double);
int64_t INTUSE (__fixunsdfdi) (double d)
{
@@ -79,6 +86,7 @@ int64_t INTUSE (__fixunsdfdi) (double d)
symbol_version (INTUSE (__fixunsdfdi), __fixunsdfdi, GLIBC_2.0);
+__asm__(".hidden __fixsfdi");
extern int64_t __fixsfdi (float);
int64_t INTUSE (__fixsfdi) (float d)
{
@@ -87,6 +95,7 @@ int64_t INTUSE (__fixsfdi) (float d)
symbol_version (INTUSE (__fixsfdi), __fixsfdi, GLIBC_2.0);
+__asm__(".hidden __fixunssfdi");
extern int64_t __fixunssfdi (float);
int64_t INTUSE (__fixunssfdi) (float d)
{
@@ -95,6 +104,7 @@ int64_t INTUSE (__fixunssfdi) (float d)
symbol_version (INTUSE (__fixunssfdi), __fixunssfdi, GLIBC_2.0);
+__asm__(".hidden __floatdidf");
extern double __floatdidf (int64_t);
double INTUSE (__floatdidf) (int64_t u)
{
@@ -103,6 +113,7 @@ double INTUSE (__floatdidf) (int64_t u)
symbol_version (INTUSE (__floatdidf), __floatdidf, GLIBC_2.0);
+__asm__(".hidden __floatdisf");
extern float __floatdisf (int64_t);
float INTUSE (__floatdisf) (int64_t u)
{
More information about the Libc-alpha
mailing list