+2014-03-14 Roland McGrath <roland@hack.frob.com>
+
+ * Makeconfig (+gccwarn): Add -Wundef.
+ * include/errno.h [IS_IN_rtld] [!RTLD_PRIVATE_ERRNO]: #error to catch
+ a dl-sysdep.h breaking its contract.
+ [!IS_IN_rtld] (RTLD_PRIVATE_ERRNO): Define it to 0.
+ * include/stackinfo.h: New file.
+ * nptl/sysdeps/i386/tls.h (TLS_DTV_AT_TP): New macro.
+ * nptl/sysdeps/powerpc/tls.h (TLS_TCB_AT_TP): New macro.
+ * nptl/sysdeps/s390/tls.h (TLS_DTV_AT_TP): New macro.
+ * nptl/sysdeps/sh/tls.h (TLS_TCB_AT_TP): New macro.
+ * nptl/sysdeps/sparc/tls.h (TLS_DTV_AT_TP): New macro.
+ * nptl/sysdeps/x86_64/tls.h (TLS_DTV_AT_TP): New macro.
+ * sysdeps/aarch64/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/alpha/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/arm/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/ia64/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/m68k/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/mach/hurd/i386/tls.h (TLS_DTV_AT_TP): New macro.
+ * sysdeps/microblaze/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/mips/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+ * sysdeps/tile/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+
2014-03-14 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
[BZ #16707]
else
+gccwarn := -Wall -Wwrite-strings -Winline
endif
++gccwarn += -Wundef
+gccwarn-c = -Wstrict-prototypes
# We do not depend on the address of constants in different files to be
# ifdef IS_IN_rtld
# include <dl-sysdep.h>
+# ifndef RTLD_PRIVATE_ERRNO
+# error "dl-sysdep.h must define RTLD_PRIVATE_ERRNO!"
+# endif
+# else
+# define RTLD_PRIVATE_ERRNO 0
# endif
# if RTLD_PRIVATE_ERRNO
--- /dev/null
+/* Details about the machine's stack: wrapper header.
+ Copyright (C) 2014 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/>. */
+
+#ifndef _INCLUDE_STACKINFO_H
+#define _INCLUDE_STACKINFO_H 1
+
+/* A sysdeps/.../stackinfo.h file defines details for the CPU.
+ It is obliged to define either _STACK_GROWS_DOWN or _STACK_GROWS_UP. */
+#include_next <stackinfo.h>
+
+#if defined _STACK_GROWS_DOWN && _STACK_GROWS_DOWN
+# ifdef _STACK_GROWS_UP
+# error "stackinfo.h should not define both!"
+# else
+# define _STACK_GROWS_UP 0
+# endif
+#elif defined _STACK_GROWS_UP && _STACK_GROWS_UP
+# ifdef _STACK_GROWS_DOWN
+# error "stackinfo.h should not define both!"
+# else
+# define _STACK_GROWS_DOWN 0
+# endif
+#else
+# error "stackinfo.h must define _STACK_GROWS_UP or _STACK_GROWS_DOWN!"
+#endif
+
+#endif /* include/stackinfo.h */
};
-/* Get the thread descriptor definition. */
-# include <nptl/descr.h>
-
/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t),
because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole
struct pthread even when not linked with -lpthread. */
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
# define TLS_TCB_AT_TP 1
+# define TLS_DTV_AT_TP 0
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
/* Install the dtv pointer. The pointer passed is to the element with
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* We use the multiple_threads field in the pthread struct */
#define TLS_MULTIPLE_THREADS_IN_TCB 1
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
+
/* The stack_guard is accessed directly by GCC -fstack-protector code,
so it is a part of public ABI. The dtv and pointer_guard fields
are private. */
/* Get system call information. */
# include <sysdep.h>
-/* Get the thread descriptor definition. */
-# include <nptl/descr.h>
-
/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t),
because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole
struct pthread even when not linked with -lpthread. */
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
# define TLS_TCB_AT_TP 1
+# define TLS_DTV_AT_TP 0
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
/* Install the dtv pointer. The pointer passed is to the element with
/* The TLS blocks start right after the TCB. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* Get system call information. */
# include <sysdep.h>
-/* Get the thread descriptor definition. */
-# include <nptl/descr.h>
-
register struct pthread *__thread_self __asm__("%g7");
/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t),
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
# define TLS_TCB_AT_TP 1
+# define TLS_DTV_AT_TP 0
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
/* Install the dtv pointer. The pointer passed is to the element with
index -1 which contain the length. */
/* Get system call information. */
# include <sysdep.h>
-
-/* Get the thread descriptor definition. */
-# include <nptl/descr.h>
-
#ifndef LOCK_PREFIX
# ifdef UP
# define LOCK_PREFIX /* nothing */
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
# define TLS_TCB_AT_TP 1
+# define TLS_DTV_AT_TP 0
+
+/* Get the thread descriptor definition. */
+# include <nptl/descr.h>
/* Install the dtv pointer. The pointer passed is to the element with
+2014-02-28 Roland McGrath <roland@hack.frob.com>
+
+ * sysdeps/hppa/nptl/tls.h (TLS_TCB_AT_TP): New macro.
+
2014-03-05 Joseph Myers <joseph@codesourcery.com>
* sysdeps/hppa/fpu/libm-test-ulps: Remove individual test ulps.
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The DTV is allocated at the TP; the TCB is placed elsewhere. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TCB can have any size and the memory following the address the
thread pointer points to is unspecified. Allocate the TCB there. */
#define TLS_TCB_AT_TP 1
+#define TLS_DTV_AT_TP 0
#ifndef __ASSEMBLER__
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
/* The TP points to the start of the thread blocks. */
# define TLS_DTV_AT_TP 1
+# define TLS_TCB_AT_TP 0
/* We use the multiple_threads field in the pthread struct */
#define TLS_MULTIPLE_THREADS_IN_TCB 1