[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r20166 - in /fsf/trunk/libc: ./ bits/ crypt/ include/ io/ misc/ nptl/ nptl/sysdeps/pthread/bits/ ports/ ports/sysdeps/arm/ p...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r20166 - in /fsf/trunk/libc: ./ bits/ crypt/ include/ io/ misc/ nptl/ nptl/sysdeps/pthread/bits/ ports/ ports/sysdeps/arm/ p...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 16 Aug 2012 00:01:42 -0000
Author: eglibc
Date: Thu Aug 16 00:01:41 2012
New Revision: 20166
Log:
Import glibc-mainline for 2012-08-16
Added:
fsf/trunk/libc/crypt/md5test-giant.c
fsf/trunk/libc/io/lseek.c
fsf/trunk/libc/nptl/pthread_spin_lock.c
fsf/trunk/libc/nptl/pthread_spin_trylock.c
fsf/trunk/libc/ports/sysdeps/arm/bits/atomic.h
fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.c
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h
Removed:
fsf/trunk/libc/misc/lseek.c
fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_trylock.c
fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c
fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c
fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.S
fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_trylock.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/bits/fcntl.h
fsf/trunk/libc/config.h.in
fsf/trunk/libc/crypt/Makefile
fsf/trunk/libc/crypt/md5.c
fsf/trunk/libc/crypt/sha512.c
fsf/trunk/libc/include/dirent.h
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/sysdeps/pthread/bits/libc-lockP.h
fsf/trunk/libc/ports/ChangeLog.arm
fsf/trunk/libc/ports/ChangeLog.hppa
fsf/trunk/libc/ports/ChangeLog.ia64
fsf/trunk/libc/ports/ChangeLog.m68k
fsf/trunk/libc/ports/ChangeLog.mips
fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c
fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_lock.c
fsf/trunk/libc/ports/sysdeps/ia64/configure
fsf/trunk/libc/ports/sysdeps/ia64/configure.in
fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_lock.c
fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
fsf/trunk/libc/posix/regcomp.c
fsf/trunk/libc/rt/clock_nanosleep.c
fsf/trunk/libc/string/str-two-way.h
fsf/trunk/libc/string/test-strncasecmp.c
fsf/trunk/libc/sysdeps/i386/configure
fsf/trunk/libc/sysdeps/i386/configure.in
fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
fsf/trunk/libc/sysdeps/i386/sysdep.h
fsf/trunk/libc/sysdeps/posix/system.c
fsf/trunk/libc/sysdeps/x86_64/configure
fsf/trunk/libc/sysdeps/x86_64/configure.in
fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Aug 16 00:01:41 2012
@@ -1,3 +1,81 @@
+2012-08-15 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * posix/regcomp.c (init_word_char): Use temporaries to hold the 64-bit
+ constants, which avoids warnings in 32-bit builds.
+
+ * bits/fcntl.h [__USE_POSIX199309 || __USE_UNIX98]:
+ (O_DSYNC, O_RSYNC): New macros (with NetBSD values).
+
+ * misc/lseek.c: File moved to ...
+ * io/lseek.c: ... here.
+
+ * rt/clock_nanosleep.c: Include <time.h>, not <sys/time.h>.
+
+ * crypt/sha512.c (sha512_process_block) [!USE_TOTAL128]: Avoid
+ shifting LEN more than 31 bits at once.
+
+2012-08-15 Liubov Dmitrieva <liubov.dmitrieva@xxxxxxxxx>
+
+ [BZ #14195]
+ * sysdeps/i386/i686/multiarch/strcmp-sssse3.S: Fix
+ segmentation fault for a case of two empty input strings.
+ * string/test-strncasecmp.c (check1): Renamed to...
+ (bz12205): ...this.
+ (bz14195): Add new testcase for two empty input strings and N > 0.
+ (test_main): Call new testcase, adapt for renamed function.
+
+2012-08-15 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ #14090]
+ * crypt/md5test2.c: New test, based on test supplied by Serge
+ Belyshev <belyshev@xxxxxxxxxxxxxxxxx>.
+ * crypt/Makefile (xtests): Add md5test-giant..
+ * crypt/Makefile ($(objpfx)md5test-giant): Add.
+
+2012-08-15 Paul Eggert <eggert@xxxxxxxxxxx>
+
+ [BZ #14090]
+ * crypt/md5.c (md5_process_block): Don't assume the buffer
+ length is less than 2**32.
+ * crypt/sha512.c (sha512_process_block): Don't assume the buffer
+ length is less than 2**64.
+
+2012-08-15 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * string/str-two-way.h: Include <sys/param.h>.
+ (MAX): Macro removed.
+
+ * sysdeps/x86_64/multiarch/strstr-c.c: Add copyright header.
+ Move #define and #undef of memmove to just before and after
+ including <string.h>.
+
+ * sysdeps/x86_64/multiarch/memmove.c: Don't include <stddef.h>.
+ [!NOT_IN_libc]: Move #define and #undef of memmove to just before
+ and after including <string.h>. Move declarations of
+ __memmove_sse2, __memmove_ssse3, and __memmove_ssse3_back
+ to before #include "string/memmove.c".
+
+ * include/dirent.h: Declare __getdirentries.
+
+ * sysdeps/posix/system.c (do_system): Cast SUB_REF () to void when not
+ using its value, to avoid warnings in the [!_LIBC_REENTRANT] case.
+
+2012-08-14 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * config.h.in (HAVE_CPP_ASM_DEBUGINFO): Delete.
+ * sysdeps/i386/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/i386/configure: Regenerated.
+ * sysdeps/i386/sysdep.h (ENTRY): Remove calls to STABS_CURRENT_FILE1,
+ STABS_CURRENT_FILE, and STABS_FUN.
+ (END): Remove call to STABS_FUN_END.
+ (STABS_CURRENT_FILE1): Delete.
+ (STABS_CURRENT_FILE): Likewise.
+ (STABS_FUN): Likewise.
+ (STABS_FUN_END): Likewise.
+ (STABS_FUN2): Likewise.
+ * sysdeps/x86_64/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/x86_64/configure: Regenerated.
+
2012-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
* elf/dl-open.c: Include <atomic.h>.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Aug 16 00:01:41 2012
@@ -9,9 +9,9 @@
* The following bugs are resolved with this release:
- 6778, 6808, 13717, 13939, 14042, 14166, 14150, 14151, 14154, 14157, 14166,
- 14173, 14283, 14298, 14303, 14307, 14328, 14331, 14336, 14337, 14347,
- 14349
+ 6778, 6808, 13717, 13939, 14042, 14090, 14166, 14150, 14151, 14154, 14157,
+ 14166, 14173, 14195, 14283, 14298, 14303, 14307, 14328, 14331, 14336,
+ 14337, 14347, 14349
* Support for STT_GNU_IFUNC symbols added for s390 and s390x.
Optimized versions of memcpy, memset, and memcmp added for System z10 and
Modified: fsf/trunk/libc/bits/fcntl.h
==============================================================================
--- fsf/trunk/libc/bits/fcntl.h (original)
+++ fsf/trunk/libc/bits/fcntl.h Thu Aug 16 00:01:41 2012
@@ -43,6 +43,10 @@
# define O_DIRECTORY 0x00200000 /* Must be a directory. */
# define O_NOFOLLOW 0x00000100 /* Do not follow links. */
# define O_CLOEXEC 0x00400000 /* Set close_on_exec. */
+#endif
+#if defined __USE_POSIX199309 || defined __USE_UNIX98
+# define O_DSYNC 0x00010000 /* Synchronize data. */
+# define O_RSYNC 0x00020000 /* Synchronize read operations. */
#endif
/* All opens support large file sizes, so there is no flag bit for this. */
Modified: fsf/trunk/libc/config.h.in
==============================================================================
--- fsf/trunk/libc/config.h.in (original)
+++ fsf/trunk/libc/config.h.in Thu Aug 16 00:01:41 2012
@@ -45,9 +45,6 @@
/* On powerpc64, use overlapping .opd entries. */
#undef USE_PPC64_OVERLAPPING_OPD
-
-/* Define if the assembler generates debugging information directly. */
-#undef HAVE_CPP_ASM_DEBUGINFO
/* Define if _Unwind_Find_FDE should be exported from glibc. */
#undef EXPORT_UNWIND_FIND_FDE
Modified: fsf/trunk/libc/crypt/Makefile
==============================================================================
--- fsf/trunk/libc/crypt/Makefile (original)
+++ fsf/trunk/libc/crypt/Makefile Thu Aug 16 00:01:41 2012
@@ -46,7 +46,12 @@
tests += md5test sha256test sha512test
+# The test md5test-giant uses up to 400 MB of RSS and runs on a fast
+# machine over a minute.
+xtests = md5test-giant
+
$(objpfx)md5test: $(objpfx)md5.o
+$(objpfx)md5test-giant: $(objpfx)md5.o
$(objpfx)sha256test: $(objpfx)sha256.o
$(objpfx)sha512test: $(objpfx)sha512.o
endif
Modified: fsf/trunk/libc/crypt/md5.c
==============================================================================
--- fsf/trunk/libc/crypt/md5.c (original)
+++ fsf/trunk/libc/crypt/md5.c Thu Aug 16 00:01:41 2012
@@ -1,7 +1,6 @@
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995,1996,1997,1999,2000,2001,2005,2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -312,13 +311,13 @@
md5_uint32 B = ctx->B;
md5_uint32 C = ctx->C;
md5_uint32 D = ctx->D;
+ md5_uint32 lolen = len;
/* First increment the byte count. RFC 1321 specifies the possible
length of the file up to 2^64 bits. Here we only compute the
number of bytes. Do a double word increment. */
- ctx->total[0] += len;
- if (ctx->total[0] < len)
- ++ctx->total[1];
+ ctx->total[0] += lolen;
+ ctx->total[1] += (len >> 31 >> 1) + (ctx->total[0] < lolen);
/* Process all bytes in the buffer with 64 bytes in each round of
the loop. */
Added: fsf/trunk/libc/crypt/md5test-giant.c
==============================================================================
--- fsf/trunk/libc/crypt/md5test-giant.c (added)
+++ fsf/trunk/libc/crypt/md5test-giant.c Thu Aug 16 00:01:41 2012
@@ -1,0 +1,137 @@
+/* Testcase for http://sourceware.org/bugzilla/show_bug.cgi?id=14090.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published
+ by the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+
+#include "md5.h"
+
+/* This test will not work with 32-bit size_t, so let it succeed
+ there. */
+#if SIZE_MAX <= UINT32_MAX
+static int
+do_test (void)
+{
+ return 0;
+}
+#else
+
+# define CONST_2G 0x080000000
+# define CONST_10G 0x280000000
+
+/* MD5 sum values of zero-filled blocks of specified sizes. */
+static const struct test_data_s
+{
+ const char ref[16];
+ size_t len;
+} test_data[] =
+ {
+ { "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04\xe9\x80\x09\x98\xec\xf8\x42\x7e",
+ 0x000000000 },
+ { "\xa9\x81\x13\x0c\xf2\xb7\xe0\x9f\x46\x86\xdc\x27\x3c\xf7\x18\x7e",
+ 0x080000000 },
+ { "\xc9\xa5\xa6\x87\x8d\x97\xb4\x8c\xc9\x65\xc1\xe4\x18\x59\xf0\x34",
+ 0x100000000 },
+ { "\x58\xcf\x63\x8a\x73\x3f\x91\x90\x07\xb4\x28\x7c\xf5\x39\x6d\x0c",
+ 0x180000000 },
+ { "\xb7\x70\x35\x1f\xad\xae\x5a\x96\xbb\xaf\x97\x02\xed\x97\xd2\x8d",
+ 0x200000000 },
+ { "\x2d\xd2\x6c\x4d\x47\x99\xeb\xd2\x9f\xa3\x1e\x48\xd4\x9e\x8e\x53",
+ 0x280000000 },
+};
+
+static int
+report (const char *id, const char *md5, size_t len, const char *ref)
+{
+ if (memcmp (md5, ref, 16))
+ {
+ printf ("test %s with size %zd failed\n", id, len);
+ return 1;
+ }
+ return 0;
+}
+
+/* Test md5 in a single md5_process_bytes call. */
+static int
+test_single (void *buf, size_t len, const char *ref)
+{
+ char sum[16];
+ struct md5_ctx ctx;
+
+ __md5_init_ctx (&ctx);
+ __md5_process_bytes (buf, len, &ctx);
+ __md5_finish_ctx (&ctx, sum);
+
+ return report ("single", sum, len, ref);
+}
+
+/* Test md5 with two md5_process_bytes calls to trigger a
+ different path in md5_process_block for sizes > 2 GB. */
+static int
+test_double (void *buf, size_t len, const char *ref)
+{
+ char sum[16];
+ struct md5_ctx ctx;
+
+ __md5_init_ctx (&ctx);
+ if (len >= CONST_2G)
+ {
+ __md5_process_bytes (buf, CONST_2G, &ctx);
+ __md5_process_bytes (buf + CONST_2G, len - CONST_2G, &ctx);
+ }
+ else
+ __md5_process_bytes (buf, len, &ctx);
+
+ __md5_finish_ctx (&ctx, sum);
+
+ return report ("double", sum, len, ref);
+}
+
+
+static int
+do_test (void)
+{
+ void *buf;
+ unsigned int j;
+ int result = 0;
+
+ buf = mmap64 (0, CONST_10G, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ if (buf == MAP_FAILED)
+ {
+ puts ("Could not allocate 10 GB via mmap, skipping test.");
+ return 0;
+ }
+
+ for (j = 0; j < sizeof (test_data) / sizeof (struct test_data_s); j++)
+ {
+ if (test_single (buf, test_data[j].len, test_data[j].ref))
+ result = 1;
+ if (test_double (buf, test_data[j].len, test_data[j].ref))
+ result = 1;
+ }
+
+ return result;
+}
+#endif
+
+/* This needs on a fast machine 90s. */
+#define TIMEOUT 180
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/crypt/sha512.c
==============================================================================
--- fsf/trunk/libc/crypt/sha512.c (original)
+++ fsf/trunk/libc/crypt/sha512.c Thu Aug 16 00:01:41 2012
@@ -1,6 +1,6 @@
/* Functions to compute SHA512 message digest of files or memory blocks.
according to the definition of SHA512 in FIPS 180-2.
- Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2012 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
@@ -123,9 +123,10 @@
#ifdef USE_TOTAL128
ctx->total128 += len;
#else
- ctx->total[TOTAL128_low] += len;
- if (ctx->total[TOTAL128_low] < len)
- ++ctx->total[TOTAL128_high];
+ uint64_t lolen = len;
+ ctx->total[TOTAL128_low] += lolen;
+ ctx->total[TOTAL128_high] += ((len >> 31 >> 31 >> 2)
+ + (ctx->total[TOTAL128_low] < lolen));
#endif
/* Process all bytes in the buffer with 128 bytes in each round of
Modified: fsf/trunk/libc/include/dirent.h
==============================================================================
--- fsf/trunk/libc/include/dirent.h (original)
+++ fsf/trunk/libc/include/dirent.h Thu Aug 16 00:01:41 2012
@@ -30,6 +30,10 @@
int (*__selector) (const struct dirent64 *),
int (*__cmp) (const struct dirent64 **,
const struct dirent64 **));
+extern __ssize_t __getdirentries (int __fd, char *__restrict __buf,
+ size_t __nbytes,
+ __off_t *__restrict __basep)
+ __THROW __nonnull ((2, 4));
extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
internal_function;
extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
Added: fsf/trunk/libc/io/lseek.c
==============================================================================
--- fsf/trunk/libc/io/lseek.c (added)
+++ fsf/trunk/libc/io/lseek.c Thu Aug 16 00:01:41 2012
@@ -1,0 +1,52 @@
+/* Copyright (C) 1991, 1995, 1996, 1997, 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+/* Seek to OFFSET on FD, starting from WHENCE. */
+off_t
+__lseek (fd, offset, whence)
+ int fd;
+ off_t offset;
+ int whence;
+{
+ if (fd < 0)
+ {
+ __set_errno (EBADF);
+ return -1;
+ }
+ switch (whence)
+ {
+ case SEEK_SET:
+ case SEEK_CUR:
+ case SEEK_END:
+ break;
+ default:
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (lseek)
+libc_hidden_def (__lseek)
+
+weak_alias (__lseek, lseek)
+#include <stub-tag.h>
Removed: fsf/trunk/libc/misc/lseek.c
==============================================================================
--- fsf/trunk/libc/misc/lseek.c (original)
+++ fsf/trunk/libc/misc/lseek.c (removed)
@@ -1,52 +1,0 @@
-/* Copyright (C) 1991, 1995, 1996, 1997, 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-/* Seek to OFFSET on FD, starting from WHENCE. */
-off_t
-__lseek (fd, offset, whence)
- int fd;
- off_t offset;
- int whence;
-{
- if (fd < 0)
- {
- __set_errno (EBADF);
- return -1;
- }
- switch (whence)
- {
- case SEEK_SET:
- case SEEK_CUR:
- case SEEK_END:
- break;
- default:
- __set_errno (EINVAL);
- return -1;
- }
-
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (lseek)
-libc_hidden_def (__lseek)
-
-weak_alias (__lseek, lseek)
-#include <stub-tag.h>
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Thu Aug 16 00:01:41 2012
@@ -1,3 +1,14 @@
+2012-08-15 Tom de Vries <vries@xxxxxxxxxxxxxxxx>
+ Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
+ (__libc_lock_trylock): Allow pre-existing definitions.
+
+2012-08-15 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * pthread_spin_lock.c: New file.
+ * pthread_spin_trylock.c: New file.
+
2012-08-08 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
Added: fsf/trunk/libc/nptl/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_spin_lock.c (added)
+++ fsf/trunk/libc/nptl/pthread_spin_lock.c Thu Aug 16 00:01:41 2012
@@ -1,0 +1,69 @@
+/* pthread_spin_lock -- lock a spin lock. Generic version.
+ Copyright (C) 2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <atomic.h>
+#include "pthreadP.h"
+
+/* A machine-specific version can define SPIN_LOCK_READS_BETWEEN_CMPXCHG
+ to the number of plain reads that it's optimal to spin on between uses
+ of atomic_compare_and_exchange_val_acq. If spinning forever is optimal
+ then use -1. If no plain reads here would ever be optimal, use 0. */
+#ifndef SPIN_LOCK_READS_BETWEEN_CMPXCHG
+# warning machine-dependent file should define SPIN_LOCK_READS_BETWEEN_CMPXCHG
+# define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
+#endif
+
+int
+pthread_spin_lock (pthread_spinlock_t *lock)
+{
+ /* atomic_exchange usually takes less instructions than
+ atomic_compare_and_exchange. On the other hand,
+ atomic_compare_and_exchange potentially generates less bus traffic
+ when the lock is locked.
+ We assume that the first try mostly will be successful, and we use
+ atomic_exchange. For the subsequent tries we use
+ atomic_compare_and_exchange. */
+ if (atomic_exchange_acq (lock, 1) == 0)
+ return 0;
+
+ do
+ {
+ /* The lock is contended and we need to wait. Going straight back
+ to cmpxchg is not a good idea on many targets as that will force
+ expensive memory synchronizations among processors and penalize other
+ running threads.
+ On the other hand, we do want to update memory state on the local core
+ once in a while to avoid spinning indefinitely until some event that
+ will happen to update local memory as a side-effect. */
+ if (SPIN_LOCK_READS_BETWEEN_CMPXCHG >= 0)
+ {
+ int wait = SPIN_LOCK_READS_BETWEEN_CMPXCHG;
+
+ while (*lock != 0 && wait > 0)
+ --wait;
+ }
+ else
+ {
+ while (*lock != 0)
+ ;
+ }
+ }
+ while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0);
+
+ return 0;
+}
Added: fsf/trunk/libc/nptl/pthread_spin_trylock.c
==============================================================================
--- fsf/trunk/libc/nptl/pthread_spin_trylock.c (added)
+++ fsf/trunk/libc/nptl/pthread_spin_trylock.c Thu Aug 16 00:01:41 2012
@@ -1,0 +1,27 @@
+/* pthread_spin_trylock -- trylock a spin lock. Generic version.
+ Copyright (C) 2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <atomic.h>
+#include "pthreadP.h"
+
+int
+pthread_spin_trylock (pthread_spinlock_t *lock)
+{
+ return atomic_exchange_acq (lock, 1) ? EBUSY : 0;
+}
Modified: fsf/trunk/libc/nptl/sysdeps/pthread/bits/libc-lockP.h
==============================================================================
--- fsf/trunk/libc/nptl/sysdeps/pthread/bits/libc-lockP.h (original)
+++ fsf/trunk/libc/nptl/sysdeps/pthread/bits/libc-lockP.h Thu Aug 16 00:01:41 2012
@@ -176,9 +176,12 @@
/* Lock the named lock variable. */
#if !defined NOT_IN_libc || defined IS_IN_libpthread
-# define __libc_lock_lock(NAME) \
+# ifndef __libc_lock_lock
+# define __libc_lock_lock(NAME) \
({ lll_lock (NAME, LLL_PRIVATE); 0; })
-#else
+# endif
+#else
+# undef __libc_lock_lock
# define __libc_lock_lock(NAME) \
__libc_maybe_call (__pthread_mutex_lock, (&(NAME)), 0)
#endif
@@ -189,9 +192,12 @@
/* Try to lock the named lock variable. */
#if !defined NOT_IN_libc || defined IS_IN_libpthread
-# define __libc_lock_trylock(NAME) \
+# ifndef __libc_lock_trylock
+# define __libc_lock_trylock(NAME) \
lll_trylock (NAME)
-#else
+# endif
+#else
+# undef __libc_lock_trylock
# define __libc_lock_trylock(NAME) \
__libc_maybe_call (__pthread_mutex_trylock, (&(NAME)), 0)
#endif
Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Thu Aug 16 00:01:41 2012
@@ -1,3 +1,32 @@
+2012-08-15 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/arm/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/arm/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
+2012-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/arm/bits/atomic.h: ... this.
+
+ * sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
+ [!__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4]
+ (atomic_full_barrier): Renamed to ...
+ (__arm_assisted_full_barrier): ... this.
+ (__arch_compare_and_exchange_val_32_acq): Renamed to ...
+ (__arm_assisted_compare_and_exchange_val_32_acq): ... this.
+ (atomic8_t, uatomic8_t, atomic_fast8_t, uatomic_fast8_t,
+ atomic32_t, uatomic32_t, atomic_fast32_t, uatomic_fast32_t,
+ atomicptr_t, uatomicptr_t, atomic_max_t, uatomic_max_t,
+ atomic_full_barrier, __arch_compare_and_exchange_val_32_acq,
+ __arch_compare_and_exchange_val_8_acq,
+ __arch_compare_and_exchange_val_16_acq,
+ __arch_compare_and_exchange_val_64_acq): Types and macros moved to ...
+ * sysdeps/arm/bits/atomic.h: ... this new file.
+
+2012-08-12 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/arm/dl-machine.h (elf_machine_rel) [R_ARM_ABS32]: Fix style.
+
2012-08-12 Mike Frysinger <vapier@xxxxxxxxxx>
* sysdeps/arm/dl-machine.h (elf_machine_rel) [R_ARM_ABS32]: Declare
Modified: fsf/trunk/libc/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.hppa (original)
+++ fsf/trunk/libc/ports/ChangeLog.hppa Thu Aug 16 00:01:41 2012
@@ -1,3 +1,8 @@
+2012-08-15 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/hppa/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/hppa/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
2012-08-12 Mike Frysinger <vapier@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/hppa/syscalls.list: Add prlimit64.
Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Thu Aug 16 00:01:41 2012
@@ -1,3 +1,8 @@
+2012-08-14 Mike Frysinger <vapier@xxxxxxxxxx>
+
+ * sysdeps/ia64/configure.in: Remove assembler-with-cpp debug check.
+ * sysdeps/ia64/configure: Regenerated.
+
2012-08-14 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/ia64/kernel-features.h
Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Thu Aug 16 00:01:41 2012
@@ -1,3 +1,8 @@
+2012-08-15 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/m68k/nptl/pthread_spin_lock.c: Use generic code.
+ * sysdeps/m68k/nptl/pthread_spin_trylock.c: Remove, use generic version.
+
2012-08-10 Andreas Schwab <schwab@xxxxxxxxxxxxxx>
* sysdeps/m68k/ldsodefs.h (m68k_gnu_pltenter): Remove const on
Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Thu Aug 16 00:01:41 2012
@@ -1,3 +1,19 @@
+2012-08-15 Tom de Vries <vries@xxxxxxxxxxxxxxxx>
+ Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (__libc_lock_lock)
+ (__libc_lock_trylock): Define versions optimized for MIPS.
+
+2012-08-15 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/nptl/pthread_spin_lock.S: Remove, use generic version.
+ * sysdeps/mips/nptl/pthread_spin_lock.c: New file.
+ * sysdeps/mips/nptl/pthread_spin_trylock.S: Remove, use generic version.
+
+2012-08-15 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/dl-lookup.c: Update from generic version.
+
2012-08-13 Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
[__GNUC_PREREQ (4, 8)]
Added: fsf/trunk/libc/ports/sysdeps/arm/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/bits/atomic.h (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/bits/atomic.h Thu Aug 16 00:01:41 2012
@@ -1,0 +1,81 @@
+/* Atomic operations. Pure ARM version.
+ Copyright (C) 2002-2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <stdint.h>
+
+typedef int8_t atomic8_t;
+typedef uint8_t uatomic8_t;
+typedef int_fast8_t atomic_fast8_t;
+typedef uint_fast8_t uatomic_fast8_t;
+
+typedef int32_t atomic32_t;
+typedef uint32_t uatomic32_t;
+typedef int_fast32_t atomic_fast32_t;
+typedef uint_fast32_t uatomic_fast32_t;
+
+typedef intptr_t atomicptr_t;
+typedef uintptr_t uatomicptr_t;
+typedef intmax_t atomic_max_t;
+typedef uintmax_t uatomic_max_t;
+
+void __arm_link_error (void);
+
+/* Use the atomic builtins provided by GCC in case the backend provides
+ a pattern to do this efficiently. */
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+# define atomic_full_barrier() __sync_synchronize ()
+#else
+# define atomic_full_barrier() __arm_assisted_full_barrier ()
+#endif
+
+/* An OS-specific bits/atomic.h file will define this macro if
+ the OS can provide something. If not, we'll fail to build
+ with a compiler that doesn't supply the operation. */
+#ifndef __arm_assisted_full_barrier
+# define __arm_assisted_full_barrier() __arm_link_error()
+#endif
+
+/* Atomic compare and exchange. */
+
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ __sync_val_compare_and_swap ((mem), (oldval), (newval))
+#else
+# define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ __arm_assisted_compare_and_exchange_val_32_acq ((mem), (oldval), (newval))
+#endif
+
+/* We don't support atomic operations on any non-word types.
+ So make them link errors. */
+#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+
+/* An OS-specific bits/atomic.h file will define this macro if
+ the OS can provide something. If not, we'll fail to build
+ with a compiler that doesn't supply the operation. */
+#ifndef __arm_assisted_compare_and_exchange_val_32_acq
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ __arm_link_error (); oldval; })
+#endif
Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h Thu Aug 16 00:01:41 2012
@@ -416,7 +416,7 @@
struct unaligned
{
Elf32_Addr x;
- } __attribute__((packed, may_alias));
+ } __attribute__ ((packed, may_alias));
# ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static
libc.a; make the reference weak so static programs can
Modified: fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_lock.c Thu Aug 16 00:01:41 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2008-2012 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
@@ -15,15 +15,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
- while (atomic_compare_and_exchange_val_acq (lock, 1, 0) != 0)
- while (*lock != 0)
- ;
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
Removed: fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_trylock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_trylock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/nptl/pthread_spin_trylock.c (removed)
@@ -1,26 +1,0 @@
-/* Copyright (C) 2008 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <atomic.h>
-#include "pthreadP.h"
-
-int
-pthread_spin_trylock (pthread_spinlock_t *lock)
-{
- return atomic_compare_and_exchange_val_acq (lock, 1, 0) ? EBUSY : 0;
-}
Modified: fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_lock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_lock.c Thu Aug 16 00:01:41 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 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
@@ -15,23 +15,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
-#if 0
- volatile unsigned int *addr = __ldcw_align (lock);
-
- while (__ldcw (addr) == 0)
- while (*addr == 0) ;
-
- return 0;
-#endif
-
- while (atomic_compare_and_exchange_val_acq(lock, 1, 0) == 1)
- while (*lock == 1);
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
Removed: fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/hppa/nptl/pthread_spin_trylock.c (removed)
@@ -1,33 +1,0 @@
-/* Copyright (C) 2005 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <atomic.h>
-#include "pthreadP.h"
-
-int
-pthread_spin_trylock (pthread_spinlock_t *lock)
-{
-#if 0
- volatile unsigned int *a = __ldcw_align (lock);
-
- return __ldcw (a) ? 0 : EBUSY;
-#endif
-
- return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
-
-}
Modified: fsf/trunk/libc/ports/sysdeps/ia64/configure
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/configure (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/configure Thu Aug 16 00:01:41 2012
@@ -72,6 +72,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -83,55 +87,5 @@
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/ia64.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop.b 0;;
- /* comment */
- nop.b 0;;
- /* comment */
- nop.b 0;;
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h
Modified: fsf/trunk/libc/ports/sysdeps/ia64/configure.in
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/ia64/configure.in (original)
+++ fsf/trunk/libc/ports/sysdeps/ia64/configure.in Thu Aug 16 00:01:41 2012
@@ -1,38 +1,5 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/ia64.
-
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- ${libc_cv_asm_global_directive} foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop.b 0;;
- /* comment */
- nop.b 0;;
- /* comment */
- nop.b 0;;
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
Modified: fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_lock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_lock.c Thu Aug 16 00:01:41 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>, 2010.
@@ -16,15 +16,9 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-#include <atomic.h>
-#include "pthreadP.h"
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
-int
-pthread_spin_lock (pthread_spinlock_t *lock)
-{
- while (atomic_compare_and_exchange_val_acq(lock, 1, 0) != 0)
- while (*lock != 0)
- ;
-
- return 0;
-}
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
Removed: fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c (original)
+++ fsf/trunk/libc/ports/sysdeps/m68k/nptl/pthread_spin_trylock.c (removed)
@@ -1,27 +1,0 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>, 2010.
-
- 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <errno.h>
-#include <atomic.h>
-#include "pthreadP.h"
-
-int
-pthread_spin_trylock (pthread_spinlock_t *lock)
-{
- return atomic_compare_and_exchange_val_acq(lock, 1, 0) ? EBUSY : 0;
-}
Modified: fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/dl-lookup.c Thu Aug 16 00:01:41 2012
@@ -1,6 +1,6 @@
/* Look up a symbol in the loaded objects.
MIPS/Linux version - special handling of non-PIC undefined symbol rules.
- Copyright (C) 1995-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 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
@@ -28,6 +28,7 @@
#include <sysdep-cancel.h>
#include <bits/libc-lock.h>
#include <tls.h>
+#include <atomic.h>
#include <assert.h>
Removed: fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.S (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.S (removed)
@@ -1,36 +1,0 @@
-/* Copyright (C) 2005 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/asm.h>
-#include <sysdep.h>
-#include <sgidefs.h>
-
-ENTRY (pthread_spin_lock)
- .set push
-#if _MIPS_SIM == _ABIO32
- .set mips2
-#endif
-1: ll a2, 0(a0)
- li a1, 1
- bnez a2, 1b
- sc a1, 0(a0)
- beqz a1, 1b
- MIPS_SYNC
- .set pop
- li v0, 0
- ret
-PSEUDO_END (pthread_spin_lock)
Added: fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.c (added)
+++ fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_lock.c Thu Aug 16 00:01:41 2012
@@ -1,0 +1,23 @@
+/* Copyright (C) 2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000
+
+/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because
+ it will resolve to this very file. Using "sysdeps/.." as reference to the
+ top level directory does the job. */
+#include <sysdeps/../nptl/pthread_spin_lock.c>
Removed: fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_trylock.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_trylock.S (original)
+++ fsf/trunk/libc/ports/sysdeps/mips/nptl/pthread_spin_trylock.S (removed)
@@ -1,40 +1,0 @@
-/* Copyright (C) 2005 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/asm.h>
-#include <sysdep.h>
-#define _ERRNO_H 1
-#include <bits/errno.h>
-#include <sgidefs.h>
-
-ENTRY (pthread_spin_trylock)
- .set push
-#if _MIPS_SIM == _ABIO32
- .set mips2
-#endif
- ll a2, 0(a0)
- li a1, 1
- bnez a2, 1f
- sc a1, 0(a0)
- beqz a1, 1f
- MIPS_SYNC
- .set pop
- li v0, 0
- ret
-1: li v0, EBUSY
- ret
-PSEUDO_END (pthread_spin_trylock)
Added: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h (added)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/atomic.h Thu Aug 16 00:01:41 2012
@@ -1,0 +1,105 @@
+/* Atomic operations. ARM/Linux version.
+ Copyright (C) 2002-2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+/* If the compiler doesn't provide a primitive, we'll use this macro
+ to get assistance from the kernel. */
+#ifdef __thumb2__
+# define __arm_assisted_full_barrier() \
+ __asm__ __volatile__ \
+ ("movw\tip, #0x0fa0\n\t" \
+ "movt\tip, #0xffff\n\t" \
+ "blx\tip" \
+ : : : "ip", "lr", "cc", "memory");
+#else
+# define __arm_assisted_full_barrier() \
+ __asm__ __volatile__ \
+ ("mov\tip, #0xffff0fff\n\t" \
+ "mov\tlr, pc\n\t" \
+ "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
+ : : : "ip", "lr", "cc", "memory");
+#endif
+
+/* Atomic compare and exchange. This sequence relies on the kernel to
+ provide a compare and exchange operation which is atomic on the
+ current architecture, either via cleverness on pre-ARMv6 or via
+ ldrex / strex on ARMv6.
+
+ It doesn't matter what register is used for a_oldval2, but we must
+ specify one to work around GCC PR rtl-optimization/21223. Otherwise
+ it may cause a_oldval or a_tmp to be moved to a different register.
+
+ We use the union trick rather than simply using __typeof (...) in the
+ declarations of A_OLDVAL et al because when NEWVAL or OLDVAL is of the
+ form *PTR and PTR has a 'volatile ... *' type, then __typeof (*PTR) has
+ a 'volatile ...' type and this triggers -Wvolatile-register-var to
+ complain about 'register volatile ... asm ("reg")'. */
+#ifdef __thumb2__
+/* Thumb-2 has ldrex/strex. However it does not have barrier instructions,
+ so we still need to use the kernel helper. */
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
+ union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
+ register uint32_t a_oldval asm ("r0"); \
+ register uint32_t a_newval asm ("r1") = newval_arg.v; \
+ register __typeof (mem) a_ptr asm ("r2") = (mem); \
+ register uint32_t a_tmp asm ("r3"); \
+ register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
+ __asm__ __volatile__ \
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
+ "cmp\t%[tmp], %[old2]\n\t" \
+ "bne\t1f\n\t" \
+ "mov\t%[old], %[old2]\n\t" \
+ "movw\t%[tmp], #0x0fc0\n\t" \
+ "movt\t%[tmp], #0xffff\n\t" \
+ "blx\t%[tmp]\n\t" \
+ "bcc\t0b\n\t" \
+ "mov\t%[tmp], %[old2]\n\t" \
+ "1:" \
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
+ [old2] "r" (a_oldval2) \
+ : "ip", "lr", "cc", "memory"); \
+ (__typeof (oldval)) a_tmp; })
+#else
+# define __arm_assisted_compare_and_exchange_val_32_acq(mem, newval, oldval) \
+ ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
+ union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
+ register uint32_t a_oldval asm ("r0"); \
+ register uint32_t a_newval asm ("r1") = newval_arg.v; \
+ register __typeof (mem) a_ptr asm ("r2") = (mem); \
+ register uint32_t a_tmp asm ("r3"); \
+ register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
+ __asm__ __volatile__ \
+ ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
+ "cmp\t%[tmp], %[old2]\n\t" \
+ "bne\t1f\n\t" \
+ "mov\t%[old], %[old2]\n\t" \
+ "mov\t%[tmp], #0xffff0fff\n\t" \
+ "mov\tlr, pc\n\t" \
+ "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \
+ "bcc\t0b\n\t" \
+ "mov\t%[tmp], %[old2]\n\t" \
+ "1:" \
+ : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
+ : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
+ [old2] "r" (a_oldval2) \
+ : "ip", "lr", "cc", "memory"); \
+ (__typeof (oldval)) a_tmp; })
+#endif
+
+#include <sysdeps/arm/bits/atomic.h>
Removed: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/bits/atomic.h (removed)
@@ -1,139 +1,0 @@
-/* Copyright (C) 2002-2012 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, see
- <http://www.gnu.org/licenses/>. */
-
-#include <stdint.h>
-#include <sysdep.h>
-
-
-typedef int8_t atomic8_t;
-typedef uint8_t uatomic8_t;
-typedef int_fast8_t atomic_fast8_t;
-typedef uint_fast8_t uatomic_fast8_t;
-
-typedef int32_t atomic32_t;
-typedef uint32_t uatomic32_t;
-typedef int_fast32_t atomic_fast32_t;
-typedef uint_fast32_t uatomic_fast32_t;
-
-typedef intptr_t atomicptr_t;
-typedef uintptr_t uatomicptr_t;
-typedef intmax_t atomic_max_t;
-typedef uintmax_t uatomic_max_t;
-
-void __arm_link_error (void);
-
-/* Use the atomic builtins provided by GCC in case the backend provides
- a pattern to do this efficiently. */
-
-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-#define atomic_full_barrier() __sync_synchronize ()
-#elif defined __thumb2__
-#define atomic_full_barrier() \
- __asm__ __volatile__ \
- ("movw\tip, #0x0fa0\n\t" \
- "movt\tip, #0xffff\n\t" \
- "blx\tip" \
- : : : "ip", "lr", "cc", "memory");
-#else
-#define atomic_full_barrier() \
- __asm__ __volatile__ \
- ("mov\tip, #0xffff0fff\n\t" \
- "mov\tlr, pc\n\t" \
- "add\tpc, ip, #(0xffff0fa0 - 0xffff0fff)" \
- : : : "ip", "lr", "cc", "memory");
-#endif
-
-/* Atomic compare and exchange. This sequence relies on the kernel to
- provide a compare and exchange operation which is atomic on the
- current architecture, either via cleverness on pre-ARMv6 or via
- ldrex / strex on ARMv6. */
-
-#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
-
-#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
-
-#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- __sync_val_compare_and_swap ((mem), (oldval), (newval))
-
-/* It doesn't matter what register is used for a_oldval2, but we must
- specify one to work around GCC PR rtl-optimization/21223. Otherwise
- it may cause a_oldval or a_tmp to be moved to a different register.
-
- We use the union trick rather than simply using __typeof (...) in the
- declarations of A_OLDVAL et al because when NEWVAL or OLDVAL is of the
- form *PTR and PTR has a 'volatile ... *' type, then __typeof (*PTR) has
- a 'volatile ...' type and this triggers -Wvolatile-register-var to
- complain about 'register volatile ... asm ("reg")'. */
-#elif defined __thumb2__
-/* Thumb-2 has ldrex/strex. However it does not have barrier instructions,
- so we still need to use the kernel helper. */
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
- union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
- register uint32_t a_oldval asm ("r0"); \
- register uint32_t a_newval asm ("r1") = newval_arg.v; \
- register __typeof (mem) a_ptr asm ("r2") = (mem); \
- register uint32_t a_tmp asm ("r3"); \
- register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
- __asm__ __volatile__ \
- ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
- "cmp\t%[tmp], %[old2]\n\t" \
- "bne\t1f\n\t" \
- "mov\t%[old], %[old2]\n\t" \
- "movw\t%[tmp], #0x0fc0\n\t" \
- "movt\t%[tmp], #0xffff\n\t" \
- "blx\t%[tmp]\n\t" \
- "bcc\t0b\n\t" \
- "mov\t%[tmp], %[old2]\n\t" \
- "1:" \
- : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
- : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
- [old2] "r" (a_oldval2) \
- : "ip", "lr", "cc", "memory"); \
- (__typeof (oldval)) a_tmp; })
-#else
-#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \
- ({ union { __typeof (oldval) a; uint32_t v; } oldval_arg = { .a = (oldval) };\
- union { __typeof (newval) a; uint32_t v; } newval_arg = { .a = (newval) };\
- register uint32_t a_oldval asm ("r0"); \
- register uint32_t a_newval asm ("r1") = newval_arg.v; \
- register __typeof (mem) a_ptr asm ("r2") = (mem); \
- register uint32_t a_tmp asm ("r3"); \
- register uint32_t a_oldval2 asm ("r4") = oldval_arg.v; \
- __asm__ __volatile__ \
- ("0:\tldr\t%[tmp],[%[ptr]]\n\t" \
- "cmp\t%[tmp], %[old2]\n\t" \
- "bne\t1f\n\t" \
- "mov\t%[old], %[old2]\n\t" \
- "mov\t%[tmp], #0xffff0fff\n\t" \
- "mov\tlr, pc\n\t" \
- "add\tpc, %[tmp], #(0xffff0fc0 - 0xffff0fff)\n\t" \
- "bcc\t0b\n\t" \
- "mov\t%[tmp], %[old2]\n\t" \
- "1:" \
- : [old] "=&r" (a_oldval), [tmp] "=&r" (a_tmp) \
- : [new] "r" (a_newval), [ptr] "r" (a_ptr), \
- [old2] "r" (a_oldval2) \
- : "ip", "lr", "cc", "memory"); \
- (__typeof (oldval)) a_tmp; })
-#endif
-
-#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
- ({ __arm_link_error (); oldval; })
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/nptl/lowlevellock.h Thu Aug 16 00:01:41 2012
@@ -1,5 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008,
- 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2012 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
@@ -291,4 +290,40 @@
__res; \
})
+/* Implement __libc_lock_lock using exchange_and_add, which expands into
+ a single instruction on XLP processors. We enable this for all MIPS
+ processors as atomic_exchange_and_add_acq and
+ atomic_compare_and_exchange_acq take the same time to execute.
+ This is a simplified expansion of ({ lll_lock (NAME, LLL_PRIVATE); 0; }).
+
+ Note: __lll_lock_wait_private() resets lock value to '2', which prevents
+ unbounded increase of the lock value and [with billions of threads]
+ overflow. */
+#define __libc_lock_lock(NAME) \
+ ({ \
+ int *__futex = &(NAME); \
+ if (__builtin_expect (atomic_exchange_and_add_acq (__futex, 1), 0)) \
+ __lll_lock_wait_private (__futex); \
+ 0; \
+ })
+
+#ifdef _MIPS_ARCH_XLP
+/* The generic version using a single atomic_compare_and_exchange_acq takes
+ less time for non-XLP processors, so we use below for XLP only. */
+# define __libc_lock_trylock(NAME) \
+ ({ \
+ int *__futex = &(NAME); \
+ int __result = atomic_exchange_and_add_acq (__futex, 1); \
+ /* If __result == 0, we succeeded in acquiring the lock. \
+ If __result == 1, we switched the lock to 'contended' state, which \
+ will cause a [possibly unnecessary] call to lll_futex_wait. This is \
+ unlikely, so we accept the possible inefficiency. \
+ If __result >= 2, we need to set the lock to 'contended' state to avoid \
+ unbounded increase from subsequent trylocks. */ \
+ if (__result >= 2) \
+ __result = atomic_exchange_acq (__futex, 2); \
+ __result; \
+ })
+#endif
+
#endif /* lowlevellock.h */
Modified: fsf/trunk/libc/posix/regcomp.c
==============================================================================
--- fsf/trunk/libc/posix/regcomp.c (original)
+++ fsf/trunk/libc/posix/regcomp.c Thu Aug 16 00:01:41 2012
@@ -932,8 +932,12 @@
{
if (sizeof (dfa->word_char[0]) == 8)
{
- dfa->word_char[0] = UINT64_C (0x03ff000000000000);
- dfa->word_char[1] = UINT64_C (0x07fffffe87fffffe);
+ /* The extra temporaries here avoid "implicitly truncated"
+ warnings in the case when this is dead code, i.e. 32-bit. */
+ const uint64_t wc0 = UINT64_C (0x03ff000000000000);
+ const uint64_t wc1 = UINT64_C (0x07fffffe87fffffe);
+ dfa->word_char[0] = wc0;
+ dfa->word_char[1] = wc1;
i = 2;
}
else if (sizeof (dfa->word_char[0]) == 4)
Modified: fsf/trunk/libc/rt/clock_nanosleep.c
==============================================================================
--- fsf/trunk/libc/rt/clock_nanosleep.c (original)
+++ fsf/trunk/libc/rt/clock_nanosleep.c Thu Aug 16 00:01:41 2012
@@ -1,5 +1,5 @@
/* High-resolution sleep with the specified clock. Stub version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000-2012 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
@@ -17,8 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include <errno.h>
-#include <sys/time.h>
-
+#include <time.h>
int
clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
Modified: fsf/trunk/libc/string/str-two-way.h
==============================================================================
--- fsf/trunk/libc/string/str-two-way.h (original)
+++ fsf/trunk/libc/string/str-two-way.h Thu Aug 16 00:01:41 2012
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@xxxxxxx>, 2008.
@@ -43,6 +43,7 @@
#include <limits.h>
#include <stdint.h>
+#include <sys/param.h> /* Defines MAX. */
/* We use the Two-Way string matching algorithm, which guarantees
linear complexity with constant space. Additionally, for long
@@ -65,10 +66,6 @@
# define LONG_NEEDLE_THRESHOLD 32U
#else
# define LONG_NEEDLE_THRESHOLD SIZE_MAX
-#endif
-
-#ifndef MAX
-# define MAX(a, b) ((a < b) ? (b) : (a))
#endif
#ifndef CANON_ELEMENT
Modified: fsf/trunk/libc/string/test-strncasecmp.c
==============================================================================
--- fsf/trunk/libc/string/test-strncasecmp.c (original)
+++ fsf/trunk/libc/string/test-strncasecmp.c Thu Aug 16 00:01:41 2012
@@ -1,5 +1,5 @@
/* Test and measure strncasecmp functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@xxxxxxxxxx>, 1999.
@@ -251,9 +251,9 @@
}
}
-
-static void
-check1 (void)
+/* Regression test for BZ #12205 */
+static void
+bz12205 (void)
{
static char cp [4096+16] __attribute__ ((aligned(4096)));
static char gotrel[4096] __attribute__ ((aligned(4096)));
@@ -270,6 +270,15 @@
check_result (impl, s1, s2, n, exp_result);
}
+/* Regression test for BZ #14195 */
+static void
+bz14195 (void)
+{
+ const char *empty_string = "";
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, empty_string, "", 5, 0);
+}
+
int
test_main (void)
{
@@ -277,7 +286,8 @@
test_init ();
- check1 ();
+ bz12205 ();
+ bz14195 ();
printf ("%23s", "");
FOR_EACH_IMPL (impl, 0)
Modified: fsf/trunk/libc/sysdeps/i386/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure (original)
+++ fsf/trunk/libc/sysdeps/i386/configure Thu Aug 16 00:01:41 2012
@@ -162,57 +162,6 @@
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
if ${libc_cv_cc_sse4+:} false; then :
Modified: fsf/trunk/libc/sysdeps/i386/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/configure.in (original)
+++ fsf/trunk/libc/sysdeps/i386/configure.in Thu Aug 16 00:01:41 2012
@@ -4,39 +4,6 @@
AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
[/* No default includes. */])
-
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
dnl Check if -msse4 works.
AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
Modified: fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S (original)
+++ fsf/trunk/libc/sysdeps/i386/i686/multiarch/strcmp-ssse3.S Thu Aug 16 00:01:41 2012
@@ -2445,7 +2445,7 @@
# endif
jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
cmp $1, REM
je L(eq_sncmp)
Modified: fsf/trunk/libc/sysdeps/i386/sysdep.h
==============================================================================
--- fsf/trunk/libc/sysdeps/i386/sysdep.h (original)
+++ fsf/trunk/libc/sysdeps/i386/sysdep.h Thu Aug 16 00:01:41 2012
@@ -59,12 +59,9 @@
incomplete stabs information. Fake some entries here which specify
the current source file. */
#define ENTRY(name) \
- STABS_CURRENT_FILE1("") \
- STABS_CURRENT_FILE(name) \
.globl C_SYMBOL_NAME(name); \
.type C_SYMBOL_NAME(name),@function; \
.align ALIGNARG(4); \
- STABS_FUN(name) \
C_LABEL(name) \
cfi_startproc; \
CALL_MCOUNT
@@ -72,34 +69,10 @@
#undef END
#define END(name) \
cfi_endproc; \
- ASM_SIZE_DIRECTIVE(name) \
- STABS_FUN_END(name)
+ ASM_SIZE_DIRECTIVE(name)
#define ENTRY_CHK(name) ENTRY (name)
#define END_CHK(name) END (name)
-
-#ifdef HAVE_CPP_ASM_DEBUGINFO
-/* Disable that goop, because we just pass -g through to the assembler
- and it generates proper line number information directly. */
-# define STABS_CURRENT_FILE1(name)
-# define STABS_CURRENT_FILE(name)
-# define STABS_FUN(name)
-# define STABS_FUN_END(name)
-#else
-/* Remove the following two lines once the gdb bug is fixed. */
-#define STABS_CURRENT_FILE(name) \
- STABS_CURRENT_FILE1 (#name)
-#define STABS_CURRENT_FILE1(name) \
- 1: .stabs name,100,0,0,1b;
-/* Emit stabs definition lines. We use F(0,1) and define t(0,1) as `int',
- the same way gcc does it. */
-#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
-#define STABS_FUN2(name, namestr) \
- .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0; \
- .stabs #namestr,36,0,0,name;
-#define STABS_FUN_END(name) \
- 1: .stabs "",36,0,0,1b-name;
-#endif
/* If compiled for profiling, call `mcount' at the start of each function. */
#ifdef PROF
Modified: fsf/trunk/libc/sysdeps/posix/system.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/system.c (original)
+++ fsf/trunk/libc/sysdeps/posix/system.c Thu Aug 16 00:01:41 2012
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2000,2002,2003,2005,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2012 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
@@ -70,13 +70,13 @@
{
if (__sigaction (SIGINT, &sa, &intr) < 0)
{
- SUB_REF ();
+ (void) SUB_REF ();
goto out;
}
if (__sigaction (SIGQUIT, &sa, &quit) < 0)
{
save = errno;
- SUB_REF ();
+ (void) SUB_REF ();
goto out_restore_sigint;
}
}
Modified: fsf/trunk/libc/sysdeps/x86_64/configure
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/configure (original)
+++ fsf/trunk/libc/sysdeps/x86_64/configure Thu Aug 16 00:01:41 2012
@@ -72,6 +72,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -163,56 +167,6 @@
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
-$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if ${libc_cv_cpp_asm_debuginfo+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if { ac_try='${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; } && {
- ac_pattern='conftest\.S'
- { ac_try='readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5
-$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; }
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
if ${libc_cv_cc_sse4+:} false; then :
Modified: fsf/trunk/libc/sysdeps/x86_64/configure.in
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/configure.in (original)
+++ fsf/trunk/libc/sysdeps/x86_64/configure.in Thu Aug 16 00:01:41 2012
@@ -4,39 +4,6 @@
AC_CHECK_HEADER([cpuid.h], ,
[AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
[/* No default includes. */])
-
-AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
- libc_cv_cpp_asm_debuginfo, [dnl
-cat > conftest.S <<EOF
-#include "confdefs.h"
-
-/* comment on
- two lines */
- ${libc_cv_dot_text}
- .globl foo
-foo:
- /* Unfortunately this test only works for a real instruction,
- not for any of the machine-independent pseudo-ops.
- So we just have to assume everybody has a "nop". */
- nop
- /* comment */
- nop
- /* comment */
- nop
-EOF
-if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
- ac_pattern='conftest\.S'
- AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
- grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
- }; then
- libc_cv_cpp_asm_debuginfo=yes
-else
- libc_cv_cpp_asm_debuginfo=no
-fi
-rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
-if test $libc_cv_cpp_asm_debuginfo = yes; then
- AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
-fi
dnl Check if -msse4 works.
AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/memmove.c Thu Aug 16 00:01:41 2012
@@ -1,6 +1,5 @@
/* Multiple versions of memmove.
- Copyright (C) 2010, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 2010-2012 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
@@ -17,31 +16,31 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#include <stddef.h>
-
#ifndef NOT_IN_libc
-#include <shlib-compat.h>
-#include "init-arch.h"
-
-#define MEMMOVE __memmove_sse2
-#ifdef SHARED
-# undef libc_hidden_builtin_def
-# define libc_hidden_builtin_def(name) \
+# define MEMMOVE __memmove_sse2
+# ifdef SHARED
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name) \
__hidden_ver1 (__memmove_sse2, __GI_memmove, __memmove_sse2);
-#endif
+# endif
/* Redefine memmove so that the compiler won't complain about the type
mismatch with the IFUNC selector in strong_alias, below. */
-#undef memmove
-#define memmove __redirect_memmove
+# undef memmove
+# define memmove __redirect_memmove
+# include <string.h>
+# undef memmove
+
+extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden;
#endif
#include "string/memmove.c"
#ifndef NOT_IN_libc
-extern __typeof (__redirect_memmove) __memmove_sse2 attribute_hidden;
-extern __typeof (__redirect_memmove) __memmove_ssse3 attribute_hidden;
-extern __typeof (__redirect_memmove) __memmove_ssse3_back attribute_hidden;
+# include <shlib-compat.h>
+# include "init-arch.h"
/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
ifunc symbol properly. */
@@ -52,10 +51,9 @@
? __memmove_ssse3_back : __memmove_ssse3)
: __memmove_sse2)
-#undef memmove
strong_alias (__libc_memmove, memmove)
-#if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
+# if SHLIB_COMPAT (libc, GLIBC_2_2_5, GLIBC_2_14)
compat_symbol (libc, memmove, memcpy, GLIBC_2_2_5);
+# endif
#endif
-#endif
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/strstr-c.c Thu Aug 16 00:01:41 2012
@@ -1,4 +1,27 @@
-#include "init-arch.h"
+/* Multiple versions of strstr.
+ Copyright (C) 2012 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, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Redefine strstr so that the compiler won't complain about the type
+ mismatch with the IFUNC selector in strong_alias, below. */
+#undef strstr
+#define strstr __redirect_strstr
+#include <string.h>
+#undef strstr
#define STRSTR __strstr_sse2
#ifdef SHARED
@@ -7,15 +30,12 @@
__hidden_ver1 (__strstr_sse2, __GI_strstr, __strstr_sse2);
#endif
-/* Redefine strstr so that the compiler won't complain about the type
- mismatch with the IFUNC selector in strong_alias, below. */
-#undef strstr
-#define strstr __redirect_strstr
-
#include "string/strstr.c"
extern __typeof (__redirect_strstr) __strstr_sse42 attribute_hidden;
extern __typeof (__redirect_strstr) __strstr_sse2 attribute_hidden;
+
+#include "init-arch.h"
/* Avoid DWARF definition DIE on ifunc symbol so that GDB can handle
ifunc symbol properly. */
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits