[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Glibc 2.3 pre-releases



On Mon, Sep 09, 2002 at 03:30:12PM -0700, Jeff Bailey wrote:
> Your Glibc maintainer team is trying to get glibc 2.3 ready for
> general consumption, and we need some help for arch's that we're not
> familiar with.  So far we have the following covered:
The attached two dpatches are needed to get glibc 2.3 to (almost)[1] build
on mips. The first one gets rid of the undefinded reference to
elf-machine-rela (as posted by H.J. Lu to the glibc list), the second
one removes the undefined reference to divdi3.
Regards,
 -- Guido

[1] __syscall_readahead is also undefined, I'm currently testing a patch
for this.
#! /bin/sh -e

# DP: 2002-02-04  H.J. Lu  <hjl@gnu.org>
# DP: elf/dl-conflict.c (_dl_resolve_conflicts): Dummy if
# DP: _DL_HAVE_NO_ELF_MACHINE_RELA is defined.

echo $#

if [ $# -ne 2 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

--- libc/elf/dl-conflict.c.mips	Mon Feb  4 13:44:57 2002
+++ libc/elf/dl-conflict.c	Mon Feb  4 15:10:31 2002
@@ -33,6 +33,7 @@ void
 _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
 		       ElfW(Rela) *conflictend)
 {
+#ifndef _DL_HAVE_NO_ELF_MACHINE_RELA
   if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
     _dl_printf ("\nconflict processing: %s\n",
 		l->l_name[0] ? l->l_name : _dl_argv[0]);
@@ -63,4 +64,5 @@ _dl_resolve_conflicts (struct link_map *
     for (; conflict < conflictend; ++conflict)
       elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
   }
+#endif
 }
--- libc/sysdeps/mips/dl-machine.h.mips	Mon Feb  4 13:45:18 2002
+++ libc/sysdeps/mips/dl-machine.h	Mon Feb  4 15:08:39 2002
@@ -56,6 +56,9 @@
 #define ELF_MACHINE_JMP_SLOT			R_MIPS_REL32
 #define elf_machine_type_class(type)		ELF_RTYPE_CLASS_PLT
 
+/* MIPS doesn't support RELA.  */
+#define _DL_HAVE_NO_ELF_MACHINE_RELA
+
 /* Translate a processor specific dynamic tag to the index
    in l_info array.  */
 #define DT_MIPS(x) (DT_MIPS_##x - DT_LOPROC + DT_NUM)

#! /bin/sh -e

# DP: use divdi3 on mips

if [ $# -ne 2 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
        exit 1
esac
exit 0

--- sysdeps/mips/Makefile.orig	Wed Sep 11 21:41:07 2002
+++ sysdeps/mips/Makefile	Wed Sep 11 21:44:54 2002
@@ -6,3 +6,11 @@
 ifeq ($(subdir),setjmp)
 sysdep_routines += setjmp_aux
 endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += divdi3
+shared-only-routines += divdi3
+endif
+endif

Reply to: