[howarth@bromo.msbb.uc.edu: Bug#155606: provide symbols .hidden in gcc 3.1/3.2 when building glibc for ppc]
----- Forwarded message from Jack Howarth <howarth@bromo.msbb.uc.edu> -----
Subject: Bug#155606: provide symbols .hidden in gcc 3.1/3.2 when building glibc for ppc
Reply-To: Jack Howarth <howarth@bromo.msbb.uc.edu>, 155606@bugs.debian.org
From: Jack Howarth <howarth@bromo.msbb.uc.edu>
To: submit@bugs.debian.org
Package: glibc
Version: 2.2.5-12
Due to a pre-existing bug in gcc < 3.1, libgcc symbols were
compiled in error into binaries on ppc. With gcc >= 3.1, these
libgcc symbols are now marked .hidden which makes them disappear
from glibc 2.2.5 when rebuilt with gcc >= 3.1. The patch below
provides these symbols for resolution but not linking. This patch
is newer than the one currently in glibc-2-2-branch and resolves
the remaining issues with OpenOffice binaries built under gcc 2.95.4.
Index: sysdeps/powerpc/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/powerpc/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- sysdeps/powerpc/Makefile 6 Dec 2001 23:41:32 -0000 1.15
+++ sysdeps/powerpc/Makefile 15 May 2002 14:23:39 -0000
@@ -35,6 +35,11 @@ CFLAGS-initfini.s = -g0 -fpic -O1
CFLAGS-init.o = -G0
CFLAGS-gmon-start.o = -G0
endif
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
endif
ifeq ($(subdir),string)
Index: sysdeps/powerpc/Versions
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/powerpc/Versions,v
retrieving revision 1.2
diff -u -p -r1.2 Versions
--- sysdeps/powerpc/Versions Wed Jun 19 21:29:49 2002
+++ sysdeps/powerpc/Versions.new Wed Jun 19 21:32:53 2002
@@ -3,6 +3,17 @@
_dl_cpuclock_offset;
}
}
+libc {
+ GLIBC_2.0 {
+ # Functions from libgcc.
+ __divdi3; __moddi3; __udivdi3; __umoddi3;
+ __cmpdi2; __ucmpdi2;
+ __ashldi3; __ashrdi3; __lshrdi3;
+ __fixdfdi; __fixunsdfdi;
+ __fixsfdi; __fixunssfdi;
+ __floatdidf; __floatdisf;
+ }
+}
libm {
GLIBC_2.1 {
# symbols used in macros from sysdeps/powerpc/bits/fenv.h
--- /dev/null Thu Oct 4 06:30:44 2001
+++ sysdeps/powerpc/libgcc-compat.S Mon Aug 5 07:55:04 2002
@@ -0,0 +1,170 @@
+/* pre-.hidden libgcc compatibility
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ 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. */
+
+ .file "libgcc-compat.S"
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+#ifndef INTUSE
+# define INTUSE(name) name##_internal
+#endif
+
+#define __divdi3_v_glibc20 INTUSE (__divdi3)
+#define __udivdi3_v_glibc20 INTUSE (__udivdi3)
+#define __moddi3_v_glibc20 INTUSE (__moddi3)
+#define __umoddi3_v_glibc20 INTUSE (__umoddi3)
+#define __ashldi3_v_glibc20 INTUSE (__ashldi3)
+#define __ashrdi3_v_glibc20 INTUSE (__ashrdi3)
+#define __lshrdi3_v_glibc20 INTUSE (__lshrdi3)
+#define __cmpdi2_v_glibc20 INTUSE (__cmpdi2)
+#define __ucmpdi2_v_glibc20 INTUSE (__ucmpdi2)
+#define __fixdfdi_v_glibc20 INTUSE (__fixdfdi)
+#define __fixsfdi_v_glibc20 INTUSE (__fixsfdi)
+#define __fixunsdfdi_v_glibc20 INTUSE (__fixunsdfdi)
+#define __fixunssfdi_v_glibc20 INTUSE (__fixunssfdi)
+#define __floatdidf_v_glibc20 INTUSE (__floatdidf)
+#define __floatdisf_v_glibc20 INTUSE (__floatdisf)
+
+ .symver __divdi3_v_glibc20,__divdi3@GLIBC_2.0
+ .symver __moddi3_v_glibc20,__moddi3@GLIBC_2.0
+ .symver __udivdi3_v_glibc20,__udivdi3@GLIBC_2.0
+ .symver __umoddi3_v_glibc20,__umoddi3@GLIBC_2.0
+ .symver __ashldi3_v_glibc20,__ashldi3@GLIBC_2.0
+ .symver __ashrdi3_v_glibc20,__ashrdi3@GLIBC_2.0
+ .symver __lshrdi3_v_glibc20,__lshrdi3@GLIBC_2.0
+ .symver __cmpdi2_v_glibc20,__cmpdi2@GLIBC_2.0
+ .symver __ucmpdi2_v_glibc20,__ucmpdi2@GLIBC_2.0
+ .symver __fixdfdi_v_glibc20,__fixdfdi@GLIBC_2.0
+ .symver __fixunsdfdi_v_glibc20,__fixunsdfdi@GLIBC_2.0
+ .symver __fixsfdi_v_glibc20,__fixsfdi@GLIBC_2.0
+ .symver __fixunssfdi_v_glibc20,__fixunssfdi@GLIBC_2.0
+ .symver __floatdidf_v_glibc20,__floatdidf@GLIBC_2.0
+ .symver __floatdisf_v_glibc20,__floatdisf@GLIBC_2.0
+
+ .section ".text"
+
+ .align 2
+ .globl __divdi3_v_glibc20
+ .type __divdi3_v_glibc20,@function
+__divdi3_v_glibc20:
+ b __divdi3@local
+.Lfe1:
+ .size __divdi3_v_glibc20,.Lfe1-__divdi3_v_glibc20
+ .align 2
+ .globl __moddi3_v_glibc20
+ .type __moddi3_v_glibc20,@function
+__moddi3_v_glibc20:
+ b __moddi3@local
+.Lfe2:
+ .size __moddi3_v_glibc20,.Lfe2-__moddi3_v_glibc20
+ .align 2
+ .globl __udivdi3_v_glibc20
+ .type __udivdi3_v_glibc20,@function
+__udivdi3_v_glibc20:
+ b __udivdi3@local
+.Lfe3:
+ .size __udivdi3_v_glibc20,.Lfe3-__udivdi3_v_glibc20
+ .align 2
+ .globl __umoddi3_v_glibc20
+ .type __umoddi3_v_glibc20,@function
+__umoddi3_v_glibc20:
+ b __umoddi3@local
+.Lfe4:
+ .size __umoddi3_v_glibc20,.Lfe4-__umoddi3_v_glibc20
+ .align 2
+ .globl __ashldi3_v_glibc20
+ .type __ashldi3_v_glibc20,@function
+__ashldi3_v_glibc20:
+ b __ashldi3@local
+.Lfe5:
+ .size __ashldi3_v_glibc20,.Lfe5-__ashldi3_v_glibc20
+ .align 2
+ .globl __ashrdi3_v_glibc20
+ .type __ashrdi3_v_glibc20,@function
+__ashrdi3_v_glibc20:
+ b __ashrdi3@local
+.Lfe6:
+ .size __ashrdi3_v_glibc20,.Lfe6-__ashrdi3_v_glibc20
+ .align 2
+ .globl __lshrdi3_v_glibc20
+ .type __lshrdi3_v_glibc20,@function
+__lshrdi3_v_glibc20:
+ b __lshrdi3@local
+.Lfe7:
+ .size __lshrdi3_v_glibc20,.Lfe7-__lshrdi3_v_glibc20
+ .align 2
+ .globl __cmpdi2_v_glibc20
+ .type __cmpdi2_v_glibc20,@function
+__cmpdi2_v_glibc20:
+ b __cmpdi2@local
+.Lfe8:
+ .size __cmpdi2_v_glibc20,.Lfe8-__cmpdi2_v_glibc20
+ .align 2
+ .globl __ucmpdi2_v_glibc20
+ .type __ucmpdi2_v_glibc20,@function
+__ucmpdi2_v_glibc20:
+ b __ucmpdi2@local
+.Lfe9:
+ .size __ucmpdi2_v_glibc20,.Lfe9-__ucmpdi2_v_glibc20
+ .align 2
+ .globl __fixdfdi_v_glibc20
+ .type __fixdfdi_v_glibc20,@function
+__fixdfdi_v_glibc20:
+ b __fixdfdi@local
+.Lfe10:
+ .size __fixdfdi_v_glibc20,.Lfe10-__fixdfdi_v_glibc20
+ .align 2
+ .globl __fixunsdfdi_v_glibc20
+ .type __fixunsdfdi_v_glibc20,@function
+__fixunsdfdi_v_glibc20:
+ b __fixunsdfdi@local
+.Lfe11:
+ .size __fixunsdfdi_v_glibc20,.Lfe11-__fixunsdfdi_v_glibc20
+ .align 2
+ .globl __fixsfdi_v_glibc20
+ .type __fixsfdi_v_glibc20,@function
+__fixsfdi_v_glibc20:
+ b __fixsfdi@local
+.Lfe12:
+ .size __fixsfdi_v_glibc20,.Lfe12-__fixsfdi_v_glibc20
+ .align 2
+ .globl __fixunssfdi_v_glibc20
+ .type __fixunssfdi_v_glibc20,@function
+__fixunssfdi_v_glibc20:
+ b __fixunssfdi@local
+.Lfe13:
+ .size __fixunssfdi_v_glibc20,.Lfe13-__fixunssfdi_v_glibc20
+ .align 2
+ .globl __floatdidf_v_glibc20
+ .type __floatdidf_v_glibc20,@function
+__floatdidf_v_glibc20:
+ b __floatdidf@local
+.Lfe14:
+ .size __floatdidf_v_glibc20,.Lfe14-__floatdidf_v_glibc20
+ .align 2
+ .globl __floatdisf_v_glibc20
+ .type __floatdisf_v_glibc20,@function
+__floatdisf_v_glibc20:
+ b __floatdisf@local
+.Lfe15:
+ .size __floatdisf_v_glibc20,.Lfe15-__floatdisf_v_glibc20
+
+#endif
----- End forwarded message -----
--
Debian - http://www.debian.org/
Linux 1394 - http://linux1394.sourceforge.net/
Subversion - http://subversion.tigris.org/
Deqo - http://www.deqo.com/
Reply to: