From 6317df47791e1e35b78dc69a636445dbc22d5c21 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 28 Jul 2008 21:32:33 +0000 Subject: Fourth step at renaming patches: renumber all patches with a 10-step. --- patches/glibc/2.3.6/195-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.3.6/200-fix-pr631.patch | 45 ----- patches/glibc/2.3.6/200-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.3.6/210-fix-pr631.patch | 45 +++++ patches/glibc/2.3.6/210-fp-byteorder.patch | 205 --------------------- patches/glibc/2.3.6/220-fp-byteorder.patch | 205 +++++++++++++++++++++ .../220-mips-bootstrap-gcc-header-install.patch | 37 ---- patches/glibc/2.3.6/230-make-install-lib-all.patch | 26 --- .../230-mips-bootstrap-gcc-header-install.patch | 37 ++++ patches/glibc/2.3.6/240-make-install-lib-all.patch | 26 +++ patches/glibc/2.3.6/240-weakalias.patch | 45 ----- patches/glibc/2.3.6/250-csu-Makefile.patch | 39 ---- patches/glibc/2.3.6/250-weakalias.patch | 45 +++++ patches/glibc/2.3.6/260-alpha-asm_page.patch | 26 --- patches/glibc/2.3.6/260-csu-Makefile.patch | 39 ++++ patches/glibc/2.3.6/270-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.3.6/270-alpha-asm_page.patch | 26 +++ patches/glibc/2.3.6/280-alpha-asm_elf.patch | 194 +++++++++++++++++++ patches/glibc/2.5.1/100-cygwin.patch | 187 +++++++++++++++++++ patches/glibc/2.5.1/110-configure-apple-as.patch | 25 +++ patches/glibc/2.5.1/120-cygwin.patch | 187 ------------------- patches/glibc/2.5.1/120-fix-pr631.patch | 45 +++++ patches/glibc/2.5.1/130-i686-assembler.patch | 38 ++++ patches/glibc/2.5.1/140-configure-apple-as.patch | 25 --- .../2.5.1/140-i386-preferred-stack-boundary.patch | 18 ++ patches/glibc/2.5.1/150-alpha-asm_page.patch | 26 +++ patches/glibc/2.5.1/150-fix-pr631.patch | 45 ----- patches/glibc/2.5.1/160-i686-assembler.patch | 38 ---- patches/glibc/2.5.1/160-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.5.1/170-alpha-asm_elf.patch | 194 +++++++++++++++++++ .../2.5.1/170-i386-preferred-stack-boundary.patch | 18 -- patches/glibc/2.5.1/180-alpha-asm_page.patch | 26 --- patches/glibc/2.5.1/180-alpha-cfi.patch | 25 +++ patches/glibc/2.5.1/190-alpha-sigsuspend.patch | 24 +++ patches/glibc/2.5.1/190-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.5.1/260-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.5.1/270-alpha-cfi.patch | 25 --- patches/glibc/2.5.1/280-alpha-sigsuspend.patch | 24 --- patches/glibc/2.5/100-cygwin.patch | 187 +++++++++++++++++++ patches/glibc/2.5/110-configure-apple-as.patch | 25 +++ patches/glibc/2.5/120-cygwin.patch | 187 ------------------- patches/glibc/2.5/120-fix-pr631.patch | 45 +++++ patches/glibc/2.5/130-i686-assembler.patch | 38 ++++ patches/glibc/2.5/140-configure-apple-as.patch | 25 --- .../2.5/140-i386-preferred-stack-boundary.patch | 18 ++ patches/glibc/2.5/150-alpha-asm_page.patch | 26 +++ patches/glibc/2.5/150-fix-pr631.patch | 45 ----- patches/glibc/2.5/160-i686-assembler.patch | 38 ---- patches/glibc/2.5/160-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.5/170-alpha-asm_elf.patch | 194 +++++++++++++++++++ .../2.5/170-i386-preferred-stack-boundary.patch | 18 -- patches/glibc/2.5/180-alpha-asm_page.patch | 26 --- patches/glibc/2.5/180-alpha-cfi.patch | 25 +++ patches/glibc/2.5/190-alpha-sigsuspend.patch | 24 +++ patches/glibc/2.5/190-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.5/260-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.5/270-alpha-cfi.patch | 25 --- patches/glibc/2.5/280-alpha-sigsuspend.patch | 24 --- patches/glibc/2.6.1/100-cygwin.patch | 187 +++++++++++++++++++ patches/glibc/2.6.1/110-configure-apple-as.patch | 25 +++ patches/glibc/2.6.1/120-cygwin.patch | 187 ------------------- patches/glibc/2.6.1/120-fix-pr631.patch | 45 +++++ patches/glibc/2.6.1/130-i686-assembler.patch | 38 ++++ patches/glibc/2.6.1/140-configure-apple-as.patch | 25 --- .../2.6.1/140-i386-preferred-stack-boundary.patch | 18 ++ patches/glibc/2.6.1/150-alpha-asm_page.patch | 26 +++ patches/glibc/2.6.1/150-fix-pr631.patch | 45 ----- patches/glibc/2.6.1/160-i686-assembler.patch | 38 ---- patches/glibc/2.6.1/160-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.6.1/170-alpha-asm_elf.patch | 194 +++++++++++++++++++ .../2.6.1/170-i386-preferred-stack-boundary.patch | 18 -- patches/glibc/2.6.1/180-alpha-asm_page.patch | 26 --- patches/glibc/2.6.1/190-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.6.1/200-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.6/100-cygwin.patch | 187 +++++++++++++++++++ patches/glibc/2.6/110-configure-apple-as.patch | 25 +++ patches/glibc/2.6/120-cygwin.patch | 187 ------------------- patches/glibc/2.6/120-fix-pr631.patch | 45 +++++ patches/glibc/2.6/130-i686-assembler.patch | 38 ++++ patches/glibc/2.6/140-configure-apple-as.patch | 25 --- .../2.6/140-i386-preferred-stack-boundary.patch | 18 ++ patches/glibc/2.6/150-alpha-asm_page.patch | 26 +++ patches/glibc/2.6/150-fix-pr631.patch | 45 ----- patches/glibc/2.6/160-i686-assembler.patch | 38 ---- patches/glibc/2.6/160-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.6/170-alpha-asm_elf.patch | 194 +++++++++++++++++++ .../2.6/170-i386-preferred-stack-boundary.patch | 18 -- patches/glibc/2.6/180-alpha-asm_page.patch | 26 --- patches/glibc/2.6/190-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.6/200-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.7/100-cygwin.patch | 185 +++++++++++++++++++ patches/glibc/2.7/110-configure-apple-as.patch | 26 +++ patches/glibc/2.7/120-cygwin.patch | 185 ------------------- patches/glibc/2.7/120-fix-pr631.patch | 43 +++++ patches/glibc/2.7/130-i686-assembler.patch | 43 +++++ patches/glibc/2.7/140-configure-apple-as.patch | 26 --- .../2.7/140-i386-preferred-stack-boundary.patch | 18 ++ patches/glibc/2.7/150-alpha-asm_page.patch | 26 +++ patches/glibc/2.7/150-fix-pr631.patch | 43 ----- patches/glibc/2.7/160-build_wcs_upper_buffer.patch | 22 +++ patches/glibc/2.7/160-i686-assembler.patch | 43 ----- .../2.7/170-i386-preferred-stack-boundary.patch | 18 -- patches/glibc/2.7/170-use_short_for_fnstsw.patch | 18 ++ patches/glibc/2.7/180-alpha-asm_page.patch | 26 --- .../glibc/2.7/180-gcc-4.3_sysinclude_path.patch | 50 +++++ patches/glibc/2.7/190-alpha-asm_elf.patch | 194 +++++++++++++++++++ patches/glibc/2.7/190-build_wcs_upper_buffer.patch | 22 --- patches/glibc/2.7/200-alpha-atfcts.patch | 12 ++ patches/glibc/2.7/200-use_short_for_fnstsw.patch | 18 -- patches/glibc/2.7/210-alpha-ptr_mangle.patch | 94 ++++++++++ .../glibc/2.7/210-gcc-4.3_sysinclude_path.patch | 50 ----- patches/glibc/2.7/220-alpha-asm_elf.patch | 194 ------------------- patches/glibc/2.7/230-alpha-atfcts.patch | 12 -- patches/glibc/2.7/240-alpha-ptr_mangle.patch | 94 ---------- .../glibc/linuxthreads-2.3.6/110-alpha-cfi.patch | 25 +++ .../glibc/linuxthreads-2.3.6/270-alpha-cfi.patch | 25 --- patches/glibc/ports-2.6.1/110-ARM-asm_page_h.patch | 11 ++ patches/glibc/ports-2.6.1/200-ARM-asm_page_h.patch | 11 -- 118 files changed, 3704 insertions(+), 3704 deletions(-) delete mode 100644 patches/glibc/2.3.6/195-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.3.6/200-fix-pr631.patch create mode 100644 patches/glibc/2.3.6/200-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.3.6/210-fix-pr631.patch delete mode 100644 patches/glibc/2.3.6/210-fp-byteorder.patch create mode 100644 patches/glibc/2.3.6/220-fp-byteorder.patch delete mode 100644 patches/glibc/2.3.6/220-mips-bootstrap-gcc-header-install.patch delete mode 100644 patches/glibc/2.3.6/230-make-install-lib-all.patch create mode 100644 patches/glibc/2.3.6/230-mips-bootstrap-gcc-header-install.patch create mode 100644 patches/glibc/2.3.6/240-make-install-lib-all.patch delete mode 100644 patches/glibc/2.3.6/240-weakalias.patch delete mode 100644 patches/glibc/2.3.6/250-csu-Makefile.patch create mode 100644 patches/glibc/2.3.6/250-weakalias.patch delete mode 100644 patches/glibc/2.3.6/260-alpha-asm_page.patch create mode 100644 patches/glibc/2.3.6/260-csu-Makefile.patch delete mode 100644 patches/glibc/2.3.6/270-alpha-asm_elf.patch create mode 100644 patches/glibc/2.3.6/270-alpha-asm_page.patch create mode 100644 patches/glibc/2.3.6/280-alpha-asm_elf.patch create mode 100644 patches/glibc/2.5.1/100-cygwin.patch create mode 100644 patches/glibc/2.5.1/110-configure-apple-as.patch delete mode 100644 patches/glibc/2.5.1/120-cygwin.patch create mode 100644 patches/glibc/2.5.1/120-fix-pr631.patch create mode 100644 patches/glibc/2.5.1/130-i686-assembler.patch delete mode 100644 patches/glibc/2.5.1/140-configure-apple-as.patch create mode 100644 patches/glibc/2.5.1/140-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.5.1/150-alpha-asm_page.patch delete mode 100644 patches/glibc/2.5.1/150-fix-pr631.patch delete mode 100644 patches/glibc/2.5.1/160-i686-assembler.patch create mode 100644 patches/glibc/2.5.1/160-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.5.1/170-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.5.1/170-i386-preferred-stack-boundary.patch delete mode 100644 patches/glibc/2.5.1/180-alpha-asm_page.patch create mode 100644 patches/glibc/2.5.1/180-alpha-cfi.patch create mode 100644 patches/glibc/2.5.1/190-alpha-sigsuspend.patch delete mode 100644 patches/glibc/2.5.1/190-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.5.1/260-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.5.1/270-alpha-cfi.patch delete mode 100644 patches/glibc/2.5.1/280-alpha-sigsuspend.patch create mode 100644 patches/glibc/2.5/100-cygwin.patch create mode 100644 patches/glibc/2.5/110-configure-apple-as.patch delete mode 100644 patches/glibc/2.5/120-cygwin.patch create mode 100644 patches/glibc/2.5/120-fix-pr631.patch create mode 100644 patches/glibc/2.5/130-i686-assembler.patch delete mode 100644 patches/glibc/2.5/140-configure-apple-as.patch create mode 100644 patches/glibc/2.5/140-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.5/150-alpha-asm_page.patch delete mode 100644 patches/glibc/2.5/150-fix-pr631.patch delete mode 100644 patches/glibc/2.5/160-i686-assembler.patch create mode 100644 patches/glibc/2.5/160-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.5/170-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.5/170-i386-preferred-stack-boundary.patch delete mode 100644 patches/glibc/2.5/180-alpha-asm_page.patch create mode 100644 patches/glibc/2.5/180-alpha-cfi.patch create mode 100644 patches/glibc/2.5/190-alpha-sigsuspend.patch delete mode 100644 patches/glibc/2.5/190-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.5/260-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.5/270-alpha-cfi.patch delete mode 100644 patches/glibc/2.5/280-alpha-sigsuspend.patch create mode 100644 patches/glibc/2.6.1/100-cygwin.patch create mode 100644 patches/glibc/2.6.1/110-configure-apple-as.patch delete mode 100644 patches/glibc/2.6.1/120-cygwin.patch create mode 100644 patches/glibc/2.6.1/120-fix-pr631.patch create mode 100644 patches/glibc/2.6.1/130-i686-assembler.patch delete mode 100644 patches/glibc/2.6.1/140-configure-apple-as.patch create mode 100644 patches/glibc/2.6.1/140-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.6.1/150-alpha-asm_page.patch delete mode 100644 patches/glibc/2.6.1/150-fix-pr631.patch delete mode 100644 patches/glibc/2.6.1/160-i686-assembler.patch create mode 100644 patches/glibc/2.6.1/160-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.6.1/170-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.6.1/170-i386-preferred-stack-boundary.patch delete mode 100644 patches/glibc/2.6.1/180-alpha-asm_page.patch delete mode 100644 patches/glibc/2.6.1/190-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.6.1/200-alpha-asm_elf.patch create mode 100644 patches/glibc/2.6/100-cygwin.patch create mode 100644 patches/glibc/2.6/110-configure-apple-as.patch delete mode 100644 patches/glibc/2.6/120-cygwin.patch create mode 100644 patches/glibc/2.6/120-fix-pr631.patch create mode 100644 patches/glibc/2.6/130-i686-assembler.patch delete mode 100644 patches/glibc/2.6/140-configure-apple-as.patch create mode 100644 patches/glibc/2.6/140-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.6/150-alpha-asm_page.patch delete mode 100644 patches/glibc/2.6/150-fix-pr631.patch delete mode 100644 patches/glibc/2.6/160-i686-assembler.patch create mode 100644 patches/glibc/2.6/160-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.6/170-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.6/170-i386-preferred-stack-boundary.patch delete mode 100644 patches/glibc/2.6/180-alpha-asm_page.patch delete mode 100644 patches/glibc/2.6/190-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.6/200-alpha-asm_elf.patch create mode 100644 patches/glibc/2.7/100-cygwin.patch create mode 100644 patches/glibc/2.7/110-configure-apple-as.patch delete mode 100644 patches/glibc/2.7/120-cygwin.patch create mode 100644 patches/glibc/2.7/120-fix-pr631.patch create mode 100644 patches/glibc/2.7/130-i686-assembler.patch delete mode 100644 patches/glibc/2.7/140-configure-apple-as.patch create mode 100644 patches/glibc/2.7/140-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.7/150-alpha-asm_page.patch delete mode 100644 patches/glibc/2.7/150-fix-pr631.patch create mode 100644 patches/glibc/2.7/160-build_wcs_upper_buffer.patch delete mode 100644 patches/glibc/2.7/160-i686-assembler.patch delete mode 100644 patches/glibc/2.7/170-i386-preferred-stack-boundary.patch create mode 100644 patches/glibc/2.7/170-use_short_for_fnstsw.patch delete mode 100644 patches/glibc/2.7/180-alpha-asm_page.patch create mode 100644 patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch create mode 100644 patches/glibc/2.7/190-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.7/190-build_wcs_upper_buffer.patch create mode 100644 patches/glibc/2.7/200-alpha-atfcts.patch delete mode 100644 patches/glibc/2.7/200-use_short_for_fnstsw.patch create mode 100644 patches/glibc/2.7/210-alpha-ptr_mangle.patch delete mode 100644 patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch delete mode 100644 patches/glibc/2.7/220-alpha-asm_elf.patch delete mode 100644 patches/glibc/2.7/230-alpha-atfcts.patch delete mode 100644 patches/glibc/2.7/240-alpha-ptr_mangle.patch create mode 100644 patches/glibc/linuxthreads-2.3.6/110-alpha-cfi.patch delete mode 100644 patches/glibc/linuxthreads-2.3.6/270-alpha-cfi.patch create mode 100644 patches/glibc/ports-2.6.1/110-ARM-asm_page_h.patch delete mode 100644 patches/glibc/ports-2.6.1/200-ARM-asm_page_h.patch (limited to 'patches/glibc') diff --git a/patches/glibc/2.3.6/195-use_short_for_fnstsw.patch b/patches/glibc/2.3.6/195-use_short_for_fnstsw.patch deleted file mode 100644 index 0e849fa1..00000000 --- a/patches/glibc/2.3.6/195-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.3.6/200-fix-pr631.patch b/patches/glibc/2.3.6/200-fix-pr631.patch deleted file mode 100644 index 899fa2ae..00000000 --- a/patches/glibc/2.3.6/200-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -487,7 +487,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -115,6 +115,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/200-use_short_for_fnstsw.patch b/patches/glibc/2.3.6/200-use_short_for_fnstsw.patch new file mode 100644 index 00000000..0e849fa1 --- /dev/null +++ b/patches/glibc/2.3.6/200-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.3.6/210-fix-pr631.patch b/patches/glibc/2.3.6/210-fix-pr631.patch new file mode 100644 index 00000000..899fa2ae --- /dev/null +++ b/patches/glibc/2.3.6/210-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -487,7 +487,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -115,6 +115,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/210-fp-byteorder.patch b/patches/glibc/2.3.6/210-fp-byteorder.patch deleted file mode 100644 index d45cdbc8..00000000 --- a/patches/glibc/2.3.6/210-fp-byteorder.patch +++ /dev/null @@ -1,205 +0,0 @@ -Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html -Author: addsub@eyou.com -Target: ARM - -Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c -and makes printf("%f", 1.0) work. - -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html : - It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point - is broken' on my big-endian hardfloat FPA ARM platform. ... - It's definitely needed for hardfloat. So I'd think it's needed for - big-endian systems in any case, and for VFP on little-endian systems - too. Someone would have to verify that though. - -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html - I just had a look at glibc-20040830, and [this patch] is still needed and useful - for this version. glibc-20040830 out-of-the-box still contains the - following wrong assumptions: - - sysdeps/arm/bits/endian.h: float word order is big endian (which it is - not on vfp systems) - - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they - are not on big endian systems, neither on vfp systems) - - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order - (which they are not on big endian systems) - [This patch] seems the right solution for all of these issues. - -Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html : - It's even needed for glibc CVS, AFAICS. - The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h - (currently at version 1.4) is only needed for proper VFP operation. - But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk - that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed - for proper operation of *any* FP model on big endian ARM. - -See also discussion in followups to -http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html) - -Message-ID: <276985760.37584@eyou.com> -Received: from unknown (HELO eyou.com) (172.16.2.2) - by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800 -Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800 -Date: 17 Feb 2004 10:42:38 +0800 -Message-ID: <20040217104238.8237.qmail@eyou.com> -From: "add" -To: dank@kegel.com -Reply-To: "add" -Subject: Re:   problem while building arm vfp softfloat gcc ` - -Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat -toolchain can printf("%f\n",1.0). So you may have a try of this - - -diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h ---- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400 -+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500 -@@ -9,4 +9,9 @@ - #else - #define __BYTE_ORDER __LITTLE_ENDIAN - #endif -+ -+#ifdef __VFP_FP__ -+#define __FLOAT_WORD_ORDER __BYTE_ORDER -+#else - #define __FLOAT_WORD_ORDER __BIG_ENDIAN -+#endif -diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h ---- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400 -+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500 -@@ -26,5 +26,13 @@ MA 02111-1307, USA. */ - #define BITS_PER_SHORTINT 16 - #define BITS_PER_CHAR 8 - --#define IEEE_DOUBLE_BIG_ENDIAN 0 --#define IEEE_DOUBLE_MIXED_ENDIAN 1 -+#if defined(__ARMEB__) -+# define IEEE_DOUBLE_MIXED_ENDIAN 0 -+# define IEEE_DOUBLE_BIG_ENDIAN 1 -+#elif defined(__VFP_FP__) -+# define IEEE_DOUBLE_MIXED_ENDIAN 0 -+# define IEEE_DOUBLE_BIG_ENDIAN 0 -+#else -+# define IEEE_DOUBLE_BIG_ENDIAN 0 -+# define IEEE_DOUBLE_MIXED_ENDIAN 1 -+#endif -diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h ---- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400 -+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500 -@@ -1,115 +0,0 @@ --/* Copyright (C) 1992, 1995, 1996, 1998 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _IEEE754_H -- --#define _IEEE754_H 1 --#include -- --#include -- --__BEGIN_DECLS -- --union ieee754_float -- { -- float f; -- -- /* This is the IEEE 754 single-precision format. */ -- struct -- { -- unsigned int mantissa:23; -- unsigned int exponent:8; -- unsigned int negative:1; -- } ieee; -- -- /* This format makes it easier to see if a NaN is a signalling NaN. */ -- struct -- { -- unsigned int mantissa:22; -- unsigned int quiet_nan:1; -- unsigned int exponent:8; -- unsigned int negative:1; -- } ieee_nan; -- }; -- --#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ -- -- --union ieee754_double -- { -- double d; -- -- /* This is the IEEE 754 double-precision format. */ -- struct -- { -- unsigned int mantissa0:20; -- unsigned int exponent:11; -- unsigned int negative:1; -- unsigned int mantissa1:32; -- } ieee; -- -- /* This format makes it easier to see if a NaN is a signalling NaN. */ -- struct -- { -- unsigned int mantissa0:19; -- unsigned int quiet_nan:1; -- unsigned int exponent:11; -- unsigned int negative:1; -- unsigned int mantissa1:32; -- } ieee_nan; -- }; -- --#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ -- -- --/* The following two structures are correct for `new' floating point systems but -- wrong for the old FPPC. The only solution seems to be to avoid their use on -- old hardware. */ -- --union ieee854_long_double -- { -- long double d; -- -- /* This is the IEEE 854 double-extended-precision format. */ -- struct -- { -- unsigned int exponent:15; -- unsigned int empty:16; -- unsigned int negative:1; -- unsigned int mantissa1:32; -- unsigned int mantissa0:32; -- } ieee; -- -- /* This is for NaNs in the IEEE 854 double-extended-precision format. */ -- struct -- { -- unsigned int exponent:15; -- unsigned int empty:16; -- unsigned int negative:1; -- unsigned int mantissa1:32; -- unsigned int mantissa0:30; -- unsigned int quiet_nan:1; -- unsigned int one:1; -- } ieee_nan; -- }; -- --#define IEEE854_LONG_DOUBLE_BIAS 0x3fff -- --__END_DECLS -- --#endif /* ieee754.h */ - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/220-fp-byteorder.patch b/patches/glibc/2.3.6/220-fp-byteorder.patch new file mode 100644 index 00000000..d45cdbc8 --- /dev/null +++ b/patches/glibc/2.3.6/220-fp-byteorder.patch @@ -0,0 +1,205 @@ +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html +Author: addsub@eyou.com +Target: ARM + +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c +and makes printf("%f", 1.0) work. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html : + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point + is broken' on my big-endian hardfloat FPA ARM platform. ... + It's definitely needed for hardfloat. So I'd think it's needed for + big-endian systems in any case, and for VFP on little-endian systems + too. Someone would have to verify that though. + +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html + I just had a look at glibc-20040830, and [this patch] is still needed and useful + for this version. glibc-20040830 out-of-the-box still contains the + following wrong assumptions: + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is + not on vfp systems) + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they + are not on big endian systems, neither on vfp systems) + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order + (which they are not on big endian systems) + [This patch] seems the right solution for all of these issues. + +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html : + It's even needed for glibc CVS, AFAICS. + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h + (currently at version 1.4) is only needed for proper VFP operation. + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed + for proper operation of *any* FP model on big endian ARM. + +See also discussion in followups to +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html) + +Message-ID: <276985760.37584@eyou.com> +Received: from unknown (HELO eyou.com) (172.16.2.2) + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800 +Date: 17 Feb 2004 10:42:38 +0800 +Message-ID: <20040217104238.8237.qmail@eyou.com> +From: "add" +To: dank@kegel.com +Reply-To: "add" +Subject: Re:   problem while building arm vfp softfloat gcc ` + +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat +toolchain can printf("%f\n",1.0). So you may have a try of this + + +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h +--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400 ++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500 +@@ -9,4 +9,9 @@ + #else + #define __BYTE_ORDER __LITTLE_ENDIAN + #endif ++ ++#ifdef __VFP_FP__ ++#define __FLOAT_WORD_ORDER __BYTE_ORDER ++#else + #define __FLOAT_WORD_ORDER __BIG_ENDIAN ++#endif +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h +--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */ + #define BITS_PER_SHORTINT 16 + #define BITS_PER_CHAR 8 + +-#define IEEE_DOUBLE_BIG_ENDIAN 0 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#if defined(__ARMEB__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 1 ++#elif defined(__VFP_FP__) ++# define IEEE_DOUBLE_MIXED_ENDIAN 0 ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++#else ++# define IEEE_DOUBLE_BIG_ENDIAN 0 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1 ++#endif +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h +--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400 ++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500 +@@ -1,115 +0,0 @@ +-/* Copyright (C) 1992, 1995, 1996, 1998 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _IEEE754_H +- +-#define _IEEE754_H 1 +-#include +- +-#include +- +-__BEGIN_DECLS +- +-union ieee754_float +- { +- float f; +- +- /* This is the IEEE 754 single-precision format. */ +- struct +- { +- unsigned int mantissa:23; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa:22; +- unsigned int quiet_nan:1; +- unsigned int exponent:8; +- unsigned int negative:1; +- } ieee_nan; +- }; +- +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */ +- +- +-union ieee754_double +- { +- double d; +- +- /* This is the IEEE 754 double-precision format. */ +- struct +- { +- unsigned int mantissa0:20; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee; +- +- /* This format makes it easier to see if a NaN is a signalling NaN. */ +- struct +- { +- unsigned int mantissa0:19; +- unsigned int quiet_nan:1; +- unsigned int exponent:11; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- } ieee_nan; +- }; +- +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */ +- +- +-/* The following two structures are correct for `new' floating point systems but +- wrong for the old FPPC. The only solution seems to be to avoid their use on +- old hardware. */ +- +-union ieee854_long_double +- { +- long double d; +- +- /* This is the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:32; +- } ieee; +- +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */ +- struct +- { +- unsigned int exponent:15; +- unsigned int empty:16; +- unsigned int negative:1; +- unsigned int mantissa1:32; +- unsigned int mantissa0:30; +- unsigned int quiet_nan:1; +- unsigned int one:1; +- } ieee_nan; +- }; +- +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff +- +-__END_DECLS +- +-#endif /* ieee754.h */ + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/220-mips-bootstrap-gcc-header-install.patch b/patches/glibc/2.3.6/220-mips-bootstrap-gcc-header-install.patch deleted file mode 100644 index 2fd72f8b..00000000 --- a/patches/glibc/2.3.6/220-mips-bootstrap-gcc-header-install.patch +++ /dev/null @@ -1,37 +0,0 @@ -http://sourceware.org/ml/crossgcc/2005-05/msg00165.html -Fixes a MIPS build problem (unrelated to NPTL) - -Message-ID: <428E8B24.1000201@realitydiluted.com> -Date: Fri, 20 May 2005 20:13:08 -0500 -From: "Steven J dot Hill" -To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org, - Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net -Subject: New NPTL patches for crosstools and MIPS NPTL patches.... - -Greetings. - -I have uploaded the latest NPTL patch for crosstool-0.34. I have also -uploaded a tarball of the patches necessary to build a MIPS NPTL -cross toolchain. To build a MIPS NPTL toolchain you will need the -released version of binutils-2.16 and the absolute latest GCC and -glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script -to build the toolchain. Please report bugs or issues to the crossgcc -mailing list. Here is the link off of my FTP site: - - ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/ - -[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers] - -diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile ---- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600 -+++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500 -@@ -1,3 +1,7 @@ -+ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),) - ifeq ($(filter -mabi=32,$(CC)),) - CC += -mabi=32 - endif -+else -+CC += -D"_MIPS_SZPTR=32" -+endif - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/230-make-install-lib-all.patch b/patches/glibc/2.3.6/230-make-install-lib-all.patch deleted file mode 100644 index 1e69bb23..00000000 --- a/patches/glibc/2.3.6/230-make-install-lib-all.patch +++ /dev/null @@ -1,26 +0,0 @@ -From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch -Rule to install all needed libraries, not just the ones installed by install-lib, -yet not install programs. -Needed because we can't use the main install target, as we can't build programs before -we have the final gcc installed; linking fails because libeh.a is not present, -and glibc insists on linking programs with that library. - -diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules ---- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200 -+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200 -@@ -844,6 +844,13 @@ - installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ - $(inst_libdir)/$(patsubst %,$(libtype$o),\ - $(libprefix)$(libc-name))) -+ -+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \ -+ $(inst_slibdir)/libc-$(version).so \ -+ $(inst_libdir)/libc.so \ -+ $(inst_libdir)/libc.a \ -+ install-lib -+ - install: $(installed-libcs) - $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) - $(make-target-directory) - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/230-mips-bootstrap-gcc-header-install.patch b/patches/glibc/2.3.6/230-mips-bootstrap-gcc-header-install.patch new file mode 100644 index 00000000..2fd72f8b --- /dev/null +++ b/patches/glibc/2.3.6/230-mips-bootstrap-gcc-header-install.patch @@ -0,0 +1,37 @@ +http://sourceware.org/ml/crossgcc/2005-05/msg00165.html +Fixes a MIPS build problem (unrelated to NPTL) + +Message-ID: <428E8B24.1000201@realitydiluted.com> +Date: Fri, 20 May 2005 20:13:08 -0500 +From: "Steven J dot Hill" +To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org, + Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net +Subject: New NPTL patches for crosstools and MIPS NPTL patches.... + +Greetings. + +I have uploaded the latest NPTL patch for crosstool-0.34. I have also +uploaded a tarball of the patches necessary to build a MIPS NPTL +cross toolchain. To build a MIPS NPTL toolchain you will need the +released version of binutils-2.16 and the absolute latest GCC and +glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script +to build the toolchain. Please report bugs or issues to the crossgcc +mailing list. Here is the link off of my FTP site: + + ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/ + +[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers] + +diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile +--- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600 ++++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500 +@@ -1,3 +1,7 @@ ++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),) + ifeq ($(filter -mabi=32,$(CC)),) + CC += -mabi=32 + endif ++else ++CC += -D"_MIPS_SZPTR=32" ++endif + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/240-make-install-lib-all.patch b/patches/glibc/2.3.6/240-make-install-lib-all.patch new file mode 100644 index 00000000..1e69bb23 --- /dev/null +++ b/patches/glibc/2.3.6/240-make-install-lib-all.patch @@ -0,0 +1,26 @@ +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch +Rule to install all needed libraries, not just the ones installed by install-lib, +yet not install programs. +Needed because we can't use the main install target, as we can't build programs before +we have the final gcc installed; linking fails because libeh.a is not present, +and glibc insists on linking programs with that library. + +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules +--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200 ++++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200 +@@ -844,6 +844,13 @@ + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ + $(inst_libdir)/$(patsubst %,$(libtype$o),\ + $(libprefix)$(libc-name))) ++ ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \ ++ $(inst_slibdir)/libc-$(version).so \ ++ $(inst_libdir)/libc.so \ ++ $(inst_libdir)/libc.a \ ++ install-lib ++ + install: $(installed-libcs) + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) + $(make-target-directory) + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.3.6/240-weakalias.patch b/patches/glibc/2.3.6/240-weakalias.patch deleted file mode 100644 index 722365f1..00000000 --- a/patches/glibc/2.3.6/240-weakalias.patch +++ /dev/null @@ -1,45 +0,0 @@ -This one was taken from debian. - -# DP: Description: Fix __bind redefinition problem -# DP: Related bugs: -# DP: Dpatch author: Phil Blundell -# DP: Patch author: Daniel Jacobowitz -# DP: Upstream status: In CVS -# DP: Status Details: -# DP: Date: 2005-12-25 - -Index: sysdeps/unix/sysv/linux/arm/socket.S -=================================================================== -RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v -retrieving revision 1.12 -retrieving revision 1.13 -diff -u -r1.12 -r1.13 ---- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12 -+++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13 -@@ -1,4 +1,6 @@ --/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc. -+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 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 -@@ -32,7 +34,11 @@ - The .S files for the other calls just #define socket and #include this. */ - - #ifndef __socket -+#ifndef NO_WEAK_ALIAS - #define __socket P(__,socket) -+#else -+#define __socket socket -+#endif - #endif - - #define PUSHARGS_1 str a1, [sp, $-4]! -@@ -120,4 +126,6 @@ - - PSEUDO_END (__socket) - -+#ifndef NO_WEAK_ALIAS - weak_alias (__socket, socket) -+#endif diff --git a/patches/glibc/2.3.6/250-csu-Makefile.patch b/patches/glibc/2.3.6/250-csu-Makefile.patch deleted file mode 100644 index 509cbcc1..00000000 --- a/patches/glibc/2.3.6/250-csu-Makefile.patch +++ /dev/null @@ -1,39 +0,0 @@ -Use printf instead of echo for some shells. - -http://www.cygwin.com/ml/libc-alpha/2005-02/msg00123.html - -This patch does not generate invalid csu/version-info.h which has -unterminating " line because some /bin/sh cannot parse correctly. The -previous discussion was: - - http://sources.redhat.com/ml/libc-alpha/2004-08/msg00129.html - http://sources.redhat.com/ml/libc-alpha/2004-08/msg00145.html - -This patch gets rid of all this issue because the conclusion of the -discussion was to use printf instead of echo. Roland, could you look -at it again? - -Regards, --- gotom - -2005-02-26 GOTO Masanori - - * csu/Makefile: Use printf instead of echo for some shells. - -Index: csu/Makefile -=================================================================== -RCS file: /cvs/glibc/libc/csu/Makefile,v -retrieving revision 1.75 -diff -u -p -r1.75 Makefile ---- glibc/csu/Makefile 3 Jan 2005 17:57:14 -0000 1.75 -+++ glibc.new/csu/Makefile 27 Feb 2005 01:17:49 -0000 -@@ -241,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx - esac; \ - files="$(all-Banner-files)"; \ - if test -n "$$files"; then \ -- echo "\"Available extensions:\\n\""; \ -+ printf '"Available extensions:\\n"\n'; \ - sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \ - -e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \ - fi) > $@T - diff --git a/patches/glibc/2.3.6/250-weakalias.patch b/patches/glibc/2.3.6/250-weakalias.patch new file mode 100644 index 00000000..722365f1 --- /dev/null +++ b/patches/glibc/2.3.6/250-weakalias.patch @@ -0,0 +1,45 @@ +This one was taken from debian. + +# DP: Description: Fix __bind redefinition problem +# DP: Related bugs: +# DP: Dpatch author: Phil Blundell +# DP: Patch author: Daniel Jacobowitz +# DP: Upstream status: In CVS +# DP: Status Details: +# DP: Date: 2005-12-25 + +Index: sysdeps/unix/sysv/linux/arm/socket.S +=================================================================== +RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v +retrieving revision 1.12 +retrieving revision 1.13 +diff -u -r1.12 -r1.13 +--- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12 ++++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13 +@@ -1,4 +1,6 @@ +-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc. ++/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 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 +@@ -32,7 +34,11 @@ + The .S files for the other calls just #define socket and #include this. */ + + #ifndef __socket ++#ifndef NO_WEAK_ALIAS + #define __socket P(__,socket) ++#else ++#define __socket socket ++#endif + #endif + + #define PUSHARGS_1 str a1, [sp, $-4]! +@@ -120,4 +126,6 @@ + + PSEUDO_END (__socket) + ++#ifndef NO_WEAK_ALIAS + weak_alias (__socket, socket) ++#endif diff --git a/patches/glibc/2.3.6/260-alpha-asm_page.patch b/patches/glibc/2.3.6/260-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.3.6/260-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.3.6/260-csu-Makefile.patch b/patches/glibc/2.3.6/260-csu-Makefile.patch new file mode 100644 index 00000000..509cbcc1 --- /dev/null +++ b/patches/glibc/2.3.6/260-csu-Makefile.patch @@ -0,0 +1,39 @@ +Use printf instead of echo for some shells. + +http://www.cygwin.com/ml/libc-alpha/2005-02/msg00123.html + +This patch does not generate invalid csu/version-info.h which has +unterminating " line because some /bin/sh cannot parse correctly. The +previous discussion was: + + http://sources.redhat.com/ml/libc-alpha/2004-08/msg00129.html + http://sources.redhat.com/ml/libc-alpha/2004-08/msg00145.html + +This patch gets rid of all this issue because the conclusion of the +discussion was to use printf instead of echo. Roland, could you look +at it again? + +Regards, +-- gotom + +2005-02-26 GOTO Masanori + + * csu/Makefile: Use printf instead of echo for some shells. + +Index: csu/Makefile +=================================================================== +RCS file: /cvs/glibc/libc/csu/Makefile,v +retrieving revision 1.75 +diff -u -p -r1.75 Makefile +--- glibc/csu/Makefile 3 Jan 2005 17:57:14 -0000 1.75 ++++ glibc.new/csu/Makefile 27 Feb 2005 01:17:49 -0000 +@@ -241,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx + esac; \ + files="$(all-Banner-files)"; \ + if test -n "$$files"; then \ +- echo "\"Available extensions:\\n\""; \ ++ printf '"Available extensions:\\n"\n'; \ + sed -e '/^#/d' -e 's/^[[:space:]]*/ /' \ + -e 's/^\(.*\)$$/\"\1\\n\"/' $$files; \ + fi) > $@T + diff --git a/patches/glibc/2.3.6/270-alpha-asm_elf.patch b/patches/glibc/2.3.6/270-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.3.6/270-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.3.6/270-alpha-asm_page.patch b/patches/glibc/2.3.6/270-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.3.6/270-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.3.6/280-alpha-asm_elf.patch b/patches/glibc/2.3.6/280-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.3.6/280-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.5.1/100-cygwin.patch b/patches/glibc/2.5.1/100-cygwin.patch new file mode 100644 index 00000000..3c0cd7de --- /dev/null +++ b/patches/glibc/2.5.1/100-cygwin.patch @@ -0,0 +1,187 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.x on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.5 also requires a patch, see +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch + +[ forward ported to glibc-2.3.5 by Petr Cvachoucek: + +Message-ID: <4282FCBA.3040000@unicontrols.cz> +Date: Thu, 12 May 2005 08:50:34 +0200 +From: Petr Cvachoucek +To: Dan Kegel +CC: crossgcc@sources.redhat.com +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin + +Hi Dan, +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. + +-- + Petr Cvachoucek + Unicontrols a.s. + http://www.unicontrols.cz +] + +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 +@@ -472,7 +472,7 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + endif +@@ -693,7 +693,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -749,14 +749,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + # The assembler can generate debug information too. +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 +@@ -417,7 +417,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -981,7 +981,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -989,7 +989,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 +@@ -13,7 +13,7 @@ + + ifneq (,$($(lib)-static-only-routines)) + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) + endif + endif + +@@ -29,7 +29,7 @@ + + # Add each flavor of library to the lists of things to build and install. + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ + $(patsubst %,%$o,$(filter-out \ + $($(lib)-shared-only-routines),\ + $(all-$(lib)-routines)))) +@@ -57,7 +57,7 @@ + + + # Use o-iterator.mk to generate a rule for each flavor of library. +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) + define o-iterator-doit + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%$o,\ +@@ -65,7 +65,7 @@ + $(all-$(lib)-routines))); \ + $$(build-extra-lib) + endef +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) + endif + +@@ -77,9 +77,9 @@ + $(build-extra-lib) + endif + +-ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ +- $(patsubst %,$(objpfx)%.oS,\ ++ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ ++ $(patsubst %,$(objpfx)%.oST,\ + $(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) + $(build-extra-lib) +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 +@@ -375,7 +375,7 @@ + + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ + $(objpfx)libpthread.so$(libpthread.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)pthread) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -383,7 +383,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ + ')' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 +@@ -10,4 +10,4 @@ + ASFLAGS-.op += -Wa,-Av9a + ASFLAGS-.og += -Wa,-Av9a + ASFLAGS-.ob += -Wa,-Av9a +-ASFLAGS-.oS += -Wa,-Av9a ++ASFLAGS-.oST += -Wa,-Av9a + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/110-configure-apple-as.patch b/patches/glibc/2.5.1/110-configure-apple-as.patch new file mode 100644 index 00000000..78a1324d --- /dev/null +++ b/patches/glibc/2.5.1/110-configure-apple-as.patch @@ -0,0 +1,25 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... + + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -4039,7 +4039,7 @@ + # Found it, now check the version. + echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/120-cygwin.patch b/patches/glibc/2.5.1/120-cygwin.patch deleted file mode 100644 index 3c0cd7de..00000000 --- a/patches/glibc/2.5.1/120-cygwin.patch +++ /dev/null @@ -1,187 +0,0 @@ -Fixes -elf/librtld.os: In function `process_envvars': : undefined reference to `__access' -... -when building glibc-2.3.x on cygwin - -Idea from -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch -Basically, make glibc use .oST as suffix for 'object static' -instead of .oS, since cygwin has trouble distinguishing .os from .oS -(Original patch had .on, but .oST is more mnemonic for 'object static') - -glibc-linuxthreads-2.3.5 also requires a patch, see -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch - -[ forward ported to glibc-2.3.5 by Petr Cvachoucek: - -Message-ID: <4282FCBA.3040000@unicontrols.cz> -Date: Thu, 12 May 2005 08:50:34 +0200 -From: Petr Cvachoucek -To: Dan Kegel -CC: crossgcc@sources.redhat.com -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin - -Hi Dan, -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. - --- - Petr Cvachoucek - Unicontrols a.s. - http://www.unicontrols.cz -] - -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 -@@ -472,7 +472,7 @@ - # run the linked programs. - link-libc = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - endif -@@ -693,7 +693,7 @@ - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) - # to pass different flags for each flavor. - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) --all-object-suffixes := .o .os .op .og .ob .oS -+all-object-suffixes := .o .os .op .og .ob .oST - object-suffixes := - CPPFLAGS-.o = $(pic-default) - CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -@@ -749,14 +749,14 @@ - - ifeq (yes,$(build-shared)) - # Build special library that contains the static-only routines for libc. --object-suffixes-for-libc += .oS -+object-suffixes-for-libc += .oST - - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 --libtype.oS = lib%_nonshared.a -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -+libtype.oST = lib%_nonshared.a - endif - - # The assembler can generate debug information too. -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 -@@ -417,7 +417,7 @@ - # Bounded pointer thunks are only built for *.ob - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) - --elide-routines.oS += $(filter-out $(static-only-routines),\ -+elide-routines.oST += $(filter-out $(static-only-routines),\ - $(routines) $(aux) $(sysdep_routines)) \ - $(elide-bp-thunks) - elide-routines.os += $(static-only-routines) $(elide-bp-thunks) -@@ -981,7 +981,7 @@ - install: $(inst_libdir)/libc.so - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)$(libc-name)) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -989,7 +989,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 -@@ -13,7 +13,7 @@ - - ifneq (,$($(lib)-static-only-routines)) - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) - endif - endif - -@@ -29,7 +29,7 @@ - - # Add each flavor of library to the lists of things to build and install. - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ - $(patsubst %,%$o,$(filter-out \ - $($(lib)-shared-only-routines),\ - $(all-$(lib)-routines)))) -@@ -57,7 +57,7 @@ - - - # Use o-iterator.mk to generate a rule for each flavor of library. --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) - define o-iterator-doit - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%$o,\ -@@ -65,7 +65,7 @@ - $(all-$(lib)-routines))); \ - $$(build-extra-lib) - endef --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) - endif - -@@ -77,9 +77,9 @@ - $(build-extra-lib) - endif - --ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ -- $(patsubst %,$(objpfx)%.oS,\ -+ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ -+ $(patsubst %,$(objpfx)%.oST,\ - $(filter $($(lib)-static-only-routines),\ - $(all-$(lib)-routines))) - $(build-extra-lib) -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 -@@ -375,7 +375,7 @@ - - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -383,7 +383,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 -@@ -10,4 +10,4 @@ - ASFLAGS-.op += -Wa,-Av9a - ASFLAGS-.og += -Wa,-Av9a - ASFLAGS-.ob += -Wa,-Av9a --ASFLAGS-.oS += -Wa,-Av9a -+ASFLAGS-.oST += -Wa,-Av9a - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/120-fix-pr631.patch b/patches/glibc/2.5.1/120-fix-pr631.patch new file mode 100644 index 00000000..13688dfc --- /dev/null +++ b/patches/glibc/2.5.1/120-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -510,7 +510,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -120,6 +120,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/130-i686-assembler.patch b/patches/glibc/2.5.1/130-i686-assembler.patch new file mode 100644 index 00000000..9904efbe --- /dev/null +++ b/patches/glibc/2.5.1/130-i686-assembler.patch @@ -0,0 +1,38 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + + + +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + diff --git a/patches/glibc/2.5.1/140-configure-apple-as.patch b/patches/glibc/2.5.1/140-configure-apple-as.patch deleted file mode 100644 index 78a1324d..00000000 --- a/patches/glibc/2.5.1/140-configure-apple-as.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html - -The following makes it possible to configure glibc-2.3.2 on Mac OS X, -where the assembler but doesn't understand the --version flag. - -Fixes the symptom -checking whether ld is GNU ld... no -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as -checking version of /usr/libexec/gcc/darwin/ppc/as... - - ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 -@@ -4039,7 +4039,7 @@ - # Found it, now check the version. - echo "$as_me:$LINENO: checking version of $AS" >&5 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[3-9]*) - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/140-i386-preferred-stack-boundary.patch b/patches/glibc/2.5.1/140-i386-preferred-stack-boundary.patch new file mode 100644 index 00000000..449821d8 --- /dev/null +++ b/patches/glibc/2.5.1/140-i386-preferred-stack-boundary.patch @@ -0,0 +1,18 @@ +(C) 2007 Yann E. MORIN +License: LGPL v2.1 + +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, +and 2 is not. + +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 +@@ -36,7 +36,7 @@ + ifeq ($(subdir),csu) + sysdep-CFLAGS += -mpreferred-stack-boundary=4 + else +-sysdep-CFLAGS += -mpreferred-stack-boundary=2 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4 + # Likewise, any function which calls user callbacks + uses-callbacks += -mpreferred-stack-boundary=4 + # Likewise, any stack alignment tests diff --git a/patches/glibc/2.5.1/150-alpha-asm_page.patch b/patches/glibc/2.5.1/150-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.5.1/150-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.5.1/150-fix-pr631.patch b/patches/glibc/2.5.1/150-fix-pr631.patch deleted file mode 100644 index 13688dfc..00000000 --- a/patches/glibc/2.5.1/150-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -510,7 +510,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -120,6 +120,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5.1/160-i686-assembler.patch b/patches/glibc/2.5.1/160-i686-assembler.patch deleted file mode 100644 index 9904efbe..00000000 --- a/patches/glibc/2.5.1/160-i686-assembler.patch +++ /dev/null @@ -1,38 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - - - -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h -=================================================================== ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c -=================================================================== ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - diff --git a/patches/glibc/2.5.1/160-use_short_for_fnstsw.patch b/patches/glibc/2.5.1/160-use_short_for_fnstsw.patch new file mode 100644 index 00000000..0e849fa1 --- /dev/null +++ b/patches/glibc/2.5.1/160-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.5.1/170-alpha-asm_elf.patch b/patches/glibc/2.5.1/170-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.5.1/170-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.5.1/170-i386-preferred-stack-boundary.patch b/patches/glibc/2.5.1/170-i386-preferred-stack-boundary.patch deleted file mode 100644 index 449821d8..00000000 --- a/patches/glibc/2.5.1/170-i386-preferred-stack-boundary.patch +++ /dev/null @@ -1,18 +0,0 @@ -(C) 2007 Yann E. MORIN -License: LGPL v2.1 - -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, -and 2 is not. - -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 -@@ -36,7 +36,7 @@ - ifeq ($(subdir),csu) - sysdep-CFLAGS += -mpreferred-stack-boundary=4 - else --sysdep-CFLAGS += -mpreferred-stack-boundary=2 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4 - # Likewise, any function which calls user callbacks - uses-callbacks += -mpreferred-stack-boundary=4 - # Likewise, any stack alignment tests diff --git a/patches/glibc/2.5.1/180-alpha-asm_page.patch b/patches/glibc/2.5.1/180-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.5.1/180-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.5.1/180-alpha-cfi.patch b/patches/glibc/2.5.1/180-alpha-cfi.patch new file mode 100644 index 00000000..c1efd771 --- /dev/null +++ b/patches/glibc/2.5.1/180-alpha-cfi.patch @@ -0,0 +1,25 @@ +--- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6 ++++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7 +@@ -55,6 +55,7 @@ + bne a3, SYSCALL_ERROR_LABEL; \ + __LABEL($pseudo_ret) \ + .subsection 2; \ ++ cfi_startproc; \ + __LABEL($pseudo_cancel) \ + subq sp, 64, sp; \ + cfi_def_cfa_offset(64); \ +@@ -90,12 +91,13 @@ + cfi_def_cfa_offset(0); \ + __LABEL($syscall_error) \ + SYSCALL_ERROR_HANDLER; \ ++ cfi_endproc; \ + .previous + + # undef PSEUDO_END + # define PSEUDO_END(sym) \ +- .subsection 2; \ + cfi_endproc; \ ++ .subsection 2; \ + .size sym, .-sym + + # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/2.5.1/190-alpha-sigsuspend.patch b/patches/glibc/2.5.1/190-alpha-sigsuspend.patch new file mode 100644 index 00000000..daf1a5d0 --- /dev/null +++ b/patches/glibc/2.5.1/190-alpha-sigsuspend.patch @@ -0,0 +1,24 @@ +--- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200 ++++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200 +@@ -31,3 +31,21 @@ + libc_hidden_def (__sigsuspend) + weak_alias (__sigsuspend, sigsuspend) + strong_alias (__sigsuspend, __libc_sigsuspend) ++ ++#ifndef NO_CANCELLATION ++ .globl __sigsuspend_nocancel; ++ .align 4; ++ .type __sigsuspend_nocancel, @function; ++ .usepv __sigsuspend_nocancel, std; ++ cfi_startproc; ++__LABEL(__sigsuspend_nocancel) ++ ldgp gp, 0(pv); ++ PSEUDO_PROF; ++ PSEUDO_PREPARE_ARGS ++ lda v0, SYS_ify(sigsuspend); ++ call_pal PAL_callsys; ++ bne a3, SYSCALL_ERROR_LABEL; ++ ret; ++ cfi_endproc; ++ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel ++#endif diff --git a/patches/glibc/2.5.1/190-use_short_for_fnstsw.patch b/patches/glibc/2.5.1/190-use_short_for_fnstsw.patch deleted file mode 100644 index 0e849fa1..00000000 --- a/patches/glibc/2.5.1/190-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.5.1/260-alpha-asm_elf.patch b/patches/glibc/2.5.1/260-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.5.1/260-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.5.1/270-alpha-cfi.patch b/patches/glibc/2.5.1/270-alpha-cfi.patch deleted file mode 100644 index c1efd771..00000000 --- a/patches/glibc/2.5.1/270-alpha-cfi.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6 -+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7 -@@ -55,6 +55,7 @@ - bne a3, SYSCALL_ERROR_LABEL; \ - __LABEL($pseudo_ret) \ - .subsection 2; \ -+ cfi_startproc; \ - __LABEL($pseudo_cancel) \ - subq sp, 64, sp; \ - cfi_def_cfa_offset(64); \ -@@ -90,12 +91,13 @@ - cfi_def_cfa_offset(0); \ - __LABEL($syscall_error) \ - SYSCALL_ERROR_HANDLER; \ -+ cfi_endproc; \ - .previous - - # undef PSEUDO_END - # define PSEUDO_END(sym) \ -- .subsection 2; \ - cfi_endproc; \ -+ .subsection 2; \ - .size sym, .-sym - - # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/2.5.1/280-alpha-sigsuspend.patch b/patches/glibc/2.5.1/280-alpha-sigsuspend.patch deleted file mode 100644 index daf1a5d0..00000000 --- a/patches/glibc/2.5.1/280-alpha-sigsuspend.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200 -+++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200 -@@ -31,3 +31,21 @@ - libc_hidden_def (__sigsuspend) - weak_alias (__sigsuspend, sigsuspend) - strong_alias (__sigsuspend, __libc_sigsuspend) -+ -+#ifndef NO_CANCELLATION -+ .globl __sigsuspend_nocancel; -+ .align 4; -+ .type __sigsuspend_nocancel, @function; -+ .usepv __sigsuspend_nocancel, std; -+ cfi_startproc; -+__LABEL(__sigsuspend_nocancel) -+ ldgp gp, 0(pv); -+ PSEUDO_PROF; -+ PSEUDO_PREPARE_ARGS -+ lda v0, SYS_ify(sigsuspend); -+ call_pal PAL_callsys; -+ bne a3, SYSCALL_ERROR_LABEL; -+ ret; -+ cfi_endproc; -+ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel -+#endif diff --git a/patches/glibc/2.5/100-cygwin.patch b/patches/glibc/2.5/100-cygwin.patch new file mode 100644 index 00000000..3c0cd7de --- /dev/null +++ b/patches/glibc/2.5/100-cygwin.patch @@ -0,0 +1,187 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.x on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.5 also requires a patch, see +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch + +[ forward ported to glibc-2.3.5 by Petr Cvachoucek: + +Message-ID: <4282FCBA.3040000@unicontrols.cz> +Date: Thu, 12 May 2005 08:50:34 +0200 +From: Petr Cvachoucek +To: Dan Kegel +CC: crossgcc@sources.redhat.com +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin + +Hi Dan, +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. + +-- + Petr Cvachoucek + Unicontrols a.s. + http://www.unicontrols.cz +] + +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 +@@ -472,7 +472,7 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + endif +@@ -693,7 +693,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -749,14 +749,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + # The assembler can generate debug information too. +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 +@@ -417,7 +417,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -981,7 +981,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -989,7 +989,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 +@@ -13,7 +13,7 @@ + + ifneq (,$($(lib)-static-only-routines)) + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) + endif + endif + +@@ -29,7 +29,7 @@ + + # Add each flavor of library to the lists of things to build and install. + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ + $(patsubst %,%$o,$(filter-out \ + $($(lib)-shared-only-routines),\ + $(all-$(lib)-routines)))) +@@ -57,7 +57,7 @@ + + + # Use o-iterator.mk to generate a rule for each flavor of library. +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) + define o-iterator-doit + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%$o,\ +@@ -65,7 +65,7 @@ + $(all-$(lib)-routines))); \ + $$(build-extra-lib) + endef +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) + endif + +@@ -77,9 +77,9 @@ + $(build-extra-lib) + endif + +-ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ +- $(patsubst %,$(objpfx)%.oS,\ ++ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ ++ $(patsubst %,$(objpfx)%.oST,\ + $(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) + $(build-extra-lib) +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 +@@ -375,7 +375,7 @@ + + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ + $(objpfx)libpthread.so$(libpthread.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)pthread) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -383,7 +383,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ + ')' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 +@@ -10,4 +10,4 @@ + ASFLAGS-.op += -Wa,-Av9a + ASFLAGS-.og += -Wa,-Av9a + ASFLAGS-.ob += -Wa,-Av9a +-ASFLAGS-.oS += -Wa,-Av9a ++ASFLAGS-.oST += -Wa,-Av9a + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/110-configure-apple-as.patch b/patches/glibc/2.5/110-configure-apple-as.patch new file mode 100644 index 00000000..78a1324d --- /dev/null +++ b/patches/glibc/2.5/110-configure-apple-as.patch @@ -0,0 +1,25 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... + + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -4039,7 +4039,7 @@ + # Found it, now check the version. + echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/120-cygwin.patch b/patches/glibc/2.5/120-cygwin.patch deleted file mode 100644 index 3c0cd7de..00000000 --- a/patches/glibc/2.5/120-cygwin.patch +++ /dev/null @@ -1,187 +0,0 @@ -Fixes -elf/librtld.os: In function `process_envvars': : undefined reference to `__access' -... -when building glibc-2.3.x on cygwin - -Idea from -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch -Basically, make glibc use .oST as suffix for 'object static' -instead of .oS, since cygwin has trouble distinguishing .os from .oS -(Original patch had .on, but .oST is more mnemonic for 'object static') - -glibc-linuxthreads-2.3.5 also requires a patch, see -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch - -[ forward ported to glibc-2.3.5 by Petr Cvachoucek: - -Message-ID: <4282FCBA.3040000@unicontrols.cz> -Date: Thu, 12 May 2005 08:50:34 +0200 -From: Petr Cvachoucek -To: Dan Kegel -CC: crossgcc@sources.redhat.com -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin - -Hi Dan, -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. - --- - Petr Cvachoucek - Unicontrols a.s. - http://www.unicontrols.cz -] - -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 -@@ -472,7 +472,7 @@ - # run the linked programs. - link-libc = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - endif -@@ -693,7 +693,7 @@ - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) - # to pass different flags for each flavor. - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) --all-object-suffixes := .o .os .op .og .ob .oS -+all-object-suffixes := .o .os .op .og .ob .oST - object-suffixes := - CPPFLAGS-.o = $(pic-default) - CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -@@ -749,14 +749,14 @@ - - ifeq (yes,$(build-shared)) - # Build special library that contains the static-only routines for libc. --object-suffixes-for-libc += .oS -+object-suffixes-for-libc += .oST - - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 --libtype.oS = lib%_nonshared.a -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -+libtype.oST = lib%_nonshared.a - endif - - # The assembler can generate debug information too. -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 -@@ -417,7 +417,7 @@ - # Bounded pointer thunks are only built for *.ob - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) - --elide-routines.oS += $(filter-out $(static-only-routines),\ -+elide-routines.oST += $(filter-out $(static-only-routines),\ - $(routines) $(aux) $(sysdep_routines)) \ - $(elide-bp-thunks) - elide-routines.os += $(static-only-routines) $(elide-bp-thunks) -@@ -981,7 +981,7 @@ - install: $(inst_libdir)/libc.so - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)$(libc-name)) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -989,7 +989,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 -@@ -13,7 +13,7 @@ - - ifneq (,$($(lib)-static-only-routines)) - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) - endif - endif - -@@ -29,7 +29,7 @@ - - # Add each flavor of library to the lists of things to build and install. - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ - $(patsubst %,%$o,$(filter-out \ - $($(lib)-shared-only-routines),\ - $(all-$(lib)-routines)))) -@@ -57,7 +57,7 @@ - - - # Use o-iterator.mk to generate a rule for each flavor of library. --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) - define o-iterator-doit - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%$o,\ -@@ -65,7 +65,7 @@ - $(all-$(lib)-routines))); \ - $$(build-extra-lib) - endef --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) - endif - -@@ -77,9 +77,9 @@ - $(build-extra-lib) - endif - --ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ -- $(patsubst %,$(objpfx)%.oS,\ -+ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ -+ $(patsubst %,$(objpfx)%.oST,\ - $(filter $($(lib)-static-only-routines),\ - $(all-$(lib)-routines))) - $(build-extra-lib) -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 -@@ -375,7 +375,7 @@ - - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -383,7 +383,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 -@@ -10,4 +10,4 @@ - ASFLAGS-.op += -Wa,-Av9a - ASFLAGS-.og += -Wa,-Av9a - ASFLAGS-.ob += -Wa,-Av9a --ASFLAGS-.oS += -Wa,-Av9a -+ASFLAGS-.oST += -Wa,-Av9a - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/120-fix-pr631.patch b/patches/glibc/2.5/120-fix-pr631.patch new file mode 100644 index 00000000..13688dfc --- /dev/null +++ b/patches/glibc/2.5/120-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -510,7 +510,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -120,6 +120,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/130-i686-assembler.patch b/patches/glibc/2.5/130-i686-assembler.patch new file mode 100644 index 00000000..9904efbe --- /dev/null +++ b/patches/glibc/2.5/130-i686-assembler.patch @@ -0,0 +1,38 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + + + +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + diff --git a/patches/glibc/2.5/140-configure-apple-as.patch b/patches/glibc/2.5/140-configure-apple-as.patch deleted file mode 100644 index 78a1324d..00000000 --- a/patches/glibc/2.5/140-configure-apple-as.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html - -The following makes it possible to configure glibc-2.3.2 on Mac OS X, -where the assembler but doesn't understand the --version flag. - -Fixes the symptom -checking whether ld is GNU ld... no -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as -checking version of /usr/libexec/gcc/darwin/ppc/as... - - ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 -@@ -4039,7 +4039,7 @@ - # Found it, now check the version. - echo "$as_me:$LINENO: checking version of $AS" >&5 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[3-9]*) - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/140-i386-preferred-stack-boundary.patch b/patches/glibc/2.5/140-i386-preferred-stack-boundary.patch new file mode 100644 index 00000000..449821d8 --- /dev/null +++ b/patches/glibc/2.5/140-i386-preferred-stack-boundary.patch @@ -0,0 +1,18 @@ +(C) 2007 Yann E. MORIN +License: LGPL v2.1 + +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, +and 2 is not. + +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 +@@ -36,7 +36,7 @@ + ifeq ($(subdir),csu) + sysdep-CFLAGS += -mpreferred-stack-boundary=4 + else +-sysdep-CFLAGS += -mpreferred-stack-boundary=2 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4 + # Likewise, any function which calls user callbacks + uses-callbacks += -mpreferred-stack-boundary=4 + # Likewise, any stack alignment tests diff --git a/patches/glibc/2.5/150-alpha-asm_page.patch b/patches/glibc/2.5/150-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.5/150-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.5/150-fix-pr631.patch b/patches/glibc/2.5/150-fix-pr631.patch deleted file mode 100644 index 13688dfc..00000000 --- a/patches/glibc/2.5/150-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -510,7 +510,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -120,6 +120,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.5/160-i686-assembler.patch b/patches/glibc/2.5/160-i686-assembler.patch deleted file mode 100644 index 9904efbe..00000000 --- a/patches/glibc/2.5/160-i686-assembler.patch +++ /dev/null @@ -1,38 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - - - -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h -=================================================================== ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c -=================================================================== ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - diff --git a/patches/glibc/2.5/160-use_short_for_fnstsw.patch b/patches/glibc/2.5/160-use_short_for_fnstsw.patch new file mode 100644 index 00000000..0e849fa1 --- /dev/null +++ b/patches/glibc/2.5/160-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.5/170-alpha-asm_elf.patch b/patches/glibc/2.5/170-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.5/170-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.5/170-i386-preferred-stack-boundary.patch b/patches/glibc/2.5/170-i386-preferred-stack-boundary.patch deleted file mode 100644 index 449821d8..00000000 --- a/patches/glibc/2.5/170-i386-preferred-stack-boundary.patch +++ /dev/null @@ -1,18 +0,0 @@ -(C) 2007 Yann E. MORIN -License: LGPL v2.1 - -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, -and 2 is not. - -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 -@@ -36,7 +36,7 @@ - ifeq ($(subdir),csu) - sysdep-CFLAGS += -mpreferred-stack-boundary=4 - else --sysdep-CFLAGS += -mpreferred-stack-boundary=2 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4 - # Likewise, any function which calls user callbacks - uses-callbacks += -mpreferred-stack-boundary=4 - # Likewise, any stack alignment tests diff --git a/patches/glibc/2.5/180-alpha-asm_page.patch b/patches/glibc/2.5/180-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.5/180-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.5/180-alpha-cfi.patch b/patches/glibc/2.5/180-alpha-cfi.patch new file mode 100644 index 00000000..c1efd771 --- /dev/null +++ b/patches/glibc/2.5/180-alpha-cfi.patch @@ -0,0 +1,25 @@ +--- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6 ++++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7 +@@ -55,6 +55,7 @@ + bne a3, SYSCALL_ERROR_LABEL; \ + __LABEL($pseudo_ret) \ + .subsection 2; \ ++ cfi_startproc; \ + __LABEL($pseudo_cancel) \ + subq sp, 64, sp; \ + cfi_def_cfa_offset(64); \ +@@ -90,12 +91,13 @@ + cfi_def_cfa_offset(0); \ + __LABEL($syscall_error) \ + SYSCALL_ERROR_HANDLER; \ ++ cfi_endproc; \ + .previous + + # undef PSEUDO_END + # define PSEUDO_END(sym) \ +- .subsection 2; \ + cfi_endproc; \ ++ .subsection 2; \ + .size sym, .-sym + + # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/2.5/190-alpha-sigsuspend.patch b/patches/glibc/2.5/190-alpha-sigsuspend.patch new file mode 100644 index 00000000..daf1a5d0 --- /dev/null +++ b/patches/glibc/2.5/190-alpha-sigsuspend.patch @@ -0,0 +1,24 @@ +--- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200 ++++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200 +@@ -31,3 +31,21 @@ + libc_hidden_def (__sigsuspend) + weak_alias (__sigsuspend, sigsuspend) + strong_alias (__sigsuspend, __libc_sigsuspend) ++ ++#ifndef NO_CANCELLATION ++ .globl __sigsuspend_nocancel; ++ .align 4; ++ .type __sigsuspend_nocancel, @function; ++ .usepv __sigsuspend_nocancel, std; ++ cfi_startproc; ++__LABEL(__sigsuspend_nocancel) ++ ldgp gp, 0(pv); ++ PSEUDO_PROF; ++ PSEUDO_PREPARE_ARGS ++ lda v0, SYS_ify(sigsuspend); ++ call_pal PAL_callsys; ++ bne a3, SYSCALL_ERROR_LABEL; ++ ret; ++ cfi_endproc; ++ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel ++#endif diff --git a/patches/glibc/2.5/190-use_short_for_fnstsw.patch b/patches/glibc/2.5/190-use_short_for_fnstsw.patch deleted file mode 100644 index 0e849fa1..00000000 --- a/patches/glibc/2.5/190-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.5/260-alpha-asm_elf.patch b/patches/glibc/2.5/260-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.5/260-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.5/270-alpha-cfi.patch b/patches/glibc/2.5/270-alpha-cfi.patch deleted file mode 100644 index c1efd771..00000000 --- a/patches/glibc/2.5/270-alpha-cfi.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2006/10/29 21:48:06 1.6 -+++ libc/nptl/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2007/03/13 21:28:03 1.7 -@@ -55,6 +55,7 @@ - bne a3, SYSCALL_ERROR_LABEL; \ - __LABEL($pseudo_ret) \ - .subsection 2; \ -+ cfi_startproc; \ - __LABEL($pseudo_cancel) \ - subq sp, 64, sp; \ - cfi_def_cfa_offset(64); \ -@@ -90,12 +91,13 @@ - cfi_def_cfa_offset(0); \ - __LABEL($syscall_error) \ - SYSCALL_ERROR_HANDLER; \ -+ cfi_endproc; \ - .previous - - # undef PSEUDO_END - # define PSEUDO_END(sym) \ -- .subsection 2; \ - cfi_endproc; \ -+ .subsection 2; \ - .size sym, .-sym - - # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/2.5/280-alpha-sigsuspend.patch b/patches/glibc/2.5/280-alpha-sigsuspend.patch deleted file mode 100644 index daf1a5d0..00000000 --- a/patches/glibc/2.5/280-alpha-sigsuspend.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S.orig 2006-10-22 22:17:01.000000000 +0200 -+++ glibc-2.5/sysdeps/unix/sysv/linux/alpha/sigsuspend.S 2006-10-22 22:18:05.000000000 +0200 -@@ -31,3 +31,21 @@ - libc_hidden_def (__sigsuspend) - weak_alias (__sigsuspend, sigsuspend) - strong_alias (__sigsuspend, __libc_sigsuspend) -+ -+#ifndef NO_CANCELLATION -+ .globl __sigsuspend_nocancel; -+ .align 4; -+ .type __sigsuspend_nocancel, @function; -+ .usepv __sigsuspend_nocancel, std; -+ cfi_startproc; -+__LABEL(__sigsuspend_nocancel) -+ ldgp gp, 0(pv); -+ PSEUDO_PROF; -+ PSEUDO_PREPARE_ARGS -+ lda v0, SYS_ify(sigsuspend); -+ call_pal PAL_callsys; -+ bne a3, SYSCALL_ERROR_LABEL; -+ ret; -+ cfi_endproc; -+ .size __sigsuspend_nocancel, .-__sigsuspend_nocancel -+#endif diff --git a/patches/glibc/2.6.1/100-cygwin.patch b/patches/glibc/2.6.1/100-cygwin.patch new file mode 100644 index 00000000..3c0cd7de --- /dev/null +++ b/patches/glibc/2.6.1/100-cygwin.patch @@ -0,0 +1,187 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.x on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.5 also requires a patch, see +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch + +[ forward ported to glibc-2.3.5 by Petr Cvachoucek: + +Message-ID: <4282FCBA.3040000@unicontrols.cz> +Date: Thu, 12 May 2005 08:50:34 +0200 +From: Petr Cvachoucek +To: Dan Kegel +CC: crossgcc@sources.redhat.com +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin + +Hi Dan, +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. + +-- + Petr Cvachoucek + Unicontrols a.s. + http://www.unicontrols.cz +] + +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 +@@ -472,7 +472,7 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + endif +@@ -693,7 +693,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -749,14 +749,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + # The assembler can generate debug information too. +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 +@@ -417,7 +417,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -981,7 +981,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -989,7 +989,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 +@@ -13,7 +13,7 @@ + + ifneq (,$($(lib)-static-only-routines)) + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) + endif + endif + +@@ -29,7 +29,7 @@ + + # Add each flavor of library to the lists of things to build and install. + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ + $(patsubst %,%$o,$(filter-out \ + $($(lib)-shared-only-routines),\ + $(all-$(lib)-routines)))) +@@ -57,7 +57,7 @@ + + + # Use o-iterator.mk to generate a rule for each flavor of library. +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) + define o-iterator-doit + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%$o,\ +@@ -65,7 +65,7 @@ + $(all-$(lib)-routines))); \ + $$(build-extra-lib) + endef +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) + endif + +@@ -77,9 +77,9 @@ + $(build-extra-lib) + endif + +-ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ +- $(patsubst %,$(objpfx)%.oS,\ ++ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ ++ $(patsubst %,$(objpfx)%.oST,\ + $(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) + $(build-extra-lib) +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 +@@ -375,7 +375,7 @@ + + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ + $(objpfx)libpthread.so$(libpthread.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)pthread) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -383,7 +383,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ + ')' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 +@@ -10,4 +10,4 @@ + ASFLAGS-.op += -Wa,-Av9a + ASFLAGS-.og += -Wa,-Av9a + ASFLAGS-.ob += -Wa,-Av9a +-ASFLAGS-.oS += -Wa,-Av9a ++ASFLAGS-.oST += -Wa,-Av9a + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/110-configure-apple-as.patch b/patches/glibc/2.6.1/110-configure-apple-as.patch new file mode 100644 index 00000000..78a1324d --- /dev/null +++ b/patches/glibc/2.6.1/110-configure-apple-as.patch @@ -0,0 +1,25 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... + + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -4039,7 +4039,7 @@ + # Found it, now check the version. + echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/120-cygwin.patch b/patches/glibc/2.6.1/120-cygwin.patch deleted file mode 100644 index 3c0cd7de..00000000 --- a/patches/glibc/2.6.1/120-cygwin.patch +++ /dev/null @@ -1,187 +0,0 @@ -Fixes -elf/librtld.os: In function `process_envvars': : undefined reference to `__access' -... -when building glibc-2.3.x on cygwin - -Idea from -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch -Basically, make glibc use .oST as suffix for 'object static' -instead of .oS, since cygwin has trouble distinguishing .os from .oS -(Original patch had .on, but .oST is more mnemonic for 'object static') - -glibc-linuxthreads-2.3.5 also requires a patch, see -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch - -[ forward ported to glibc-2.3.5 by Petr Cvachoucek: - -Message-ID: <4282FCBA.3040000@unicontrols.cz> -Date: Thu, 12 May 2005 08:50:34 +0200 -From: Petr Cvachoucek -To: Dan Kegel -CC: crossgcc@sources.redhat.com -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin - -Hi Dan, -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. - --- - Petr Cvachoucek - Unicontrols a.s. - http://www.unicontrols.cz -] - -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 -@@ -472,7 +472,7 @@ - # run the linked programs. - link-libc = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - endif -@@ -693,7 +693,7 @@ - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) - # to pass different flags for each flavor. - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) --all-object-suffixes := .o .os .op .og .ob .oS -+all-object-suffixes := .o .os .op .og .ob .oST - object-suffixes := - CPPFLAGS-.o = $(pic-default) - CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -@@ -749,14 +749,14 @@ - - ifeq (yes,$(build-shared)) - # Build special library that contains the static-only routines for libc. --object-suffixes-for-libc += .oS -+object-suffixes-for-libc += .oST - - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 --libtype.oS = lib%_nonshared.a -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -+libtype.oST = lib%_nonshared.a - endif - - # The assembler can generate debug information too. -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 -@@ -417,7 +417,7 @@ - # Bounded pointer thunks are only built for *.ob - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) - --elide-routines.oS += $(filter-out $(static-only-routines),\ -+elide-routines.oST += $(filter-out $(static-only-routines),\ - $(routines) $(aux) $(sysdep_routines)) \ - $(elide-bp-thunks) - elide-routines.os += $(static-only-routines) $(elide-bp-thunks) -@@ -981,7 +981,7 @@ - install: $(inst_libdir)/libc.so - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)$(libc-name)) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -989,7 +989,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 -@@ -13,7 +13,7 @@ - - ifneq (,$($(lib)-static-only-routines)) - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) - endif - endif - -@@ -29,7 +29,7 @@ - - # Add each flavor of library to the lists of things to build and install. - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ - $(patsubst %,%$o,$(filter-out \ - $($(lib)-shared-only-routines),\ - $(all-$(lib)-routines)))) -@@ -57,7 +57,7 @@ - - - # Use o-iterator.mk to generate a rule for each flavor of library. --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) - define o-iterator-doit - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%$o,\ -@@ -65,7 +65,7 @@ - $(all-$(lib)-routines))); \ - $$(build-extra-lib) - endef --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) - endif - -@@ -77,9 +77,9 @@ - $(build-extra-lib) - endif - --ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ -- $(patsubst %,$(objpfx)%.oS,\ -+ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ -+ $(patsubst %,$(objpfx)%.oST,\ - $(filter $($(lib)-static-only-routines),\ - $(all-$(lib)-routines))) - $(build-extra-lib) -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 -@@ -375,7 +375,7 @@ - - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -383,7 +383,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 -@@ -10,4 +10,4 @@ - ASFLAGS-.op += -Wa,-Av9a - ASFLAGS-.og += -Wa,-Av9a - ASFLAGS-.ob += -Wa,-Av9a --ASFLAGS-.oS += -Wa,-Av9a -+ASFLAGS-.oST += -Wa,-Av9a - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/120-fix-pr631.patch b/patches/glibc/2.6.1/120-fix-pr631.patch new file mode 100644 index 00000000..13688dfc --- /dev/null +++ b/patches/glibc/2.6.1/120-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -510,7 +510,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -120,6 +120,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/130-i686-assembler.patch b/patches/glibc/2.6.1/130-i686-assembler.patch new file mode 100644 index 00000000..9904efbe --- /dev/null +++ b/patches/glibc/2.6.1/130-i686-assembler.patch @@ -0,0 +1,38 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + + + +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + diff --git a/patches/glibc/2.6.1/140-configure-apple-as.patch b/patches/glibc/2.6.1/140-configure-apple-as.patch deleted file mode 100644 index 78a1324d..00000000 --- a/patches/glibc/2.6.1/140-configure-apple-as.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html - -The following makes it possible to configure glibc-2.3.2 on Mac OS X, -where the assembler but doesn't understand the --version flag. - -Fixes the symptom -checking whether ld is GNU ld... no -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as -checking version of /usr/libexec/gcc/darwin/ppc/as... - - ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 -@@ -4039,7 +4039,7 @@ - # Found it, now check the version. - echo "$as_me:$LINENO: checking version of $AS" >&5 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[3-9]*) - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/140-i386-preferred-stack-boundary.patch b/patches/glibc/2.6.1/140-i386-preferred-stack-boundary.patch new file mode 100644 index 00000000..449821d8 --- /dev/null +++ b/patches/glibc/2.6.1/140-i386-preferred-stack-boundary.patch @@ -0,0 +1,18 @@ +(C) 2007 Yann E. MORIN +License: LGPL v2.1 + +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, +and 2 is not. + +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 +@@ -36,7 +36,7 @@ + ifeq ($(subdir),csu) + sysdep-CFLAGS += -mpreferred-stack-boundary=4 + else +-sysdep-CFLAGS += -mpreferred-stack-boundary=2 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4 + # Likewise, any function which calls user callbacks + uses-callbacks += -mpreferred-stack-boundary=4 + # Likewise, any stack alignment tests diff --git a/patches/glibc/2.6.1/150-alpha-asm_page.patch b/patches/glibc/2.6.1/150-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.6.1/150-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.6.1/150-fix-pr631.patch b/patches/glibc/2.6.1/150-fix-pr631.patch deleted file mode 100644 index 13688dfc..00000000 --- a/patches/glibc/2.6.1/150-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -510,7 +510,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -120,6 +120,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6.1/160-i686-assembler.patch b/patches/glibc/2.6.1/160-i686-assembler.patch deleted file mode 100644 index 9904efbe..00000000 --- a/patches/glibc/2.6.1/160-i686-assembler.patch +++ /dev/null @@ -1,38 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - - - -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h -=================================================================== ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c -=================================================================== ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - diff --git a/patches/glibc/2.6.1/160-use_short_for_fnstsw.patch b/patches/glibc/2.6.1/160-use_short_for_fnstsw.patch new file mode 100644 index 00000000..0e849fa1 --- /dev/null +++ b/patches/glibc/2.6.1/160-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.6.1/170-alpha-asm_elf.patch b/patches/glibc/2.6.1/170-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.6.1/170-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.6.1/170-i386-preferred-stack-boundary.patch b/patches/glibc/2.6.1/170-i386-preferred-stack-boundary.patch deleted file mode 100644 index 449821d8..00000000 --- a/patches/glibc/2.6.1/170-i386-preferred-stack-boundary.patch +++ /dev/null @@ -1,18 +0,0 @@ -(C) 2007 Yann E. MORIN -License: LGPL v2.1 - -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, -and 2 is not. - -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 -@@ -36,7 +36,7 @@ - ifeq ($(subdir),csu) - sysdep-CFLAGS += -mpreferred-stack-boundary=4 - else --sysdep-CFLAGS += -mpreferred-stack-boundary=2 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4 - # Likewise, any function which calls user callbacks - uses-callbacks += -mpreferred-stack-boundary=4 - # Likewise, any stack alignment tests diff --git a/patches/glibc/2.6.1/180-alpha-asm_page.patch b/patches/glibc/2.6.1/180-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.6.1/180-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.6.1/190-use_short_for_fnstsw.patch b/patches/glibc/2.6.1/190-use_short_for_fnstsw.patch deleted file mode 100644 index 0e849fa1..00000000 --- a/patches/glibc/2.6.1/190-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.6.1/200-alpha-asm_elf.patch b/patches/glibc/2.6.1/200-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.6.1/200-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.6/100-cygwin.patch b/patches/glibc/2.6/100-cygwin.patch new file mode 100644 index 00000000..3c0cd7de --- /dev/null +++ b/patches/glibc/2.6/100-cygwin.patch @@ -0,0 +1,187 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.x on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.5 also requires a patch, see +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch + +[ forward ported to glibc-2.3.5 by Petr Cvachoucek: + +Message-ID: <4282FCBA.3040000@unicontrols.cz> +Date: Thu, 12 May 2005 08:50:34 +0200 +From: Petr Cvachoucek +To: Dan Kegel +CC: crossgcc@sources.redhat.com +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin + +Hi Dan, +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. + +-- + Petr Cvachoucek + Unicontrols a.s. + http://www.unicontrols.cz +] + +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 +@@ -472,7 +472,7 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + endif +@@ -693,7 +693,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -749,14 +749,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + # The assembler can generate debug information too. +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 +@@ -417,7 +417,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -981,7 +981,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -989,7 +989,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 +@@ -13,7 +13,7 @@ + + ifneq (,$($(lib)-static-only-routines)) + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) + endif + endif + +@@ -29,7 +29,7 @@ + + # Add each flavor of library to the lists of things to build and install. + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ + $(patsubst %,%$o,$(filter-out \ + $($(lib)-shared-only-routines),\ + $(all-$(lib)-routines)))) +@@ -57,7 +57,7 @@ + + + # Use o-iterator.mk to generate a rule for each flavor of library. +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) + define o-iterator-doit + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%$o,\ +@@ -65,7 +65,7 @@ + $(all-$(lib)-routines))); \ + $$(build-extra-lib) + endef +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) + endif + +@@ -77,9 +77,9 @@ + $(build-extra-lib) + endif + +-ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ +- $(patsubst %,$(objpfx)%.oS,\ ++ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ ++ $(patsubst %,$(objpfx)%.oST,\ + $(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) + $(build-extra-lib) +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 +@@ -375,7 +375,7 @@ + + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ + $(objpfx)libpthread.so$(libpthread.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)pthread) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -383,7 +383,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ + ')' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 +@@ -10,4 +10,4 @@ + ASFLAGS-.op += -Wa,-Av9a + ASFLAGS-.og += -Wa,-Av9a + ASFLAGS-.ob += -Wa,-Av9a +-ASFLAGS-.oS += -Wa,-Av9a ++ASFLAGS-.oST += -Wa,-Av9a + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/110-configure-apple-as.patch b/patches/glibc/2.6/110-configure-apple-as.patch new file mode 100644 index 00000000..78a1324d --- /dev/null +++ b/patches/glibc/2.6/110-configure-apple-as.patch @@ -0,0 +1,25 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... + + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -4039,7 +4039,7 @@ + # Found it, now check the version. + echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/120-cygwin.patch b/patches/glibc/2.6/120-cygwin.patch deleted file mode 100644 index 3c0cd7de..00000000 --- a/patches/glibc/2.6/120-cygwin.patch +++ /dev/null @@ -1,187 +0,0 @@ -Fixes -elf/librtld.os: In function `process_envvars': : undefined reference to `__access' -... -when building glibc-2.3.x on cygwin - -Idea from -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch -Basically, make glibc use .oST as suffix for 'object static' -instead of .oS, since cygwin has trouble distinguishing .os from .oS -(Original patch had .on, but .oST is more mnemonic for 'object static') - -glibc-linuxthreads-2.3.5 also requires a patch, see -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch - -[ forward ported to glibc-2.3.5 by Petr Cvachoucek: - -Message-ID: <4282FCBA.3040000@unicontrols.cz> -Date: Thu, 12 May 2005 08:50:34 +0200 -From: Petr Cvachoucek -To: Dan Kegel -CC: crossgcc@sources.redhat.com -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin - -Hi Dan, -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. - --- - Petr Cvachoucek - Unicontrols a.s. - http://www.unicontrols.cz -] - -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 -@@ -472,7 +472,7 @@ - # run the linked programs. - link-libc = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - endif -@@ -693,7 +693,7 @@ - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) - # to pass different flags for each flavor. - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) --all-object-suffixes := .o .os .op .og .ob .oS -+all-object-suffixes := .o .os .op .og .ob .oST - object-suffixes := - CPPFLAGS-.o = $(pic-default) - CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -@@ -749,14 +749,14 @@ - - ifeq (yes,$(build-shared)) - # Build special library that contains the static-only routines for libc. --object-suffixes-for-libc += .oS -+object-suffixes-for-libc += .oST - - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 --libtype.oS = lib%_nonshared.a -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -+libtype.oST = lib%_nonshared.a - endif - - # The assembler can generate debug information too. -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 -@@ -417,7 +417,7 @@ - # Bounded pointer thunks are only built for *.ob - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) - --elide-routines.oS += $(filter-out $(static-only-routines),\ -+elide-routines.oST += $(filter-out $(static-only-routines),\ - $(routines) $(aux) $(sysdep_routines)) \ - $(elide-bp-thunks) - elide-routines.os += $(static-only-routines) $(elide-bp-thunks) -@@ -981,7 +981,7 @@ - install: $(inst_libdir)/libc.so - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)$(libc-name)) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -989,7 +989,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 -@@ -13,7 +13,7 @@ - - ifneq (,$($(lib)-static-only-routines)) - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) - endif - endif - -@@ -29,7 +29,7 @@ - - # Add each flavor of library to the lists of things to build and install. - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ - $(patsubst %,%$o,$(filter-out \ - $($(lib)-shared-only-routines),\ - $(all-$(lib)-routines)))) -@@ -57,7 +57,7 @@ - - - # Use o-iterator.mk to generate a rule for each flavor of library. --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) - define o-iterator-doit - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%$o,\ -@@ -65,7 +65,7 @@ - $(all-$(lib)-routines))); \ - $$(build-extra-lib) - endef --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) - endif - -@@ -77,9 +77,9 @@ - $(build-extra-lib) - endif - --ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ -- $(patsubst %,$(objpfx)%.oS,\ -+ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ -+ $(patsubst %,$(objpfx)%.oST,\ - $(filter $($(lib)-static-only-routines),\ - $(all-$(lib)-routines))) - $(build-extra-lib) -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 -@@ -375,7 +375,7 @@ - - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -383,7 +383,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 -@@ -10,4 +10,4 @@ - ASFLAGS-.op += -Wa,-Av9a - ASFLAGS-.og += -Wa,-Av9a - ASFLAGS-.ob += -Wa,-Av9a --ASFLAGS-.oS += -Wa,-Av9a -+ASFLAGS-.oST += -Wa,-Av9a - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/120-fix-pr631.patch b/patches/glibc/2.6/120-fix-pr631.patch new file mode 100644 index 00000000..13688dfc --- /dev/null +++ b/patches/glibc/2.6/120-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -510,7 +510,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -120,6 +120,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln + +Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/130-i686-assembler.patch b/patches/glibc/2.6/130-i686-assembler.patch new file mode 100644 index 00000000..9904efbe --- /dev/null +++ b/patches/glibc/2.6/130-i686-assembler.patch @@ -0,0 +1,38 @@ +2007-02-15 Khem Raj + + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. + * nptl/sysdeps/pthread/pt-initfini.c: Ditto. + + + +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + diff --git a/patches/glibc/2.6/140-configure-apple-as.patch b/patches/glibc/2.6/140-configure-apple-as.patch deleted file mode 100644 index 78a1324d..00000000 --- a/patches/glibc/2.6/140-configure-apple-as.patch +++ /dev/null @@ -1,25 +0,0 @@ -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html - -The following makes it possible to configure glibc-2.3.2 on Mac OS X, -where the assembler but doesn't understand the --version flag. - -Fixes the symptom -checking whether ld is GNU ld... no -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as -checking version of /usr/libexec/gcc/darwin/ppc/as... - - ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 -@@ -4039,7 +4039,7 @@ - # Found it, now check the version. - echo "$as_me:$LINENO: checking version of $AS" >&5 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[3-9]*) - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/140-i386-preferred-stack-boundary.patch b/patches/glibc/2.6/140-i386-preferred-stack-boundary.patch new file mode 100644 index 00000000..449821d8 --- /dev/null +++ b/patches/glibc/2.6/140-i386-preferred-stack-boundary.patch @@ -0,0 +1,18 @@ +(C) 2007 Yann E. MORIN +License: LGPL v2.1 + +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, +and 2 is not. + +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 +@@ -36,7 +36,7 @@ + ifeq ($(subdir),csu) + sysdep-CFLAGS += -mpreferred-stack-boundary=4 + else +-sysdep-CFLAGS += -mpreferred-stack-boundary=2 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4 + # Likewise, any function which calls user callbacks + uses-callbacks += -mpreferred-stack-boundary=4 + # Likewise, any stack alignment tests diff --git a/patches/glibc/2.6/150-alpha-asm_page.patch b/patches/glibc/2.6/150-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.6/150-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.6/150-fix-pr631.patch b/patches/glibc/2.6/150-fix-pr631.patch deleted file mode 100644 index 13688dfc..00000000 --- a/patches/glibc/2.6/150-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -510,7 +510,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -120,6 +120,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln - -Signed-off-by: Robert P. J. Day diff --git a/patches/glibc/2.6/160-i686-assembler.patch b/patches/glibc/2.6/160-i686-assembler.patch deleted file mode 100644 index 9904efbe..00000000 --- a/patches/glibc/2.6/160-i686-assembler.patch +++ /dev/null @@ -1,38 +0,0 @@ -2007-02-15 Khem Raj - - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686. - * nptl/sysdeps/pthread/pt-initfini.c: Ditto. - - - -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h -=================================================================== ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c -=================================================================== ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - diff --git a/patches/glibc/2.6/160-use_short_for_fnstsw.patch b/patches/glibc/2.6/160-use_short_for_fnstsw.patch new file mode 100644 index 00000000..0e849fa1 --- /dev/null +++ b/patches/glibc/2.6/160-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.6/170-alpha-asm_elf.patch b/patches/glibc/2.6/170-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.6/170-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.6/170-i386-preferred-stack-boundary.patch b/patches/glibc/2.6/170-i386-preferred-stack-boundary.patch deleted file mode 100644 index 449821d8..00000000 --- a/patches/glibc/2.6/170-i386-preferred-stack-boundary.patch +++ /dev/null @@ -1,18 +0,0 @@ -(C) 2007 Yann E. MORIN -License: LGPL v2.1 - -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, -and 2 is not. - -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 -@@ -36,7 +36,7 @@ - ifeq ($(subdir),csu) - sysdep-CFLAGS += -mpreferred-stack-boundary=4 - else --sysdep-CFLAGS += -mpreferred-stack-boundary=2 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4 - # Likewise, any function which calls user callbacks - uses-callbacks += -mpreferred-stack-boundary=4 - # Likewise, any stack alignment tests diff --git a/patches/glibc/2.6/180-alpha-asm_page.patch b/patches/glibc/2.6/180-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.6/180-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.6/190-use_short_for_fnstsw.patch b/patches/glibc/2.6/190-use_short_for_fnstsw.patch deleted file mode 100644 index 0e849fa1..00000000 --- a/patches/glibc/2.6/190-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.6.1.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.6.1/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:56:14.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.6/200-alpha-asm_elf.patch b/patches/glibc/2.6/200-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.6/200-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.7/100-cygwin.patch b/patches/glibc/2.7/100-cygwin.patch new file mode 100644 index 00000000..030361f9 --- /dev/null +++ b/patches/glibc/2.7/100-cygwin.patch @@ -0,0 +1,185 @@ +Fixes +elf/librtld.os: In function `process_envvars': : undefined reference to `__access' +... +when building glibc-2.3.x on cygwin + +Idea from +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch +Basically, make glibc use .oST as suffix for 'object static' +instead of .oS, since cygwin has trouble distinguishing .os from .oS +(Original patch had .on, but .oST is more mnemonic for 'object static') + +glibc-linuxthreads-2.3.5 also requires a patch, see +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch + +[ forward ported to glibc-2.3.5 by Petr Cvachoucek: + +Message-ID: <4282FCBA.3040000@unicontrols.cz> +Date: Thu, 12 May 2005 08:50:34 +0200 +From: Petr Cvachoucek +To: Dan Kegel +CC: crossgcc@sources.redhat.com +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin + +Hi Dan, +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. + +-- + Petr Cvachoucek + Unicontrols a.s. + http://www.unicontrols.cz +] + +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 +@@ -470,7 +470,7 @@ + # run the linked programs. + link-libc = -Wl,-rpath-link=$(rpath-link) \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) + # This is how to find at build-time things that will be installed there. + rpath-dirs = math elf dlfcn nss nis rt resolv crypt + endif +@@ -691,7 +691,7 @@ + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) + # to pass different flags for each flavor. + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) +-all-object-suffixes := .o .os .op .og .ob .oS ++all-object-suffixes := .o .os .op .og .ob .oST + object-suffixes := + CPPFLAGS-.o = $(pic-default) + CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) +@@ -747,14 +747,14 @@ + + ifeq (yes,$(build-shared)) + # Build special library that contains the static-only routines for libc. +-object-suffixes-for-libc += .oS ++object-suffixes-for-libc += .oST + + # Must build the routines as PIC, though, because they can end up in (users') + # shared objects. We don't want to use CFLAGS-os because users may, for + # example, make that processor-specific. +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 +-libtype.oS = lib%_nonshared.a ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 ++libtype.oST = lib%_nonshared.a + endif + + # The assembler can generate debug information too. +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 +@@ -417,7 +417,7 @@ + # Bounded pointer thunks are only built for *.ob + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) + +-elide-routines.oS += $(filter-out $(static-only-routines),\ ++elide-routines.oST += $(filter-out $(static-only-routines),\ + $(routines) $(aux) $(sysdep_routines)) \ + $(elide-bp-thunks) + elide-routines.os += $(static-only-routines) $(elide-bp-thunks) +@@ -984,7 +984,7 @@ + install: $(inst_libdir)/libc.so + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ + $(common-objpfx)libc.so$(libc.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)$(libc-name)) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -992,7 +992,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 +@@ -13,7 +13,7 @@ + + ifneq (,$($(lib)-static-only-routines)) + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) + endif + endif + +@@ -29,7 +29,7 @@ + + # Add each flavor of library to the lists of things to build and install. + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ + $(patsubst %,%$o,$(filter-out \ + $($(lib)-shared-only-routines),\ + $(all-$(lib)-routines)))) +@@ -57,7 +57,7 @@ + + + # Use o-iterator.mk to generate a rule for each flavor of library. +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) + define o-iterator-doit + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ + $(patsubst %,$(objpfx)%$o,\ +@@ -65,7 +65,7 @@ + $(all-$(lib)-routines))); \ + $$(build-extra-lib) + endef +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) + endif + +@@ -77,9 +77,9 @@ + $(build-extra-lib) + endif + +-ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ +- $(patsubst %,$(objpfx)%.oS,\ ++ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ ++ $(patsubst %,$(objpfx)%.oST,\ + $(filter $($(lib)-static-only-routines),\ + $(all-$(lib)-routines))) + $(build-extra-lib) +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 +@@ -375,7 +375,7 @@ + + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ + $(objpfx)libpthread.so$(libpthread.so-version) \ +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ + $(libprefix)pthread) \ + $(+force) + (echo '/* GNU ld script';\ +@@ -383,7 +383,7 @@ + echo ' the static library, so try that secondarily. */';\ + cat $<; \ + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ + ')' \ + ) > $@.new + mv -f $@.new $@ +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 +@@ -10,4 +10,4 @@ + ASFLAGS-.op += -Wa,-Av9a + ASFLAGS-.og += -Wa,-Av9a + ASFLAGS-.ob += -Wa,-Av9a +-ASFLAGS-.oS += -Wa,-Av9a ++ASFLAGS-.oST += -Wa,-Av9a diff --git a/patches/glibc/2.7/110-configure-apple-as.patch b/patches/glibc/2.7/110-configure-apple-as.patch new file mode 100644 index 00000000..264a5df9 --- /dev/null +++ b/patches/glibc/2.7/110-configure-apple-as.patch @@ -0,0 +1,26 @@ +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html + +The following makes it possible to configure glibc-2.3.2 on Mac OS X, +where the assembler but doesn't understand the --version flag. + +Fixes the symptom +checking whether ld is GNU ld... no +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as +checking version of /usr/libexec/gcc/darwin/ppc/as... + + +NOTE: This patch should apparently be pushed upstream so we don't need to +keep adding it here. + +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 +@@ -4524,7 +4524,7 @@ + # Found it, now check the version. + { echo "$as_me:$LINENO: checking version of $AS" >&5 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; } +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` ++ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.1[3-9]*) diff --git a/patches/glibc/2.7/120-cygwin.patch b/patches/glibc/2.7/120-cygwin.patch deleted file mode 100644 index 030361f9..00000000 --- a/patches/glibc/2.7/120-cygwin.patch +++ /dev/null @@ -1,185 +0,0 @@ -Fixes -elf/librtld.os: In function `process_envvars': : undefined reference to `__access' -... -when building glibc-2.3.x on cygwin - -Idea from -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch -Basically, make glibc use .oST as suffix for 'object static' -instead of .oS, since cygwin has trouble distinguishing .os from .oS -(Original patch had .on, but .oST is more mnemonic for 'object static') - -glibc-linuxthreads-2.3.5 also requires a patch, see -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch - -[ forward ported to glibc-2.3.5 by Petr Cvachoucek: - -Message-ID: <4282FCBA.3040000@unicontrols.cz> -Date: Thu, 12 May 2005 08:50:34 +0200 -From: Petr Cvachoucek -To: Dan Kegel -CC: crossgcc@sources.redhat.com -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin - -Hi Dan, -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets. - --- - Petr Cvachoucek - Unicontrols a.s. - http://www.unicontrols.cz -] - -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200 -@@ -470,7 +470,7 @@ - # run the linked programs. - link-libc = -Wl,-rpath-link=$(rpath-link) \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib) -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib) - # This is how to find at build-time things that will be installed there. - rpath-dirs = math elf dlfcn nss nis rt resolv crypt - endif -@@ -691,7 +691,7 @@ - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX}) - # to pass different flags for each flavor. - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o)) --all-object-suffixes := .o .os .op .og .ob .oS -+all-object-suffixes := .o .os .op .og .ob .oST - object-suffixes := - CPPFLAGS-.o = $(pic-default) - CFLAGS-.o = $(filter %frame-pointer,$(+cflags)) -@@ -747,14 +747,14 @@ - - ifeq (yes,$(build-shared)) - # Build special library that contains the static-only routines for libc. --object-suffixes-for-libc += .oS -+object-suffixes-for-libc += .oST - - # Must build the routines as PIC, though, because they can end up in (users') - # shared objects. We don't want to use CFLAGS-os because users may, for - # example, make that processor-specific. --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag) --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 --libtype.oS = lib%_nonshared.a -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag) -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1 -+libtype.oST = lib%_nonshared.a - endif - - # The assembler can generate debug information too. -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200 -@@ -417,7 +417,7 @@ - # Bounded pointer thunks are only built for *.ob - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks)) - --elide-routines.oS += $(filter-out $(static-only-routines),\ -+elide-routines.oST += $(filter-out $(static-only-routines),\ - $(routines) $(aux) $(sysdep_routines)) \ - $(elide-bp-thunks) - elide-routines.os += $(static-only-routines) $(elide-bp-thunks) -@@ -984,7 +984,7 @@ - install: $(inst_libdir)/libc.so - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \ - $(common-objpfx)libc.so$(libc.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)$(libc-name)) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -992,7 +992,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\ - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200 -@@ -13,7 +13,7 @@ - - ifneq (,$($(lib)-static-only-routines)) - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version))) --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS) -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST) - endif - endif - -@@ -29,7 +29,7 @@ - - # Add each flavor of library to the lists of things to build and install. - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o))) --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\ -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\ - $(patsubst %,%$o,$(filter-out \ - $($(lib)-shared-only-routines),\ - $(all-$(lib)-routines)))) -@@ -57,7 +57,7 @@ - - - # Use o-iterator.mk to generate a rule for each flavor of library. --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib)))) -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib)))) - define o-iterator-doit - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \ - $(patsubst %,$(objpfx)%$o,\ -@@ -65,7 +65,7 @@ - $(all-$(lib)-routines))); \ - $$(build-extra-lib) - endef --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib))) -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib))) - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left)) - endif - -@@ -77,9 +77,9 @@ - $(build-extra-lib) - endif - --ifneq (,$(filter .oS,$(object-suffixes-$(lib)))) --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \ -- $(patsubst %,$(objpfx)%.oS,\ -+ifneq (,$(filter .oST,$(object-suffixes-$(lib)))) -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \ -+ $(patsubst %,$(objpfx)%.oST,\ - $(filter $($(lib)-static-only-routines),\ - $(all-$(lib)-routines))) - $(build-extra-lib) -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200 -@@ -375,7 +375,7 @@ - - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \ - $(objpfx)libpthread.so$(libpthread.so-version) \ -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\ -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\ - $(libprefix)pthread) \ - $(+force) - (echo '/* GNU ld script';\ -@@ -383,7 +383,7 @@ - echo ' the static library, so try that secondarily. */';\ - cat $<; \ - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \ -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\ -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\ - ')' \ - ) > $@.new - mv -f $@.new $@ -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200 -@@ -10,4 +10,4 @@ - ASFLAGS-.op += -Wa,-Av9a - ASFLAGS-.og += -Wa,-Av9a - ASFLAGS-.ob += -Wa,-Av9a --ASFLAGS-.oS += -Wa,-Av9a -+ASFLAGS-.oST += -Wa,-Av9a diff --git a/patches/glibc/2.7/120-fix-pr631.patch b/patches/glibc/2.7/120-fix-pr631.patch new file mode 100644 index 00000000..4e549fd9 --- /dev/null +++ b/patches/glibc/2.7/120-fix-pr631.patch @@ -0,0 +1,43 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 +@@ -508,7 +508,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 +@@ -120,6 +120,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln diff --git a/patches/glibc/2.7/130-i686-assembler.patch b/patches/glibc/2.7/130-i686-assembler.patch new file mode 100644 index 00000000..09c87544 --- /dev/null +++ b/patches/glibc/2.7/130-i686-assembler.patch @@ -0,0 +1,43 @@ +If gcc is configured to generate i686 code or better by default (like +when using the --with-arch=pentium3 configure option), then the __i686 +macro will always be defined automatically and thus screw up the +compilation of some .S files. + +http://bugs.gentoo.org/131108 +http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html + +2006-04-25 Mike Frysinger + + * sysdeps/i386/sysdep.h (__i686): Undefine. + +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h +=================================================================== +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file + /usr/include/asm/unistd.h +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c +=================================================================== +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + diff --git a/patches/glibc/2.7/140-configure-apple-as.patch b/patches/glibc/2.7/140-configure-apple-as.patch deleted file mode 100644 index 264a5df9..00000000 --- a/patches/glibc/2.7/140-configure-apple-as.patch +++ /dev/null @@ -1,26 +0,0 @@ -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html - -The following makes it possible to configure glibc-2.3.2 on Mac OS X, -where the assembler but doesn't understand the --version flag. - -Fixes the symptom -checking whether ld is GNU ld... no -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as -checking version of /usr/libexec/gcc/darwin/ppc/as... - - -NOTE: This patch should apparently be pushed upstream so we don't need to -keep adding it here. - ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004 -@@ -4524,7 +4524,7 @@ - # Found it, now check the version. - { echo "$as_me:$LINENO: checking version of $AS" >&5 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6; } -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` -+ ac_prog_version=`$AS -v &1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[3-9]*) diff --git a/patches/glibc/2.7/140-i386-preferred-stack-boundary.patch b/patches/glibc/2.7/140-i386-preferred-stack-boundary.patch new file mode 100644 index 00000000..449821d8 --- /dev/null +++ b/patches/glibc/2.7/140-i386-preferred-stack-boundary.patch @@ -0,0 +1,18 @@ +(C) 2007 Yann E. MORIN +License: LGPL v2.1 + +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, +and 2 is not. + +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 +@@ -36,7 +36,7 @@ + ifeq ($(subdir),csu) + sysdep-CFLAGS += -mpreferred-stack-boundary=4 + else +-sysdep-CFLAGS += -mpreferred-stack-boundary=2 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4 + # Likewise, any function which calls user callbacks + uses-callbacks += -mpreferred-stack-boundary=4 + # Likewise, any stack alignment tests diff --git a/patches/glibc/2.7/150-alpha-asm_page.patch b/patches/glibc/2.7/150-alpha-asm_page.patch new file mode 100644 index 00000000..b198b367 --- /dev/null +++ b/patches/glibc/2.7/150-alpha-asm_page.patch @@ -0,0 +1,26 @@ +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions + from the kernel header to sys/user.h and remove the #include of + sys/user.h. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/user.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h +@@ -23,7 +23,6 @@ + only. Don't read too much into it. Don't use it for anything other + than gdb/strace unless you know what you are doing. */ + +-#include + #include + + struct user +@@ -41,6 +40,9 @@ struct user + char u_comm[32]; /* user command name */ + }; + ++#define PAGE_SHIFT 13 ++#define PAGE_SIZE (1 << PAGE_SHIFT) ++#define PAGE_MASK (~(PAGE_SIZE-1)) + #define NBPG PAGE_SIZE + #define UPAGES 1 + #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.7/150-fix-pr631.patch b/patches/glibc/2.7/150-fix-pr631.patch deleted file mode 100644 index 4e549fd9..00000000 --- a/patches/glibc/2.7/150-fix-pr631.patch +++ /dev/null @@ -1,43 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005 -@@ -508,7 +508,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005 -@@ -120,6 +120,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln diff --git a/patches/glibc/2.7/160-build_wcs_upper_buffer.patch b/patches/glibc/2.7/160-build_wcs_upper_buffer.patch new file mode 100644 index 00000000..72cde922 --- /dev/null +++ b/patches/glibc/2.7/160-build_wcs_upper_buffer.patch @@ -0,0 +1,22 @@ +Matthias Kaehlcke writes: + +A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng +failed with a gcc error in glibc-2.7/posix/regex_internal.c, more +concretly in the function build_wcs_upper_buffer(). The return type of +the function prototype in regex_internal.h doesn't correspond with the +return type of this function in regex_internal.c. + +The attached patch corrects the return type of the function prototype +in regex_internal.h + +--- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200 ++++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200 +@@ -391,7 +391,7 @@ + internal_function; + # ifdef RE_ENABLE_I18N + static void build_wcs_buffer (re_string_t *pstr) internal_function; +-static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; ++static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; + # endif /* RE_ENABLE_I18N */ + static void build_upper_buffer (re_string_t *pstr) internal_function; + static void re_string_translate_buffer (re_string_t *pstr) internal_function; diff --git a/patches/glibc/2.7/160-i686-assembler.patch b/patches/glibc/2.7/160-i686-assembler.patch deleted file mode 100644 index 09c87544..00000000 --- a/patches/glibc/2.7/160-i686-assembler.patch +++ /dev/null @@ -1,43 +0,0 @@ -If gcc is configured to generate i686 code or better by default (like -when using the --with-arch=pentium3 configure option), then the __i686 -macro will always be defined automatically and thus screw up the -compilation of some .S files. - -http://bugs.gentoo.org/131108 -http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html - -2006-04-25 Mike Frysinger - - * sysdeps/i386/sysdep.h (__i686): Undefine. - -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h -=================================================================== ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469) -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy) -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c -=================================================================== ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469) -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy) -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - diff --git a/patches/glibc/2.7/170-i386-preferred-stack-boundary.patch b/patches/glibc/2.7/170-i386-preferred-stack-boundary.patch deleted file mode 100644 index 449821d8..00000000 --- a/patches/glibc/2.7/170-i386-preferred-stack-boundary.patch +++ /dev/null @@ -1,18 +0,0 @@ -(C) 2007 Yann E. MORIN -License: LGPL v2.1 - -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12, -and 2 is not. - -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200 -@@ -36,7 +36,7 @@ - ifeq ($(subdir),csu) - sysdep-CFLAGS += -mpreferred-stack-boundary=4 - else --sysdep-CFLAGS += -mpreferred-stack-boundary=2 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4 - # Likewise, any function which calls user callbacks - uses-callbacks += -mpreferred-stack-boundary=4 - # Likewise, any stack alignment tests diff --git a/patches/glibc/2.7/170-use_short_for_fnstsw.patch b/patches/glibc/2.7/170-use_short_for_fnstsw.patch new file mode 100644 index 00000000..722f8d2b --- /dev/null +++ b/patches/glibc/2.7/170-use_short_for_fnstsw.patch @@ -0,0 +1,18 @@ +Original patch from H.J. Lu, as reported there: +http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html + +fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. +The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". + +diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c +--- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 ++++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200 +@@ -26,7 +26,7 @@ + int + fetestexcept (int excepts) + { +- int temp; ++ short temp; + int xtemp = 0; + + /* Get current exceptions. */ diff --git a/patches/glibc/2.7/180-alpha-asm_page.patch b/patches/glibc/2.7/180-alpha-asm_page.patch deleted file mode 100644 index b198b367..00000000 --- a/patches/glibc/2.7/180-alpha-asm_page.patch +++ /dev/null @@ -1,26 +0,0 @@ -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/alpha/sys/user.h: Copy page.h definitions - from the kernel header to sys/user.h and remove the #include of - sys/user.h. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/user.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/user.h -@@ -23,7 +23,6 @@ - only. Don't read too much into it. Don't use it for anything other - than gdb/strace unless you know what you are doing. */ - --#include - #include - - struct user -@@ -41,6 +40,9 @@ struct user - char u_comm[32]; /* user command name */ - }; - -+#define PAGE_SHIFT 13 -+#define PAGE_SIZE (1 << PAGE_SHIFT) -+#define PAGE_MASK (~(PAGE_SIZE-1)) - #define NBPG PAGE_SIZE - #define UPAGES 1 - #define HOST_TEXT_START_ADDR (u.start_code) diff --git a/patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch b/patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch new file mode 100644 index 00000000..7af09a42 --- /dev/null +++ b/patches/glibc/2.7/180-gcc-4.3_sysinclude_path.patch @@ -0,0 +1,50 @@ +Patch pointed to by Ryan ARNOLD on the libc-help ML. +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +Forwarded to crosstool-NG by Ioannis E. VENETIS: +See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html + +GCC 4.3 changed the location of some of the header files. I don't +understand why you'd be getting these errors while building GCC since +it provides them. + +With regard to GLIBC, Roland checked in some changes so that the GLIBC +build system could find the new locations of the GCC provided header +files. + +diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in +--- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 ++++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200 +@@ -911,8 +911,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # thing on a system that doesn't need fixincludes. (Not presently a problem.) + if test -n "$sysheaders"; then +- ccheaders=`$CC -print-file-name=include` +- SYSINCLUDES="-nostdinc -isystem $ccheaders \ ++ SYSINCLUDES=-nostdinc ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && +diff -durN glibc-2.7.orig/configure glibc-2.7/configure +--- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200 ++++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200 +@@ -5062,8 +5062,12 @@ + # header directory and add that to the list. NOTE: Only does the right + # thing on a system that doesn't need fixincludes. (Not presently a problem.) + if test -n "$sysheaders"; then +- ccheaders=`$CC -print-file-name=include` +- SYSINCLUDES="-nostdinc -isystem $ccheaders \ ++ SYSINCLUDES=-nostdinc ++ for d in include include-fixed; do ++ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && ++ SYSINCLUDES="$SYSINCLUDES -isystem $i" ++ done ++ SYSINCLUDES="$SYSINCLUDES \ + -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" + if test -n "$CXX"; then + cxxversion=`$CXX -dumpversion 2>&5` && diff --git a/patches/glibc/2.7/190-alpha-asm_elf.patch b/patches/glibc/2.7/190-alpha-asm_elf.patch new file mode 100644 index 00000000..3da5c8e4 --- /dev/null +++ b/patches/glibc/2.7/190-alpha-asm_elf.patch @@ -0,0 +1,194 @@ +since the kernel no longer provides asm/elf.h, the sys/procfs.h from the +common code, alpha, and sh fail when used. this should things up. +-mike + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +*Attachment: signature.asc * +/Description:/ This is a digitally signed message part. + +2008-06-07 Mike Frysinger + + * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. + * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h + definitions from the kernel header to sys/procfs.h and remove the + #include of asm/elf.h. + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. + +--- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h +@@ -29,10 +29,23 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * The OSF/1 version of makes gregset_t 46 entries long. ++ * I have no idea why that is so. For now, we just leave it at 33 ++ * (32 general regs + processor status word). ++ */ ++#define ELF_NGREG 33 ++#define ELF_NFPREG 32 ++ ++typedef unsigned long elf_greg_t; ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef double elf_fpreg_t; ++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h +@@ -29,10 +29,19 @@ + #include + #include + #include +-#include + + __BEGIN_DECLS + ++/* ++ * ELF register definitions... ++ */ ++typedef unsigned long elf_greg_t; ++ ++#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) ++typedef elf_greg_t elf_gregset_t[ELF_NGREG]; ++ ++typedef struct user_fpu_struct elf_fpregset_t; ++ + struct elf_siginfo + { + int si_signo; /* Signal number. */ +--- a/sysdeps/unix/sysv/linux/sys/procfs.h ++++ b/sysdeps/unix/sysv/linux/sys/procfs.h +@@ -1,115 +1,2 @@ +-/* Copyright (C) 1996, 1997, 1999 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, write to the Free +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ +- +-#ifndef _SYS_PROCFS_H +-#define _SYS_PROCFS_H 1 +- +-/* This is somehow modelled after the file of the same name on SysVr4 +- systems. It provides a definition of the core file format for ELF +- used on Linux. */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-__BEGIN_DECLS +- +-struct elf_siginfo +- { +- int si_signo; /* Signal number. */ +- int si_code; /* Extra code. */ +- int si_errno; /* Errno. */ +- }; +- +-/* Definitions to generate Intel SVR4-like core files. These mostly +- have the same names as the SVR4 types with "elf_" tacked on the +- front to prevent clashes with linux definitions, and the typedef +- forms have been avoided. This is mostly like the SVR4 structure, +- but more Linuxy, with things that Linux does not support and which +- gdb doesn't really use excluded. Fields present but not used are +- marked with "XXX". */ +-struct elf_prstatus +- { +-#if 0 +- long int pr_flags; /* XXX Process flags. */ +- short int pr_why; /* XXX Reason for process halt. */ +- short int pr_what; /* XXX More detailed reason. */ +-#endif +- struct elf_siginfo pr_info; /* Info associated with signal. */ +- short int pr_cursig; /* Current signal. */ +- unsigned long int pr_sigpend; /* Set of pending signals. */ +- unsigned long int pr_sighold; /* Set of held signals. */ +-#if 0 +- struct sigaltstack pr_altstack; /* Alternate stack info. */ +- struct sigaction pr_action; /* Signal action for current sig. */ +-#endif +- __pid_t pr_pid; +- __pid_t pr_ppid; +- __pid_t pr_pgrp; +- __pid_t pr_sid; +- struct timeval pr_utime; /* User time. */ +- struct timeval pr_stime; /* System time. */ +- struct timeval pr_cutime; /* Cumulative user time. */ +- struct timeval pr_cstime; /* Cumulative system time. */ +-#if 0 +- long int pr_instr; /* Current instruction. */ +-#endif +- elf_gregset_t pr_reg; /* GP registers. */ +- int pr_fpvalid; /* True if math copro being used. */ +- }; +- +- +-#define ELF_PRARGSZ (80) /* Number of chars for args */ +- +-struct elf_prpsinfo +- { +- char pr_state; /* Numeric process state. */ +- char pr_sname; /* Char for pr_state. */ +- char pr_zomb; /* Zombie. */ +- char pr_nice; /* Nice val. */ +- unsigned long int pr_flag; /* Flags. */ +- unsigned short int pr_uid; +- unsigned short int pr_gid; +- int pr_pid, pr_ppid, pr_pgrp, pr_sid; +- /* Lots missing */ +- char pr_fname[16]; /* Filename of executable. */ +- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ +- }; +- +-/* Addresses. */ +-typedef void *psaddr_t; +- +-/* Register sets. Linux has different names. */ +-typedef gregset_t prgregset_t; +-typedef fpregset_t prfpregset_t; +- +-/* We don't have any differences between processes and threads, +- therefore habe only ine PID type. */ +-typedef __pid_t lwpid_t; +- +- +-typedef struct elf_prstatus prstatus_t; +-typedef struct elf_prpsinfo prpsinfo_t; +- +-__END_DECLS +- +-#endif /* sys/procfs.h */ ++/* sys/procfs.h is architecture specific. */ ++#error "This file must be supplied by every Linux architecture." + diff --git a/patches/glibc/2.7/190-build_wcs_upper_buffer.patch b/patches/glibc/2.7/190-build_wcs_upper_buffer.patch deleted file mode 100644 index 72cde922..00000000 --- a/patches/glibc/2.7/190-build_wcs_upper_buffer.patch +++ /dev/null @@ -1,22 +0,0 @@ -Matthias Kaehlcke writes: - -A compilation of an ARM toolchain with glibc 2.7 using crosstool-ng -failed with a gcc error in glibc-2.7/posix/regex_internal.c, more -concretly in the function build_wcs_upper_buffer(). The return type of -the function prototype in regex_internal.h doesn't correspond with the -return type of this function in regex_internal.c. - -The attached patch corrects the return type of the function prototype -in regex_internal.h - ---- glibc-2.7/posix/regex_internal.h.org 2008-05-30 11:16:01.000000000 +0200 -+++ glibc-2.7/posix/regex_internal.h 2008-05-30 11:16:35.000000000 +0200 -@@ -391,7 +391,7 @@ - internal_function; - # ifdef RE_ENABLE_I18N - static void build_wcs_buffer (re_string_t *pstr) internal_function; --static int build_wcs_upper_buffer (re_string_t *pstr) internal_function; -+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) internal_function; - # endif /* RE_ENABLE_I18N */ - static void build_upper_buffer (re_string_t *pstr) internal_function; - static void re_string_translate_buffer (re_string_t *pstr) internal_function; diff --git a/patches/glibc/2.7/200-alpha-atfcts.patch b/patches/glibc/2.7/200-alpha-atfcts.patch new file mode 100644 index 00000000..06c7d8f6 --- /dev/null +++ b/patches/glibc/2.7/200-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h 2007-08-14 06:21:09.000000000 +0300 ++++ glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-23 07:05:20.000000000 +0300 +@@ -449,8 +449,7 @@ + and on Alpha just after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ + && ((!defined __sh__ && !defined __alpha__) \ +- || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \ +- || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__)) ++ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__)) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/patches/glibc/2.7/200-use_short_for_fnstsw.patch b/patches/glibc/2.7/200-use_short_for_fnstsw.patch deleted file mode 100644 index 722f8d2b..00000000 --- a/patches/glibc/2.7/200-use_short_for_fnstsw.patch +++ /dev/null @@ -1,18 +0,0 @@ -Original patch from H.J. Lu, as reported there: -http://www.nabble.com/PATCH:-Use-short-for-fnstsw-td14775171.html - -fnstsw stores 16bit into %ax. The upper 16bit of %eax is unchanged. -The new assembler (binutils-2.18.50.0.4 and up) will disallow "fnstsw %eax". - -diff -dur glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c glibc-2.7/sysdeps/i386/fpu/ftestexcept.c ---- glibc-2.7.orig/sysdeps/i386/fpu/ftestexcept.c 2004-03-05 11:14:48.000000000 +0100 -+++ glibc-2.7/sysdeps/i386/fpu/ftestexcept.c 2008-06-24 10:54:43.000000000 +0200 -@@ -26,7 +26,7 @@ - int - fetestexcept (int excepts) - { -- int temp; -+ short temp; - int xtemp = 0; - - /* Get current exceptions. */ diff --git a/patches/glibc/2.7/210-alpha-ptr_mangle.patch b/patches/glibc/2.7/210-alpha-ptr_mangle.patch new file mode 100644 index 00000000..7f228333 --- /dev/null +++ b/patches/glibc/2.7/210-alpha-ptr_mangle.patch @@ -0,0 +1,94 @@ +--- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h ++++ glibc-2.7/sysdeps/unix/alpha/sysdep.h +@@ -397,42 +397,4 @@ + _sc_ret = _sc_0, _sc_err = _sc_19; \ + } + +-/* Pointer mangling support. Note that tls access is slow enough that +- we don't deoptimize things by placing the pointer check value there. */ +- +-#include +- +-#if defined NOT_IN_libc && defined IS_IN_rtld +-# ifdef __ASSEMBLER__ +-# define PTR_MANGLE(dst, src, tmp) \ +- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ +- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ +- xor src, tmp, dst +-# define PTR_MANGLE2(dst, src, tmp) \ +- xor src, tmp, dst +-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +-# else +-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; +-# define PTR_MANGLE(var) \ +- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) +-# define PTR_DEMANGLE(var) PTR_MANGLE(var) +-# endif +-#elif defined PIC +-# ifdef __ASSEMBLER__ +-# define PTR_MANGLE(dst, src, tmp) \ +- ldq tmp, __pointer_chk_guard; \ +- xor src, tmp, dst +-# define PTR_MANGLE2(dst, src, tmp) \ +- xor src, tmp, dst +-# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) +-# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) +-# else +-extern uintptr_t __pointer_chk_guard attribute_relro; +-# define PTR_MANGLE(var) \ +- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) +-# define PTR_DEMANGLE(var) PTR_MANGLE(var) +-# endif +-#endif +- + #endif /* ASSEMBLER */ +--- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h ++++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h +@@ -98,4 +98,46 @@ + INTERNAL_SYSCALL1(name, err_out, nr, args); \ + }) + ++/* Pointer mangling support. Note that tls access is slow enough that ++ we don't deoptimize things by placing the pointer check value there. */ ++ ++#if defined NOT_IN_libc && defined IS_IN_rtld ++# ifdef __ASSEMBLER__ ++# define PTR_MANGLE(dst, src, tmp) \ ++ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ ++ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ ++ xor src, tmp, dst ++# define PTR_MANGLE2(dst, src, tmp) \ ++ xor src, tmp, dst ++# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) ++# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) ++# else ++extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; ++# define PTR_MANGLE(var) \ ++ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) ++# define PTR_DEMANGLE(var) PTR_MANGLE(var) ++# endif ++#elif defined PIC ++# ifdef __ASSEMBLER__ ++# define PTR_MANGLE(dst, src, tmp) \ ++ ldq tmp, __pointer_chk_guard; \ ++ xor src, tmp, dst ++# define PTR_MANGLE2(dst, src, tmp) \ ++ xor src, tmp, dst ++# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) ++# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) ++# else ++extern uintptr_t __pointer_chk_guard attribute_relro; ++# define PTR_MANGLE(var) \ ++ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) ++# define PTR_DEMANGLE(var) PTR_MANGLE(var) ++# endif ++#else ++/* Pointer mangling is not yet supported for static libc on alpha. */ ++# ifndef __ASSEMBLER__ ++# define PTR_MANGLE(var) (void) (var) ++# define PTR_DEMANGLE(var) (void) (var) ++# endif ++#endif ++ + #endif /* _LINUX_ALPHA_SYSDEP_H */ diff --git a/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch b/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch deleted file mode 100644 index 7af09a42..00000000 --- a/patches/glibc/2.7/210-gcc-4.3_sysinclude_path.patch +++ /dev/null @@ -1,50 +0,0 @@ -Patch pointed to by Ryan ARNOLD on the libc-help ML. -See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html - -Forwarded to crosstool-NG by Ioannis E. VENETIS: -See: http://sourceware.org/ml/libc-help/2008-06/msg00063.html - -GCC 4.3 changed the location of some of the header files. I don't -understand why you'd be getting these errors while building GCC since -it provides them. - -With regard to GLIBC, Roland checked in some changes so that the GLIBC -build system could find the new locations of the GCC provided header -files. - -diff -durN glibc-2.7.orig/configure.in glibc-2.7/configure.in ---- glibc-2.7.orig/configure.in 2007-06-08 05:16:36.000000000 +0200 -+++ glibc-2.7/configure.in 2008-06-24 18:38:46.000000000 +0200 -@@ -911,8 +911,12 @@ - # header directory and add that to the list. NOTE: Only does the right - # thing on a system that doesn't need fixincludes. (Not presently a problem.) - if test -n "$sysheaders"; then -- ccheaders=`$CC -print-file-name=include` -- SYSINCLUDES="-nostdinc -isystem $ccheaders \ -+ SYSINCLUDES=-nostdinc -+ for d in include include-fixed; do -+ i=`$CC -print-file-name="$d"` && test "x$i" != x && test "x$i" != "x$d" && -+ SYSINCLUDES="$SYSINCLUDES -isystem $i" -+ done -+ SYSINCLUDES="$SYSINCLUDES \ - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" - if test -n "$CXX"; then - cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` && -diff -durN glibc-2.7.orig/configure glibc-2.7/configure ---- glibc-2.7.orig/configure 2008-06-24 18:35:34.000000000 +0200 -+++ glibc-2.7/configure 2008-06-24 18:38:46.000000000 +0200 -@@ -5062,8 +5062,12 @@ - # header directory and add that to the list. NOTE: Only does the right - # thing on a system that doesn't need fixincludes. (Not presently a problem.) - if test -n "$sysheaders"; then -- ccheaders=`$CC -print-file-name=include` -- SYSINCLUDES="-nostdinc -isystem $ccheaders \ -+ SYSINCLUDES=-nostdinc -+ for d in include include-fixed; do -+ i=`$CC -print-file-name="$d"` && test "x$i" != "x$d" && -+ SYSINCLUDES="$SYSINCLUDES -isystem $i" -+ done -+ SYSINCLUDES="$SYSINCLUDES \ - -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`" - if test -n "$CXX"; then - cxxversion=`$CXX -dumpversion 2>&5` && diff --git a/patches/glibc/2.7/220-alpha-asm_elf.patch b/patches/glibc/2.7/220-alpha-asm_elf.patch deleted file mode 100644 index 3da5c8e4..00000000 --- a/patches/glibc/2.7/220-alpha-asm_elf.patch +++ /dev/null @@ -1,194 +0,0 @@ -since the kernel no longer provides asm/elf.h, the sys/procfs.h from the -common code, alpha, and sh fail when used. this should things up. --mike - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - -*Attachment: signature.asc * -/Description:/ This is a digitally signed message part. - -2008-06-07 Mike Frysinger - - * sysdeps/unix/sysv/linux/sys/procfs.h: Replace with #error stub. - * sysdeps/unix/sysv/linux/alpha/sys/procfs.h: Copy some asm/elf.h - definitions from the kernel header to sys/procfs.h and remove the - #include of asm/elf.h. - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Likewise. - ---- a/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/alpha/sys/procfs.h -@@ -29,10 +29,23 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * The OSF/1 version of makes gregset_t 46 entries long. -+ * I have no idea why that is so. For now, we just leave it at 33 -+ * (32 general regs + processor status word). -+ */ -+#define ELF_NGREG 33 -+#define ELF_NFPREG 32 -+ -+typedef unsigned long elf_greg_t; -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef double elf_fpreg_t; -+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sh/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sh/sys/procfs.h -@@ -29,10 +29,19 @@ - #include - #include - #include --#include - - __BEGIN_DECLS - -+/* -+ * ELF register definitions... -+ */ -+typedef unsigned long elf_greg_t; -+ -+#define ELF_NGREG (sizeof (struct pt_regs) / sizeof(elf_greg_t)) -+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; -+ -+typedef struct user_fpu_struct elf_fpregset_t; -+ - struct elf_siginfo - { - int si_signo; /* Signal number. */ ---- a/sysdeps/unix/sysv/linux/sys/procfs.h -+++ b/sysdeps/unix/sysv/linux/sys/procfs.h -@@ -1,115 +1,2 @@ --/* Copyright (C) 1996, 1997, 1999 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, write to the Free -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -- 02111-1307 USA. */ -- --#ifndef _SYS_PROCFS_H --#define _SYS_PROCFS_H 1 -- --/* This is somehow modelled after the file of the same name on SysVr4 -- systems. It provides a definition of the core file format for ELF -- used on Linux. */ -- --#include --#include --#include --#include --#include --#include --#include -- --__BEGIN_DECLS -- --struct elf_siginfo -- { -- int si_signo; /* Signal number. */ -- int si_code; /* Extra code. */ -- int si_errno; /* Errno. */ -- }; -- --/* Definitions to generate Intel SVR4-like core files. These mostly -- have the same names as the SVR4 types with "elf_" tacked on the -- front to prevent clashes with linux definitions, and the typedef -- forms have been avoided. This is mostly like the SVR4 structure, -- but more Linuxy, with things that Linux does not support and which -- gdb doesn't really use excluded. Fields present but not used are -- marked with "XXX". */ --struct elf_prstatus -- { --#if 0 -- long int pr_flags; /* XXX Process flags. */ -- short int pr_why; /* XXX Reason for process halt. */ -- short int pr_what; /* XXX More detailed reason. */ --#endif -- struct elf_siginfo pr_info; /* Info associated with signal. */ -- short int pr_cursig; /* Current signal. */ -- unsigned long int pr_sigpend; /* Set of pending signals. */ -- unsigned long int pr_sighold; /* Set of held signals. */ --#if 0 -- struct sigaltstack pr_altstack; /* Alternate stack info. */ -- struct sigaction pr_action; /* Signal action for current sig. */ --#endif -- __pid_t pr_pid; -- __pid_t pr_ppid; -- __pid_t pr_pgrp; -- __pid_t pr_sid; -- struct timeval pr_utime; /* User time. */ -- struct timeval pr_stime; /* System time. */ -- struct timeval pr_cutime; /* Cumulative user time. */ -- struct timeval pr_cstime; /* Cumulative system time. */ --#if 0 -- long int pr_instr; /* Current instruction. */ --#endif -- elf_gregset_t pr_reg; /* GP registers. */ -- int pr_fpvalid; /* True if math copro being used. */ -- }; -- -- --#define ELF_PRARGSZ (80) /* Number of chars for args */ -- --struct elf_prpsinfo -- { -- char pr_state; /* Numeric process state. */ -- char pr_sname; /* Char for pr_state. */ -- char pr_zomb; /* Zombie. */ -- char pr_nice; /* Nice val. */ -- unsigned long int pr_flag; /* Flags. */ -- unsigned short int pr_uid; -- unsigned short int pr_gid; -- int pr_pid, pr_ppid, pr_pgrp, pr_sid; -- /* Lots missing */ -- char pr_fname[16]; /* Filename of executable. */ -- char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ -- }; -- --/* Addresses. */ --typedef void *psaddr_t; -- --/* Register sets. Linux has different names. */ --typedef gregset_t prgregset_t; --typedef fpregset_t prfpregset_t; -- --/* We don't have any differences between processes and threads, -- therefore habe only ine PID type. */ --typedef __pid_t lwpid_t; -- -- --typedef struct elf_prstatus prstatus_t; --typedef struct elf_prpsinfo prpsinfo_t; -- --__END_DECLS -- --#endif /* sys/procfs.h */ -+/* sys/procfs.h is architecture specific. */ -+#error "This file must be supplied by every Linux architecture." - diff --git a/patches/glibc/2.7/230-alpha-atfcts.patch b/patches/glibc/2.7/230-alpha-atfcts.patch deleted file mode 100644 index 06c7d8f6..00000000 --- a/patches/glibc/2.7/230-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h 2007-08-14 06:21:09.000000000 +0300 -+++ glibc-2.7/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-23 07:05:20.000000000 +0300 -@@ -449,8 +449,7 @@ - and on Alpha just after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ - && ((!defined __sh__ && !defined __alpha__) \ -- || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__) \ -- || (__LINUX_KERNEL_VERSION >= 0x020617 && defined __alpha__)) -+ || (__LINUX_KERNEL_VERSION >= 0x020613 && defined __sh__)) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/patches/glibc/2.7/240-alpha-ptr_mangle.patch b/patches/glibc/2.7/240-alpha-ptr_mangle.patch deleted file mode 100644 index 7f228333..00000000 --- a/patches/glibc/2.7/240-alpha-ptr_mangle.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h -+++ glibc-2.7/sysdeps/unix/alpha/sysdep.h -@@ -397,42 +397,4 @@ - _sc_ret = _sc_0, _sc_err = _sc_19; \ - } - --/* Pointer mangling support. Note that tls access is slow enough that -- we don't deoptimize things by placing the pointer check value there. */ -- --#include -- --#if defined NOT_IN_libc && defined IS_IN_rtld --# ifdef __ASSEMBLER__ --# define PTR_MANGLE(dst, src, tmp) \ -- ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ -- ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ -- xor src, tmp, dst --# define PTR_MANGLE2(dst, src, tmp) \ -- xor src, tmp, dst --# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) --# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) --# else --extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; --# define PTR_MANGLE(var) \ -- (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) --# define PTR_DEMANGLE(var) PTR_MANGLE(var) --# endif --#elif defined PIC --# ifdef __ASSEMBLER__ --# define PTR_MANGLE(dst, src, tmp) \ -- ldq tmp, __pointer_chk_guard; \ -- xor src, tmp, dst --# define PTR_MANGLE2(dst, src, tmp) \ -- xor src, tmp, dst --# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) --# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) --# else --extern uintptr_t __pointer_chk_guard attribute_relro; --# define PTR_MANGLE(var) \ -- (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) --# define PTR_DEMANGLE(var) PTR_MANGLE(var) --# endif --#endif -- - #endif /* ASSEMBLER */ ---- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h -+++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h -@@ -98,4 +98,46 @@ - INTERNAL_SYSCALL1(name, err_out, nr, args); \ - }) - -+/* Pointer mangling support. Note that tls access is slow enough that -+ we don't deoptimize things by placing the pointer check value there. */ -+ -+#if defined NOT_IN_libc && defined IS_IN_rtld -+# ifdef __ASSEMBLER__ -+# define PTR_MANGLE(dst, src, tmp) \ -+ ldah tmp, __pointer_chk_guard_local($29) !gprelhigh; \ -+ ldq tmp, __pointer_chk_guard_local(tmp) !gprellow; \ -+ xor src, tmp, dst -+# define PTR_MANGLE2(dst, src, tmp) \ -+ xor src, tmp, dst -+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -+# else -+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden; -+# define PTR_MANGLE(var) \ -+ (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local) -+# define PTR_DEMANGLE(var) PTR_MANGLE(var) -+# endif -+#elif defined PIC -+# ifdef __ASSEMBLER__ -+# define PTR_MANGLE(dst, src, tmp) \ -+ ldq tmp, __pointer_chk_guard; \ -+ xor src, tmp, dst -+# define PTR_MANGLE2(dst, src, tmp) \ -+ xor src, tmp, dst -+# define PTR_DEMANGLE(dst, tmp) PTR_MANGLE(dst, dst, tmp) -+# define PTR_DEMANGLE2(dst, tmp) PTR_MANGLE2(dst, dst, tmp) -+# else -+extern uintptr_t __pointer_chk_guard attribute_relro; -+# define PTR_MANGLE(var) \ -+ (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard) -+# define PTR_DEMANGLE(var) PTR_MANGLE(var) -+# endif -+#else -+/* Pointer mangling is not yet supported for static libc on alpha. */ -+# ifndef __ASSEMBLER__ -+# define PTR_MANGLE(var) (void) (var) -+# define PTR_DEMANGLE(var) (void) (var) -+# endif -+#endif -+ - #endif /* _LINUX_ALPHA_SYSDEP_H */ diff --git a/patches/glibc/linuxthreads-2.3.6/110-alpha-cfi.patch b/patches/glibc/linuxthreads-2.3.6/110-alpha-cfi.patch new file mode 100644 index 00000000..97c152e9 --- /dev/null +++ b/patches/glibc/linuxthreads-2.3.6/110-alpha-cfi.patch @@ -0,0 +1,25 @@ +--- glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig 2008-06-19 15:31:45.000000000 +0300 ++++ glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2008-06-19 15:36:10.000000000 +0300 +@@ -54,6 +54,7 @@ + bne a3, SYSCALL_ERROR_LABEL; \ + __LABEL($pseudo_ret) \ + .subsection 2; \ ++ cfi_startproc; \ + __LABEL($pseudo_cancel) \ + subq sp, 64, sp; \ + cfi_def_cfa_offset(64); \ +@@ -84,12 +85,13 @@ + cfi_def_cfa_offset(0); \ + __LABEL($syscall_error) \ + SYSCALL_ERROR_HANDLER; \ ++ cfi_endproc; \ + .previous + + # undef PSEUDO_END + # define PSEUDO_END(sym) \ +- .subsection 2; \ + cfi_endproc; \ ++ .subsection 2; \ + .size sym, .-sym + + # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/linuxthreads-2.3.6/270-alpha-cfi.patch b/patches/glibc/linuxthreads-2.3.6/270-alpha-cfi.patch deleted file mode 100644 index 97c152e9..00000000 --- a/patches/glibc/linuxthreads-2.3.6/270-alpha-cfi.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig 2008-06-19 15:31:45.000000000 +0300 -+++ glibc-2.3.6/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h 2008-06-19 15:36:10.000000000 +0300 -@@ -54,6 +54,7 @@ - bne a3, SYSCALL_ERROR_LABEL; \ - __LABEL($pseudo_ret) \ - .subsection 2; \ -+ cfi_startproc; \ - __LABEL($pseudo_cancel) \ - subq sp, 64, sp; \ - cfi_def_cfa_offset(64); \ -@@ -84,12 +85,13 @@ - cfi_def_cfa_offset(0); \ - __LABEL($syscall_error) \ - SYSCALL_ERROR_HANDLER; \ -+ cfi_endproc; \ - .previous - - # undef PSEUDO_END - # define PSEUDO_END(sym) \ -- .subsection 2; \ - cfi_endproc; \ -+ .subsection 2; \ - .size sym, .-sym - - # define SAVE_ARGS_0 /* Nothing. */ diff --git a/patches/glibc/ports-2.6.1/110-ARM-asm_page_h.patch b/patches/glibc/ports-2.6.1/110-ARM-asm_page_h.patch new file mode 100644 index 00000000..4e882afa --- /dev/null +++ b/patches/glibc/ports-2.6.1/110-ARM-asm_page_h.patch @@ -0,0 +1,11 @@ +diff -durN glibc-ports-2.7.orig/sysdeps/unix/sysv/linux/arm/ioperm.c glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/ioperm.c +--- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/ioperm.c 2005-06-10 13:12:09.000000000 +0200 ++++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-05-18 16:19:45.000000000 +0200 +@@ -45,7 +45,6 @@ + #include + + #include +-#include + #include + + #define PATH_ARM_SYSTYPE "/etc/arm_systype" diff --git a/patches/glibc/ports-2.6.1/200-ARM-asm_page_h.patch b/patches/glibc/ports-2.6.1/200-ARM-asm_page_h.patch deleted file mode 100644 index 4e882afa..00000000 --- a/patches/glibc/ports-2.6.1/200-ARM-asm_page_h.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -durN glibc-ports-2.7.orig/sysdeps/unix/sysv/linux/arm/ioperm.c glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/ioperm.c ---- glibc-2.6.1.orig/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/ioperm.c 2005-06-10 13:12:09.000000000 +0200 -+++ glibc-2.6.1/glibc-ports-2.6.1/sysdeps/unix/sysv/linux/arm/ioperm.c 2008-05-18 16:19:45.000000000 +0200 -@@ -45,7 +45,6 @@ - #include - - #include --#include - #include - - #define PATH_ARM_SYSTYPE "/etc/arm_systype" -- cgit v1.2.3