This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
glibc-2.3.6 build error on mips64
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 5 Dec 2005 13:09:09 +0100
- Subject: glibc-2.3.6 build error on mips64
Hi,
Cross-compiling glibc-2.3.6 to the mips64-linux platform, with gcc-4.0.2,
fails as follows:
In file included from dynamic-link.h:63,
from dl-reloc.c:269:
../sysdeps/mips/dl-machine.h: In function '_dl_relocate_object':
../sysdeps/mips/dl-machine.h:538: error: invalid storage class for function 'elf_machine_rel'
../sysdeps/mips/dl-machine.h:641: error: invalid storage class for function 'elf_machine_rel_relative'
../sysdeps/mips/dl-machine.h:648: error: invalid storage class for function 'elf_machine_lazy_rel'
../sysdeps/mips/dl-machine.h:656: error: invalid storage class for function 'elf_machine_got_rel'
../sysdeps/mips/dl-machine.h:743: error: invalid storage class for function 'elf_machine_runtime_setup'
make[2]: *** [/cross/cross-build/build-glibc-mips64/elf/dl-reloc.o] error 1
The preprocessed file shows the reason: elf/dynamic-link.h declares these
functions as 'auto inline', and the declaration in sysdeps/mips/dl-machine.h
with 'static inline' conflicts with it.
glibc was configured with
.../glibc-2.3.6/configure --host=mips64-linux --build=i486-suse-linux \
--prefix=/cross/mips64-linux --with-headers=/cross/mips64-linux/include \
--enable-add-ons=linuxthreads,libidn --disable-profile
The appended patch fixes it and allows glibc to build completely.
Cf. also Jakub's 2005-03-15 patch. The fix appears to be necessary only
on glibc-2_3-branch, not on HEAD.
2005-11-30 Bruno Haible <bruno@clisp.org>
* sysdeps/mips/dl-machine.h: Declare functions with 'auto inline',
not 'static inline'.
--- sysdeps/mips/dl-machine.h.bak 2004-11-24 05:36:09.000000000 +0100
+++ sysdeps/mips/dl-machine.h 2005-11-30 04:33:52.000000000 +0100
@@ -528,7 +528,7 @@
/* Perform the relocation specified by RELOC and SYM (which is fully resolved).
MAP is the object containing the reloc. */
-static inline void
+auto inline void
#ifdef RTLD_BOOTSTRAP
__attribute__ ((always_inline))
#endif
@@ -635,14 +635,14 @@
}
}
-static inline void
+auto inline void
elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
void *const reloc_addr)
{
/* XXX Nothing to do. There is no relative relocation, right? */
}
-static inline void
+auto inline void
elf_machine_lazy_rel (struct link_map *map,
ElfW(Addr) l_addr, const ElfW(Rel) *reloc)
{
@@ -651,7 +651,7 @@
#ifndef RTLD_BOOTSTRAP
/* Relocate GOT. */
-static inline void
+auto inline void
elf_machine_got_rel (struct link_map *map, int lazy)
{
ElfW(Addr) *got;
@@ -738,7 +738,7 @@
/* Set up the loaded object described by L so its stub function
will jump to the on-demand fixup code __dl_runtime_resolve. */
-static inline int
+auto inline int
elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
{
# ifndef RTLD_BOOTSTRAP