This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: build glibc error
On Wed, Feb 20, 2013 at 9:39 AM, Li Li <fancyerii@gmail.com> wrote:
> by this patch, I can configure now. but make fails
>
> gcc -nostdlib -nostartfiles -o
> /home/work/lili/glibc-build/sunrpc/rpcinfo
> -Wl,-dynamic-linker=/home/work/lili/glibc-build/lib/ld-linux-x86-64.so.2
> -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both
> /home/work/lili/glibc-build/csu/crt1.o
> /home/work/lili/glibc-build/csu/crti.o `gcc
> --print-file-name=crtbegin.o`
> /home/work/lili/glibc-build/sunrpc/rpcinfo.o
> -Wl,-rpath-link=/home/work/lili/glibc-build:/home/work/lili/glibc-build/math:/home/work/lili/glibc-build/elf:/home/work/lili/glibc-build/dlfcn:/home/work/lili/glibc-build/nss:/home/work/lili/glibc-build/nis:/home/work/lili/glibc-build/rt:/home/work/lili/glibc-build/resolv:/home/work/lili/glibc-build/crypt:/home/work/lili/glibc-build/nptl
> /home/work/lili/glibc-build/libc.so.6
> /home/work/lili/glibc-build/libc_nonshared.a -lgcc -Wl,--as-needed
> -lgcc_s -Wl,--no-as-needed `gcc --print-file-name=crtend.o`
> /home/work/lili/glibc-build/csu/crtn.o
> CPP='gcc -E -x c-header'
> /home/work/lili/glibc-build/elf/ld-linux-x86-64.so.2 --library-path
> /home/work/lili/glibc-build:/home/work/lili/glibc-build/math:/home/work/lili/glibc-build/elf:/home/work/lili/glibc-build/dlfcn:/home/work/lili/glibc-build/nss:/home/work/lili/glibc-build/nis:/home/work/lili/glibc-build/rt:/home/work/lili/glibc-build/resolv:/home/work/lili/glibc-build/crypt:/home/work/lili/glibc-build/nptl
> /home/work/lili/glibc-build/sunrpc/rpcgen -Y ../scripts -c
> rpcsvc/bootparam_prot.x -o
> /home/work/lili/glibc-build/sunrpc/xbootparam_prot.T
> make[2]: *** [/home/work/lili/glibc-build/sunrpc/xbootparam_prot.stmp]
> Segmentation fault (core dumped)
Well, this is a traditional SIGSEGV, thus you probably should start
gdb. A wild guess is that this one might solve your problem (but I
really don't know your config):
commit 42acbb92c861e97a6e1293ea853db88342a1bf53
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Dec 9 10:38:18 2010 -0500
Fix -D_FORTIFY_SOURCE memmove and bcop
diff --git a/ChangeLog b/ChangeLog
index 0fa7a55..1d5801a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-09 Jakub Jelinek <jakub@redhat.com>
+
+ * string/bits/string3.h (memmove, bcopy): Remove __restrict.
+
2010-12-03 Ulrich Drepper <drepper@gmail.com>
* po/it.po: Update from translation team.
diff --git a/string/bits/string3.h b/string/bits/string3.h
index 1d759f1..1647725 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2007, 2009, 2010 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
@@ -53,8 +53,7 @@ __NTH (memcpy (void *__restrict __dest, __const void
*__restrict __src,
}
__extern_always_inline void *
-__NTH (memmove (void *__restrict __dest, __const void *__restrict __src,
- size_t __len))
+__NTH (memmove (void *__dest, __const void *__src, size_t __len))
{
return __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
}
@@ -88,8 +87,7 @@ __NTH (memset (void *__dest, int __ch, size_t __len))
#ifdef __USE_BSD
__extern_always_inline void
-__NTH (bcopy (__const void *__restrict __src, void *__restrict __dest,
- size_t __len))
+__NTH (bcopy (__const void *__src, void *__dest, size_t __len))
{
(void) __builtin___memmove_chk (__dest, __src, __len, __bos0 (__dest));
}
diff --git a/sysdeps/i386/i686/multiarch/strcmp.S
b/sysdeps/i386/i686/multiarch/strcmp.S
index 7136d47..8724594 100644
--- a/sysdeps/i386/i686/multiarch/strcmp.S
+++ b/sysdeps/i386/i686/multiarch/strcmp.S
@@ -40,37 +40,32 @@
need strncmp before the initialization happened. */
#if (defined SHARED || !defined USE_AS_STRNCMP) && !defined NOT_IN_libc
# ifdef SHARED
- .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
- .globl __i686.get_pc_thunk.bx
- .hidden __i686.get_pc_thunk.bx
- .p2align 4
- .type __i686.get_pc_thunk.bx,@function
-__i686.get_pc_thunk.bx:
- movl (%esp), %ebx
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.dx,"ax",@progbits
+ .globl __i686.get_pc_thunk.dx
+ .hidden __i686.get_pc_thunk.dx
+ .p2align 2
+ .type __i686.get_pc_thunk.dx,@function
+__i686.get_pc_thunk.dx:
+ movl (%esp), %edx
ret
+ .size __i686.get_pc_thunk.dx, .-__i686.get_pc_thunk.dx
.text
ENTRY(STRCMP)
.type STRCMP, @gnu_indirect_function
- pushl %ebx
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (ebx, 0)
- call __i686.get_pc_thunk.bx
- addl $_GLOBAL_OFFSET_TABLE_, %ebx
- cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ call __i686.get_pc_thunk.dx
+ addl $_GLOBAL_OFFSET_TABLE_, %edx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%edx)
jne 1f
call __init_cpu_features
-1: leal __STRCMP_IA32@GOTOFF(%ebx), %eax
- testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
- jz 2f
- leal __STRCMP_SSSE3@GOTOFF(%ebx), %eax
- testl $bit_SSE4_2,
CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
- jz 2f
- leal __STRCMP_SSE4_2@GOTOFF(%ebx), %eax
-2: popl %ebx
- cfi_adjust_cfa_offset (-4)
- cfi_restore (ebx)
- ret
+1: leal __STRCMP_SSE4_2@GOTOFF(%edx), %eax
+ testl $bit_SSE4_2,
CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%edx)
+ jnz 2f
+ leal __STRCMP_SSSE3@GOTOFF(%edx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%edx)
+ jnz 2f
+ leal __STRCMP_IA32@GOTOFF(%edx), %ecx
+2: ret
END(STRCMP)
# else
.text
@@ -79,13 +74,13 @@ ENTRY(STRCMP)
cmpl $0, KIND_OFFSET+__cpu_features
jne 1f
call __init_cpu_features
-1: leal __STRCMP_IA32, %eax
- testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features
- jz 2f
- leal __STRCMP_SSSE3, %eax
+1: leal __STRCMP_SSE4_2, %eax
testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
- jz 2f
- leal __STRCMP_SSE4_2, %eax
+ jnz 2f
+ leal __STRCMP_SSSE3, %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features
+ jnz 2f
+ leal __STRCMP_IA32, %eax
2: ret
END(STRCMP)
# endif
Robert