summaryrefslogtreecommitdiff
path: root/packages/glibc-ports/2.16.0
diff options
context:
space:
mode:
Diffstat (limited to 'packages/glibc-ports/2.16.0')
-rw-r--r--packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch54
-rw-r--r--packages/glibc-ports/2.16.0/330-m68k-sys-user.patch96
-rw-r--r--packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch13
-rw-r--r--packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch55
-rw-r--r--packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch20
-rw-r--r--packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch22
-rw-r--r--packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch14
-rw-r--r--packages/glibc-ports/2.16.0/version.desc0
8 files changed, 274 insertions, 0 deletions
diff --git a/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
new file mode 100644
index 0000000..1f08ba1
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch
@@ -0,0 +1,54 @@
+From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001
+From: Joseph Myers <joseph@codesourcery.com>
+Date: Tue, 20 May 2014 21:27:13 +0000
+Subject: [PATCH] Fix ARM build with GCC trunk.
+
+sysdeps/unix/sysv/linux/arm/unwind-resume.c and
+sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
+variables that are written in C code but only read from toplevel asms.
+Current GCC trunk now optimizes away such apparently write-only static
+variables, so causing a build failure. This patch marks those
+variables with __attribute_used__ to avoid that optimization.
+
+Tested that this fixes the build for ARM.
+
+ * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+ (libgcc_s_resume): Use __attribute_used__.
+ * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
+ Likewise.
+---
+ sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
+ sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
+index 6ccd9b4..660d148 100644
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+@@ -22,7 +22,8 @@
+ #include <pthreadP.h>
+
+ static void *libgcc_s_handle;
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++ __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+ static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
+diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
+index bff3e2b..1f1eb71 100644
+--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+@@ -20,7 +20,8 @@
+ #include <stdio.h>
+ #include <unwind.h>
+
+-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
++static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
++ __attribute_used__;
+ static _Unwind_Reason_Code (*libgcc_s_personality)
+ (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
+
+--
+1.9.4
+
diff --git a/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
new file mode 100644
index 0000000..932d917
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch
@@ -0,0 +1,96 @@
+copied from kernel as it is sanitized now
+
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h
+--- glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100
+@@ -1,3 +1,90 @@
++#ifndef _SYS_USER_H
++#define _SYS_USER_H
++
++/* Core file format: The core file is written in such a way that gdb
++ can understand it and provide useful information to the user (under
++ linux we use the 'trad-core' bfd). There are quite a number of
++ obstacles to being able to view the contents of the floating point
++ registers, and until these are solved you will not be able to view the
++ contents of them. Actually, you can read in the core file and look at
++ the contents of the user struct to find out what the floating point
++ registers contain.
++ The actual file contents are as follows:
++ UPAGE: 1 page consisting of a user struct that tells gdb what is present
++ in the file. Directly after this is a copy of the task_struct, which
++ is currently not used by gdb, but it may come in useful at some point.
++ All of the registers are stored as part of the upage. The upage should
++ always be only one page.
++ DATA: The data area is stored. We use current->end_text to
++ current->brk to pick up all of the user variables, plus any memory
++ that may have been malloced. No attempt is made to determine if a page
++ is demand-zero or if a page is totally unused, we just cover the entire
++ range. All of the addresses are rounded in such a way that an integral
++ number of pages is written.
++ STACK: We need the stack information in order to get a meaningful
++ backtrace. We need to write the data from (esp) to
++ current->start_stack, so we round each of these off in order to be able
++ to write an integer number of pages.
++ The minimum core file size is 3 pages, or 12288 bytes.
++*/
++
++struct user_m68kfp_struct {
++ unsigned long fpregs[8*3]; /* fp0-fp7 registers */
++ unsigned long fpcntl[3]; /* fp control regs */
++};
++
++/* This is the old layout of "struct pt_regs" as of Linux 1.x, and
++ is still the layout used by user (the new pt_regs doesn't have
++ all registers). */
++struct user_regs_struct {
++ long d1,d2,d3,d4,d5,d6,d7;
++ long a0,a1,a2,a3,a4,a5,a6;
++ long d0;
++ long usp;
++ long orig_d0;
++ short stkadj;
++ short sr;
++ long pc;
++ short fmtvec;
++ short __fill;
++};
++
++
++/* When the kernel dumps core, it starts by dumping the user struct -
++ this will be used by gdb to figure out where the data and stack segments
++ are within the file, and what virtual addresses to use. */
++struct user{
++/* We start with the registers, to mimic the way that "memory" is returned
++ from the ptrace(3,...) function. */
++ struct user_regs_struct regs; /* Where the registers are actually stored */
++/* ptrace does not yet supply these. Someday.... */
++ int u_fpvalid; /* True if math co-processor being used. */
++ /* for this mess. Not yet used. */
++ struct user_m68kfp_struct m68kfp; /* Math Co-processor registers. */
++/* The rest of this junk is to help gdb figure out what goes where */
++ unsigned long int u_tsize; /* Text segment size (pages). */
++ unsigned long int u_dsize; /* Data segment size (pages). */
++ unsigned long int u_ssize; /* Stack segment size (pages). */
++ unsigned long start_code; /* Starting virtual address of text. */
++ unsigned long start_stack; /* Starting virtual address of stack area.
++ This is actually the bottom of the stack,
++ the top of the stack is always found in the
++ esp register. */
++ long int signal; /* Signal that caused the core dump. */
++ int reserved; /* No longer used */
++ struct user_regs_struct *u_ar0;
++ /* Used by gdb to help find the values for */
++ /* the registers. */
++ struct user_m68kfp_struct* u_fpstate; /* Math Co-processor pointer. */
++ unsigned long magic; /* To uniquely identify a core file */
++ char u_comm[32]; /* User command that was responsible */
++};
++#define NBPG 4096
++#define UPAGES 1
++#define HOST_TEXT_START_ADDR (u.start_code)
++#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
++
++#endif
+ /* Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
diff --git a/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
new file mode 100644
index 0000000..7612872
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch
@@ -0,0 +1,13 @@
+older verisons of glibc would build dl-sysdep as shared-only and dl-support as
+static-only. alpha hooks in a cache variable via dl-auxv.h. newer versions of
+glibc build dl-sysdep as both shared and static which means we now have symbol
+duplication for static builds with dl-sysdep and dl-support. since dl-sysdep
+is both shared/static, there is no point in hooking dl-support anymore, so we
+can punt it.
+
+diff -durN glibc-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100
+@@ -1,2 +1,1 @@
+-#include "dl-auxv.h"
+ #include <elf/dl-support.c>
diff --git a/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
new file mode 100644
index 0000000..96f1646
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch
@@ -0,0 +1,55 @@
+2006-05-30 Falk Hueffner <falk@debian.org>
+
+ * sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
+ to ev6 in assembly code.
+
+{standard input}: Assembler messages:
+{standard input}:341: Error: macro requires $at register while noat in effect
+{standard input}:374: Error: macro requires $at register while noat in effect
+{standard input}:438: Error: macro requires $at register while noat in effect
+{standard input}:471: Error: macro requires $at register while noat in effect
+make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
+
+Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
+I cannot really think of anything better than
+
+ ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100
+@@ -178,13 +178,13 @@
+ static inline void
+ stb_mb(unsigned char val, unsigned long addr)
+ {
+- __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
++ __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
+ }
+
+ static inline void
+ stw_mb(unsigned short val, unsigned long addr)
+ {
+- __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
++ __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
+ }
+
+ static inline void
+@@ -356,7 +356,7 @@
+ unsigned long int addr = dense_port_to_cpu_addr (port);
+ unsigned char r;
+
+- __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
++ __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
+ return r;
+ }
+
+@@ -366,7 +366,7 @@
+ unsigned long int addr = dense_port_to_cpu_addr (port);
+ unsigned short r;
+
+- __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
++ __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
+ return r;
+ }
+
diff --git a/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
new file mode 100644
index 0000000..db9c890
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch
@@ -0,0 +1,20 @@
+2009-05-26 Aurelien Jarno <aurelien@aurel32.net>
+
+ * sysdeps/alpha/Makefile (CFLAGS-rtld.c): add $(PIC-ccflag).
+
+ ports/sysdeps/alpha/Makefile | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff -durN glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile glibc-ports-2.16.0/sysdeps/alpha/Makefile
+--- glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100
+@@ -35,7 +35,8 @@
+
+ ifeq ($(subdir),elf)
+ # The ld.so startup code cannot use literals until it self-relocates.
+-CFLAGS-rtld.c = -mbuild-constants
++# It uses more than 64k for the small data area.
++CFLAGS-rtld.c = -mbuild-constants $(PIC-ccflag)
+ endif
+
+ # Build everything with full IEEE math support, and with dynamic rounding;
diff --git a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
new file mode 100644
index 0000000..a1c6c7a
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch
@@ -0,0 +1,22 @@
+fix build error on arm like on hppa:
+
+arm-unknown-linux-gnu-gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fno-strict-aliasing -g -pipe -Wstrict-prototypes -fPIC -I../include -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl -I/var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl -I../ports/sysdeps/arm/elf -I../ports/sysdeps/unix/sysv/linux/arm/nptl -I../ports/sysdeps/unix/sysv/linux/arm -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/arm/fpu -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I../ports -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include -isystem /usr/lib/gcc/arm-unknown-linux-gnu/4.3.2/include-fixed -isystem /usr/arm-unknown-linux-gnu/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -DSHARED -o /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -MD -MP -MF /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os.dt -MT /var/tmp/portage/cross-arm-unknown-linux-gnu/glibc-2.8_p20080602/work/build-default-arm-unknown-linux-gnu-nptl/nptl/rtld-libc-lowlevellock.os -DNOT_IN_libc=1 -DIS_IN_rtld=1
+In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function '__lll_lock_wait_private':
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: warning: implicit declaration of function 'THREAD_GETMEM'
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'THREAD_SELF' undeclared (first use in this function)
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: (Each undeclared identifier is reported only once
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.)
+../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function)
+
+diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h
+--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100
+@@ -25,6 +25,7 @@
+ #include <atomic.h>
+ #include <sysdep.h>
+ #include <kernel-features.h>
++#include <tls.h> /* Need THREAD_*, and header.*. */
+
+ #define FUTEX_WAIT 0
+ #define FUTEX_WAKE 1
diff --git a/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
new file mode 100644
index 0000000..ef42c8f
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch
@@ -0,0 +1,14 @@
+http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html
+
+diff -durN glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h glibc-ports-2.16.0/sysdeps/mips/fpu_control.h
+--- glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200
++++ glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100
+@@ -86,7 +86,7 @@
+ #define _FPU_RC_UP 0x2
+ #define _FPU_RC_DOWN 0x3
+
+-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
++#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
+
+
+ /* The fdlibm code requires strict IEEE double precision arithmetic,
diff --git a/packages/glibc-ports/2.16.0/version.desc b/packages/glibc-ports/2.16.0/version.desc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/packages/glibc-ports/2.16.0/version.desc