This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[PATCH] Fix build fail on sparc64 for glibc-2.3.2-200306120810
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Balint Cristian <rezso at rdsor dot ro>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 16 Jun 2003 11:50:15 +0200
- Subject: [PATCH] Fix build fail on sparc64 for glibc-2.3.2-200306120810
- References: <200306161209.00955.rezso@rdsor.ro>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Jun 16, 2003 at 12:09:10PM +0300, Balint Cristian wrote:
> Hi !
>
> Its about glibc-2.3.2-51.src.rpm (RH rawhide one) is dated from 200306120810.
>
> On sparc32 compiles fine and work OK, but fail for sparc64 one:
> cd build-sparc64-linux
> make
> ***** blah blah bla ***************
> make[4]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.3.2-200306120810/time'
> make[3]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.3.2-200306120810/elf'
> gcc -m64 -nostdlib -nostartfiles -shared \
> -Wl,-z,combreloc -Wl,-z,defs -Wl,--verbose 2>&1 | \
> sed -e '/^=========/,/^=========/!d;/^=========/d' \
> -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> > /usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/ld.so.lds
> gcc -m64 -nostdlib -nostartfiles -shared -o /usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/ld.so \
> -Wl,-z,combreloc -Wl,-z,defs \
> /usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/librtld.os -Wl,--version-script=/usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/ld.map \
> -Wl,-soname=ld-linux.so.2 -T /usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/ld.so.lds
> /usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/librtld.os(.text+0x11764): In function `__xstat64_conv':
> ../sysdeps/unix/sysv/linux/xstatconv.c:111: undefined reference to `xstat_conv'
> collect2: ld returned 1 exit status
> make[2]: *** [/usr/src/redhat/BUILD/glibc-2.3.2-200306120810/build-sparc64-linux/elf/ld.so] Error 1
> make[2]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.3.2-200306120810/elf'
> make[1]: *** [elf/subdir_lib] Error 2
> make[1]: Leaving directory `/usr/src/redhat/BUILD/glibc-2.3.2-200306120810'
> make: *** [all] Error 2
> [root@sun build-sparc64-linux]#
>
> It doesnt find xstat_conv .... none workaronds of mine worked, it hurt my brain,
> supposing dont include the right header file ...
Untested patch:
2003-06-16 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/xstatconv.c (__xstat_conv): Define even if
defined __ASSUME_STAT64_SYSCALL && defined XSTAT_IS_XSTAT64.
(__xstat64_conv): Change xstat_conv to __xstat_conv.
--- libc/sysdeps/unix/sysv/linux/xstatconv.c.jj 2003-06-16 05:40:17.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/xstatconv.c 2003-06-16 05:47:13.000000000 -0400
@@ -31,7 +31,7 @@ struct kernel_stat;
#include <string.h>
-#ifndef __ASSUME_STAT64_SYSCALL
+#if !defined __ASSUME_STAT64_SYSCALL || defined XSTAT_IS_XSTAT64
int
__xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
@@ -108,7 +108,7 @@ int
__xstat64_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
{
#ifdef XSTAT_IS_XSTAT64
- return xstat_conv (vers, kbuf, ubuf);
+ return __xstat_conv (vers, kbuf, ubuf);
#else
switch (vers)
{
Jakub