patches: remove obsolete glibc patches

Glibc prior to 2.18, linuxthreads and ports are not supported.

Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
This commit is contained in:
Kirill K. Smirnov 2016-09-15 01:02:54 +03:00
parent 1d28793575
commit 429b3e8846
285 changed files with 0 additions and 19276 deletions

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.10.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.10.1/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.10.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.10.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:33:31.520855595 +0100
@@ -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 -urN glibc-2.10.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.10.1/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.10.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.10.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:33:31.520855595 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.10.1-orig/posix/sys/types.h glibc-2.10.1/posix/sys/types.h
--- glibc-2.10.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.10.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.10.1-orig/sunrpc/rpc/types.h glibc-2.10.1/sunrpc/rpc/types.h
--- glibc-2.10.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.10.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,16 +0,0 @@
diff -urN glibc-2.10.1-orig/manual/Makefile glibc-2.10.1/manual/Makefile
--- glibc-2.10.1-orig/manual/Makefile 2006-01-07 22:43:47.000000000 -0800
+++ glibc-2.10.1/manual/Makefile 2014-01-15 11:49:08.256982014 -0800
@@ -232,7 +232,11 @@
.PHONY: stubs
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stamp%:
+ $(make-target-directory)
+ touch $@
+
+$(objpfx)stubs ../po/manual.pot:
$(make-target-directory)
touch $@

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:33:31.520855595 +0100
@@ -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 -urN glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:33:31.520855595 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.11.1-orig/posix/sys/types.h glibc-2.11.1/posix/sys/types.h
--- glibc-2.11.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.11.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.11.1-orig/sunrpc/rpc/types.h glibc-2.11.1/sunrpc/rpc/types.h
--- glibc-2.11.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.11.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.11.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.11.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.11/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:33:31.520855595 +0100
@@ -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 -urN glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.11.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 21:10:20.000000000 +0100
+++ glibc-2.11/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:33:31.520855595 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.11-orig/posix/sys/types.h glibc-2.11/posix/sys/types.h
--- glibc-2.11-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.11/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.11-orig/sunrpc/rpc/types.h glibc-2.11/sunrpc/rpc/types.h
--- glibc-2.11-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.11/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,12 +0,0 @@
diff -urN glibc-2.11-orig/configure glibc-2.11/configure
--- glibc-2.11-orig/configure 2015-07-14 08:14:11.671891176 -0700
+++ glibc-2.11/configure 2015-07-14 09:14:10.053054117 -0700
@@ -5108,7 +5108,7 @@
ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'`
case $ac_prog_version in
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.79* | 3.[89]*)
+ 3.79* | 3.[89]* | 4.* )
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100
@@ -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 -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h
--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h
--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,15 +0,0 @@
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob_plain;f=source/base/glibc/make-3.82-fix.patch;hb=8217c32ecc2e14962847ba3d8a272eb64a3dba4f
--- glibc-2.10.1.OLD/manual/Makefile
+++ glibc-2.10.1.NEW/manual/Makefile
@@ -232,7 +232,9 @@
.PHONY: stubs
stubs: $(objpfx)stubs
endif
-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%:
+$(objpfx)stubs ../po/manual.pot:
+ touch $@
+$(objpfx)stamp%:
$(make-target-directory)
touch $@

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.12.2.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.2/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100
@@ -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 -urN glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.12.2.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.2/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.12.2-orig/posix/sys/types.h glibc-2.12.2/posix/sys/types.h
--- glibc-2.12.2-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.2/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.12.2-orig/sunrpc/rpc/types.h glibc-2.12.2/sunrpc/rpc/types.h
--- glibc-2.12.2-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.2/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,34 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
* nptl/sysdeps/pthread/pt-initfini.c: Ditto.
diff -urN glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.12.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.1/nptl/sysdeps/pthread/pt-initfini.c 2010-12-30 11:36:19.858708534 +0100
@@ -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 -urN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-10-30 18:17:08.000000000 +0100
+++ glibc-2.12.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-12-30 11:36:19.858708534 +0100
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,28 +0,0 @@
diff -urN glibc-2.12.1-orig/posix/sys/types.h glibc-2.12.1/posix/sys/types.h
--- glibc-2.12.1-orig/posix/sys/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.1/posix/sys/types.h 2011-03-29 14:16:00.374064708 +0200
@@ -114,7 +114,10 @@
#ifdef __USE_BSD
# ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
# endif
#endif
diff -urN glibc-2.12.1-orig/sunrpc/rpc/types.h glibc-2.12.1/sunrpc/rpc/types.h
--- glibc-2.12.1-orig/sunrpc/rpc/types.h 2010-12-13 11:47:26.000000000 +0100
+++ glibc-2.12.1/sunrpc/rpc/types.h 2011-03-29 14:16:32.988910439 +0200
@@ -80,7 +80,10 @@
#endif
#ifndef __daddr_t_defined
typedef __daddr_t daddr_t;
+# if ! defined(caddr_t) && ! defined(__caddr_t_defined)
typedef __caddr_t caddr_t;
+# define __caddr_t_defined
+# endif
# define __daddr_t_defined
#endif

View File

@ -1,20 +0,0 @@
Prevent erroneous inline optimization of initfini.s on PowerPC64.
The problem and the fix was reported there:
http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html
Git commit:
commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6
Author: Ryan S. Arnold <rsa@us.ibm.com>
Date: Tue May 3 17:26:17 2011 -0500
--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800
+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800
@@ -31,7 +31,7 @@
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
endif

View File

@ -1,628 +0,0 @@
This patch fixes another configure test issue when bootstrapping.
sysdeps/i386/configure.in uses the obsolete AC_HEADER_CHECK macro to
test for cpuid.h, and that macro tries to include various other
standard headers (which come from the library, unlike cpuid.h which
comes from the compiler, so aren't available when bootstrapping) in
the test code it compiles. This patch changes the code to use
AC_CHECK_HEADER, with the fourth argument used to prevent any default
includes being used in the test.
Tested x86_64 (native).
2012-03-07 Joseph Myers <joseph@codesourcery.com>
* sysdeps/i386/configure.in (cpuid.h): Use AC_CHECK_HEADER with no
default includes instead of AC_HEADER_CHECK.
* sysdeps/i386/configure: Regenerated.
Origin: http://sourceware.org/ml/libc-alpha/2012-03/msg00177.html
diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure glibc-2.14.1/sysdeps/i386/configure
--- glibc-2.14.1.orig/sysdeps/i386/configure 2011-10-07 20:48:55.000000000 +1100
+++ glibc-2.14.1/sysdeps/i386/configure 2012-07-25 01:23:11.799118927 +1000
@@ -16,23 +16,6 @@
as_fn_set_status $1
exit $1
} # as_fn_exit
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
@@ -89,6 +72,10 @@
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -97,42 +84,6 @@
exit
}
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
# ac_fn_c_try_compile LINENO
# --------------------------
@@ -167,177 +118,11 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { { ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
# -------------------------------------------------------
# Tests whether HEADER exists and can be compiled using the include files in
@@ -347,7 +132,7 @@
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -365,275 +150,16 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
# Local configure fragment for sysdeps/i386.
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */
"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-ac_fn_c_check_header_mongrel "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "$ac_includes_default"
-if test "x$ac_cv_header_cpuid_h" = x""yes; then :
+if test "x$ac_cv_header_cpuid_h" = xyes; then :
else
as_fn_error $? "gcc must provide the <cpuid.h> header" "$LINENO" 5
@@ -643,7 +169,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5
$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; }
-if test "${libc_cv_cpp_asm_debuginfo+set}" = set; then :
+if ${libc_cv_cpp_asm_debuginfo+:} false; then :
$as_echo_n "(cached) " >&6
else
cat > conftest.S <<EOF
@@ -693,7 +219,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5
$as_echo_n "checking for SSE4 support... " >&6; }
-if test "${libc_cv_cc_sse4+set}" = set; then :
+if ${libc_cv_cc_sse4+:} false; then :
$as_echo_n "(cached) " >&6
else
if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null'
@@ -716,7 +242,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler -mtune=i686 support" >&5
$as_echo_n "checking for assembler -mtune=i686 support... " >&6; }
-if test "${libc_cv_as_i686+set}" = set; then :
+if ${libc_cv_as_i686+:} false; then :
$as_echo_n "(cached) " >&6
else
if { ac_try='${CC-cc} -Wa,-mtune=i686 -xc /dev/null -S -o /dev/null'
@@ -735,7 +261,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5
$as_echo_n "checking for AVX support... " >&6; }
-if test "${libc_cv_cc_avx+set}" = set; then :
+if ${libc_cv_cc_avx+:} false; then :
$as_echo_n "(cached) " >&6
else
if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null'
@@ -758,7 +284,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
$as_echo_n "checking for -mno-vzeroupper support... " >&6; }
-if test "${libc_cv_cc_novzeroupper+set}" = set; then :
+if ${libc_cv_cc_novzeroupper+:} false; then :
$as_echo_n "(cached) " >&6
else
if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null'
diff -Nur glibc-2.14.1.orig/sysdeps/i386/configure.in glibc-2.14.1/sysdeps/i386/configure.in
--- glibc-2.14.1.orig/sysdeps/i386/configure.in 2011-10-07 20:48:55.000000000 +1100
+++ glibc-2.14.1/sysdeps/i386/configure.in 2012-07-25 01:00:49.345025022 +1000
@@ -1,8 +1,9 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/i386.
-AC_HEADER_CHECK([cpuid.h], ,
- [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])])
+AC_CHECK_HEADER([cpuid.h], ,
+ [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
+ [/* No default includes. */])
AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
libc_cv_cpp_asm_debuginfo, [dnl

View File

@ -1,50 +0,0 @@
Submitted By: Matt Burgess <matthew_at_linuxfromscratch_dot_org>
Date: 2010-04-18
Initial Package Version: 2.11.1
Upstream Status: Not Submitted
Origin: http://www.eglibc.org/archives/patches/msg00073.html
Description: Fixes the following build problem with GCC-4.5.0:
/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
--- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000
+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000
@@ -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 -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h
--- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000
+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000
@@ -29,6 +29,10 @@
#include <dl-sysdep.h>
#include <tls.h>
+#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

View File

@ -1,20 +0,0 @@
Prevent erroneous inline optimization of initfini.s on PowerPC64.
The problem and the fix was reported there:
http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html
Git commit:
commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6
Author: Ryan S. Arnold <rsa@us.ibm.com>
Date: Tue May 3 17:26:17 2011 -0500
--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800
+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800
@@ -31,7 +31,7 @@
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
endif

View File

@ -1,20 +0,0 @@
Prevent erroneous inline optimization of initfini.s on PowerPC64.
The problem and the fix was reported there:
http://sourceware.org/ml/libc-alpha/2012-01/msg00195.html
Git commit:
commit 1fe05ea95e1460e5e1cf1568a8ce3982f0f02de6
Author: Ryan S. Arnold <rsa@us.ibm.com>
Date: Tue May 3 17:26:17 2011 -0500
--- glibc.orig/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:06.713568781 -0800
+++ glibc/sysdeps/powerpc/powerpc64/Makefile 2012-12-22 19:10:50.318605517 -0800
@@ -31,7 +31,7 @@
ifneq ($(elf),no)
# The initfini generation code doesn't work in the presence of -fPIC, so
# we use -fpic instead which is much better.
-CFLAGS-initfini.s += -fpic -O1
+CFLAGS-initfini.s += -fpic -O1 -fno-inline
endif
endif

View File

@ -1,222 +0,0 @@
From 536ae0651b015b1f6140ec01775d4deaacf12c0c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 21 Jan 2013 17:41:28 +0100
Subject: [PATCH] Fix parsing of numeric hosts in gethostbyname_r
Ported from master, fixes CVE-2015-0235.
---
nss/Makefile | 2 -
nss/digits_dots.c | 73 +++++++++++++------------------------------------
nss/getXXbyYY_r.c | 3 ++
nss/test-digits-dots.c | 38 +++++++++++++++++++++++++
4 files changed, 62 insertions(+), 54 deletions(-)
create mode 100644 nss/test-digits-dots.c
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -38,7 +38,7 @@ install-bin := getent makedb
makedb-modules = xmalloc hash-string
extra-objs += $(makedb-modules:=.o)
-tests = test-netdb tst-nss-test1
+tests = test-netdb tst-nss-test1 test-digits-dots
xtests = bug-erange
include ../Makeconfig
--- a/nss/digits_dots.c
+++ b/nss/digits_dots.c
@@ -46,7 +46,10 @@ __nss_hostname_digits_dots (const char *
{
if (h_errnop)
*h_errnop = NETDB_INTERNAL;
- *result = NULL;
+ if (buffer_size == NULL)
+ *status = NSS_STATUS_TRYAGAIN;
+ else
+ *result = NULL;
return -1;
}
@@ -83,14 +86,16 @@ __nss_hostname_digits_dots (const char *
}
size_needed = (sizeof (*host_addr)
- + sizeof (*h_addr_ptrs) + strlen (name) + 1);
+ + sizeof (*h_addr_ptrs)
+ + sizeof (*h_alias_ptr) + strlen (name) + 1);
if (buffer_size == NULL)
{
if (buflen < size_needed)
{
+ *status = NSS_STATUS_TRYAGAIN;
if (h_errnop != NULL)
- *h_errnop = TRY_AGAIN;
+ *h_errnop = NETDB_INTERNAL;
__set_errno (ERANGE);
goto done;
}
@@ -109,7 +114,7 @@ __nss_hostname_digits_dots (const char *
*buffer_size = 0;
__set_errno (save);
if (h_errnop != NULL)
- *h_errnop = TRY_AGAIN;
+ *h_errnop = NETDB_INTERNAL;
*result = NULL;
goto done;
}
@@ -149,7 +154,9 @@ __nss_hostname_digits_dots (const char *
if (! ok)
{
*h_errnop = HOST_NOT_FOUND;
- if (buffer_size)
+ if (buffer_size == NULL)
+ *status = NSS_STATUS_NOTFOUND;
+ else
*result = NULL;
goto done;
}
@@ -190,7 +197,7 @@ __nss_hostname_digits_dots (const char *
if (buffer_size == NULL)
*status = NSS_STATUS_SUCCESS;
else
- *result = resbuf;
+ *result = resbuf;
goto done;
}
@@ -201,15 +208,6 @@ __nss_hostname_digits_dots (const char *
if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
{
- const char *cp;
- char *hostname;
- typedef unsigned char host_addr_t[16];
- host_addr_t *host_addr;
- typedef char *host_addr_list_t[2];
- host_addr_list_t *h_addr_ptrs;
- size_t size_needed;
- int addr_size;
-
switch (af)
{
default:
@@ -225,7 +223,10 @@ __nss_hostname_digits_dots (const char *
/* This is not possible. We cannot represent an IPv6 address
in an `struct in_addr' variable. */
*h_errnop = HOST_NOT_FOUND;
- *result = NULL;
+ if (buffer_size == NULL)
+ *status = NSS_STATUS_NOTFOUND;
+ else
+ *result = NULL;
goto done;
case AF_INET6:
@@ -233,42 +234,6 @@ __nss_hostname_digits_dots (const char *
break;
}
- size_needed = (sizeof (*host_addr)
- + sizeof (*h_addr_ptrs) + strlen (name) + 1);
-
- if (buffer_size == NULL && buflen < size_needed)
- {
- if (h_errnop != NULL)
- *h_errnop = TRY_AGAIN;
- __set_errno (ERANGE);
- goto done;
- }
- else if (buffer_size != NULL && *buffer_size < size_needed)
- {
- char *new_buf;
- *buffer_size = size_needed;
- new_buf = realloc (*buffer, *buffer_size);
-
- if (new_buf == NULL)
- {
- save = errno;
- free (*buffer);
- __set_errno (save);
- *buffer = NULL;
- *buffer_size = 0;
- *result = NULL;
- goto done;
- }
- *buffer = new_buf;
- }
-
- memset (*buffer, '\0', size_needed);
-
- host_addr = (host_addr_t *) *buffer;
- h_addr_ptrs = (host_addr_list_t *)
- ((char *) host_addr + sizeof (*host_addr));
- hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs);
-
for (cp = name;; ++cp)
{
if (!*cp)
@@ -281,7 +246,9 @@ __nss_hostname_digits_dots (const char *
if (inet_pton (AF_INET6, name, host_addr) <= 0)
{
*h_errnop = HOST_NOT_FOUND;
- if (buffer_size)
+ if (buffer_size == NULL)
+ *status = NSS_STATUS_NOTFOUND;
+ else
*result = NULL;
goto done;
}
--- /dev/null
+++ b/nss/test-digits-dots.c
@@ -0,0 +1,38 @@
+/* Copyright (C) 2013 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+/* Testcase for BZ #15014 */
+
+#include <stdlib.h>
+#include <netdb.h>
+#include <errno.h>
+
+static int
+do_test (void)
+{
+ char buf[32];
+ struct hostent *result = NULL;
+ struct hostent ret;
+ int h_err = 0;
+ int err;
+
+ err = gethostbyname_r ("1.2.3.4", &ret, buf, sizeof (buf), &result, &h_err);
+ return err == ERANGE && h_err == NETDB_INTERNAL ? EXIT_SUCCESS : EXIT_FAILURE;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -179,6 +179,9 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, L
case -1:
return errno;
case 1:
+#ifdef NEED_H_ERRNO
+ any_service = true;
+#endif
goto done;
}
#endif

View File

@ -1,54 +0,0 @@
From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001
From: Joseph Myers <joseph@codesourcery.com>
Date: Tue, 20 May 2014 21:27:13 +0000
Subject: [PATCH] Fix ARM build with GCC trunk.
sysdeps/unix/sysv/linux/arm/unwind-resume.c and
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static
variables that are written in C code but only read from toplevel asms.
Current GCC trunk now optimizes away such apparently write-only static
variables, so causing a build failure. This patch marks those
variables with __attribute_used__ to avoid that optimization.
Tested that this fixes the build for ARM.
* sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
(libgcc_s_resume): Use __attribute_used__.
* sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume):
Likewise.
---
sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++-
sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
index 6ccd9b4..660d148 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
@@ -22,7 +22,8 @@
#include <pthreadP.h>
static void *libgcc_s_handle;
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
+ __attribute_used__;
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c
index bff3e2b..1f1eb71 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
@@ -20,7 +20,8 @@
#include <stdio.h>
#include <unwind.h>
-static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc)
+ __attribute_used__;
static _Unwind_Reason_Code (*libgcc_s_personality)
(_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
--
1.9.4

View File

@ -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 <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
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 <rpjday@mindspring.com>

View File

@ -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...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- 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 </dev/null 2>&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 <rpjday@mindspring.com>

View File

@ -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 <rpjday@mindspring.com>

View File

@ -1,38 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* 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 <dl-sysdep.h>
#include <tls.h>
+#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*/");

View File

@ -1,18 +0,0 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
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

View File

@ -1,26 +0,0 @@
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <asm/page.h>
#include <asm/reg.h>
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)

View File

@ -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. */

View File

@ -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 <vapier@gentoo.org>
* 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 <msg00012/signature.asc>*
/Description:/ This is a digitally signed message part.
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__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."

View File

@ -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. */

View File

@ -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

View File

@ -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 <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
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 <rpjday@mindspring.com>

View File

@ -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...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- 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 </dev/null 2>&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 <rpjday@mindspring.com>

View File

@ -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 <rpjday@mindspring.com>

View File

@ -1,38 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* 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 <dl-sysdep.h>
#include <tls.h>
+#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*/");

View File

@ -1,18 +0,0 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
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

View File

@ -1,26 +0,0 @@
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <asm/page.h>
#include <asm/reg.h>
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)

View File

@ -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. */

View File

@ -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 <vapier@gentoo.org>
* 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 <msg00012/signature.asc>*
/Description:/ This is a digitally signed message part.
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__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."

View File

@ -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. */

View File

@ -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

View File

@ -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 <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
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 <rpjday@mindspring.com>

View File

@ -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...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- 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 </dev/null 2>&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 <rpjday@mindspring.com>

View File

@ -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 <rpjday@mindspring.com>

View File

@ -1,38 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* 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 <dl-sysdep.h>
#include <tls.h>
+#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*/");

View File

@ -1,18 +0,0 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
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

View File

@ -1,26 +0,0 @@
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <asm/page.h>
#include <asm/reg.h>
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)

View File

@ -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. */

View File

@ -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 <vapier@gentoo.org>
* 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 <msg00012/signature.asc>*
/Description:/ This is a digitally signed message part.
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__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."

View File

@ -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.6.1.orig/configure.in glibc-2.6.1/configure.in
--- glibc-2.6.1.orig/configure.in 2007-06-08 05:16:36.000000000 +0200
+++ glibc-2.6.1/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.6.1.orig/configure glibc-2.6.1/configure
--- glibc-2.6.1.orig/configure 2008-06-24 18:35:34.000000000 +0200
+++ glibc-2.6.1/configure 2008-06-24 18:38:46.000000000 +0200
@@ -4562,8 +4562,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` &&

View File

@ -1,11 +0,0 @@
--- glibc-2.6.1/sysdeps/unix/sysv/linux/kernel-features.h 2006-07-29 07:43:27.000000000 +0300
+++ glibc-2.6.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-26 08:45:06.000000000 +0300
@@ -445,7 +445,7 @@
/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the
kernel versions are advertised we can only rely on 2.6.17 to have
the code. */
-#if __LINUX_KERNEL_VERSION >= 0x020611
+#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __alpha__
# define __ASSUME_ATFCTS 1
#endif

View File

@ -1,103 +0,0 @@
--- glibc-2.6.1.orig/sysdeps/unix/alpha/sysdep.h
+++ glibc-2.6.1/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 <stdint.h>
-
-#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.6.1.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ glibc-2.6.1/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -29,6 +29,8 @@
/* There is some commonality. */
#include <sysdeps/unix/alpha/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
@@ -96,4 +96,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 */

View File

@ -1,237 +0,0 @@
Patch provided bu Ioannis E. VENETIS
Using:
typedef int lll_lock_t;
creates problems during compilation. Since glibc 2.7 got rid of the 'typedef' and
uses directly 'int', we do the same here.
diff -Naur glibc-2.6.1/nptl/allocatestack.c glibc-2.6.1.new/nptl/allocatestack.c
--- glibc-2.6.1/nptl/allocatestack.c 2006-08-23 20:39:47.000000000 +0300
+++ glibc-2.6.1.new/nptl/allocatestack.c 2008-07-27 20:56:19.000000000 +0300
@@ -103,7 +103,7 @@
static size_t stack_cache_actsize;
/* Mutex protecting this variable. */
-static lll_lock_t stack_cache_lock = LLL_LOCK_INITIALIZER;
+static int stack_cache_lock = LLL_LOCK_INITIALIZER;
/* List of queued stack frames. */
static LIST_HEAD (stack_cache);
diff -Naur glibc-2.6.1/nptl/descr.h glibc-2.6.1.new/nptl/descr.h
--- glibc-2.6.1/nptl/descr.h 2006-09-24 20:10:55.000000000 +0300
+++ glibc-2.6.1.new/nptl/descr.h 2008-07-27 20:54:41.000000000 +0300
@@ -305,10 +305,10 @@
int parent_cancelhandling;
/* Lock to synchronize access to the descriptor. */
- lll_lock_t lock;
+ int lock;
/* Lock for synchronizing setxid calls. */
- lll_lock_t setxid_futex;
+ int setxid_futex;
#if HP_TIMING_AVAIL
/* Offset of the CPU clock at start thread start time. */
diff -Naur glibc-2.6.1/nptl/pthread_attr_init.c glibc-2.6.1.new/nptl/pthread_attr_init.c
--- glibc-2.6.1/nptl/pthread_attr_init.c 2004-03-19 01:56:31.000000000 +0200
+++ glibc-2.6.1.new/nptl/pthread_attr_init.c 2008-07-27 20:55:03.000000000 +0300
@@ -27,7 +27,7 @@
struct pthread_attr *__attr_list;
-lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER;
+int __attr_list_lock = LLL_LOCK_INITIALIZER;
int
diff -Naur glibc-2.6.1/nptl/pthreadP.h glibc-2.6.1.new/nptl/pthreadP.h
--- glibc-2.6.1/nptl/pthreadP.h 2006-08-23 20:42:52.000000000 +0300
+++ glibc-2.6.1.new/nptl/pthreadP.h 2008-07-27 20:56:40.000000000 +0300
@@ -143,7 +143,7 @@
/* Attribute handling. */
extern struct pthread_attr *__attr_list attribute_hidden;
-extern lll_lock_t __attr_list_lock attribute_hidden;
+extern int __attr_list_lock attribute_hidden;
/* First available RT signal. */
extern int __current_sigrtmin attribute_hidden;
diff -Naur glibc-2.6.1/nptl/semaphoreP.h glibc-2.6.1.new/nptl/semaphoreP.h
--- glibc-2.6.1/nptl/semaphoreP.h 2006-05-11 20:08:37.000000000 +0300
+++ glibc-2.6.1.new/nptl/semaphoreP.h 2008-07-27 20:55:42.000000000 +0300
@@ -48,7 +48,7 @@
extern void *__sem_mappings attribute_hidden;
/* Lock to protect the search tree. */
-extern lll_lock_t __sem_mappings_lock attribute_hidden;
+extern int __sem_mappings_lock attribute_hidden;
/* Initializer for mountpoint. */
diff -Naur glibc-2.6.1/nptl/sem_open.c glibc-2.6.1.new/nptl/sem_open.c
--- glibc-2.6.1/nptl/sem_open.c 2006-05-11 20:09:43.000000000 +0300
+++ glibc-2.6.1.new/nptl/sem_open.c 2008-07-27 20:55:22.000000000 +0300
@@ -147,7 +147,7 @@
void *__sem_mappings attribute_hidden;
/* Lock to protect the search tree. */
-lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
+int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
/* Search for existing mapping and if possible add the one provided. */
diff -Naur glibc-2.6.1/nptl/pthread_once.c glibc-2.6.1.new/nptl/pthread_once.c
--- glibc-2.6.1/nptl/pthread_once.c 2002-11-27 00:50:31.000000000 +0200
+++ glibc-2.6.1.new/nptl/pthread_once.c 2008-07-27 20:57:12.000000000 +0300
@@ -22,7 +22,7 @@
-static lll_lock_t once_lock = LLL_LOCK_INITIALIZER;
+static int once_lock = LLL_LOCK_INITIALIZER;
int
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2008-07-27 20:59:15.000000000 +0300
@@ -230,9 +230,6 @@
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-21 01:37:13.000000000 +0200
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.c 2008-07-27 21:00:01.000000000 +0300
@@ -183,7 +183,7 @@
}
/* Initialize the fork lock. */
- __fork_lock = (lll_lock_t) LLL_LOCK_INITIALIZER;
+ __fork_lock = (int) LLL_LOCK_INITIALIZER;
}
else
{
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 23:19:43.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/fork.h 2008-07-27 20:58:49.000000000 +0300
@@ -26,7 +26,7 @@
extern unsigned long int *__fork_generation_pointer attribute_hidden;
/* Lock to protect allocation and deallocation of fork handlers. */
-extern lll_lock_t __fork_lock attribute_hidden;
+extern int __fork_lock attribute_hidden;
/* Elements of the fork handler lists. */
struct fork_handler
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 17:44:25.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2008-07-27 21:00:19.000000000 +0300
@@ -436,9 +436,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2008-07-27 20:58:16.000000000 +0300
@@ -223,9 +223,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* Initializers for lock. */
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2008-07-27 21:00:36.000000000 +0300
@@ -254,9 +254,6 @@
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2005-12-22 00:17:21.000000000 +0200
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2008-07-27 21:00:55.000000000 +0300
@@ -24,7 +24,7 @@
/* Lock to protect allocation and deallocation of fork handlers. */
-lll_lock_t __fork_lock = LLL_LOCK_INITIALIZER;
+int __fork_lock = LLL_LOCK_INITIALIZER;
/* Number of pre-allocated handler entries. */
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2008-07-27 21:01:14.000000000 +0300
@@ -309,9 +309,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2008-07-27 20:58:00.000000000 +0300
@@ -278,9 +278,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2008-07-27 20:59:39.000000000 +0300
@@ -237,9 +237,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* Initializers for lock. */
diff -Naur glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
--- glibc-2.6.1/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 17:45:34.000000000 +0300
+++ glibc-2.6.1.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2008-07-27 20:58:33.000000000 +0300
@@ -446,9 +446,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)

View File

@ -1,65 +0,0 @@
On 20090111.1151+0100, Thomas Jourdan <tjourdan@neuf.fr> wrote:
I'm still working on the solaris port an I have the same issue here.
While trying to build the i686-nptl-linux-gnu toolchain under
OpenSolaris, the problems appears during the make install rule of the
libc function.
The problem is that solaris tries to execute ld-linux.so.2, which is an
elf 32 bits dyn lib, and it fails with a memory fault, not a "cannot
execute binary file". Hence the build stops on this error.
And on 20090111.1339+0100, he replied with:
After digging a little, the problem comes from the
glibc-2.6.1/posix/Makefile. It has been solved starting from glibc 2.7
so I extracted a patch for glibc 2.6.1.
--- glibc-2.6.1/posix/Makefile 2007-04-04 01:28:20.000000000 +0200
+++ glibc-2.7/posix/Makefile 2007-09-12 01:57:22.000000000 +0200
@@ -98,7 +98,7 @@
endif
others := getconf
install-bin := getconf
-install-others := $(inst_libexecdir)/getconf
+install-others-programs := $(inst_libexecdir)/getconf
before-compile := testcases.h ptestcases.h
@@ -110,7 +110,7 @@
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
- tst-vfork3-mem tst-vfork3.mtrace
+ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
include ../Rules
@@ -291,12 +291,20 @@
$(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
-$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
+$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
+ $(objpfx)getconf.speclist FORCE
$(addprefix $(..)./scripts/mkinstalldirs ,\
$(filter-out $(wildcard $@),$@))
- for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< \
- _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
- $(INSTALL_PROGRAM) $< $@/$$spec.new; \
- mv -f $@/$$spec.new $@/$$spec; \
- done
+ while read spec; do \
+ ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
+ mv -f $@/$$spec.new $@/$$spec; \
+ done < $(objpfx)getconf.speclist
+
+$(objpfx)getconf.speclist: $(objpfx)getconf
+ifeq (no,$(cross-compiling))
+ LC_ALL=C GETCONF_DIR=/dev/null \
+ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
+else
+ > $@.new
+endif
+ mv -f $@.new $@

View File

@ -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 <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
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 <rpjday@mindspring.com>

View File

@ -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...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
--- 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 </dev/null 2>&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 <rpjday@mindspring.com>

View File

@ -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 <rpjday@mindspring.com>

View File

@ -1,38 +0,0 @@
2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
* 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 <dl-sysdep.h>
#include <tls.h>
+#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*/");

View File

@ -1,18 +0,0 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
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

View File

@ -1,26 +0,0 @@
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <asm/page.h>
#include <asm/reg.h>
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)

View File

@ -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. */

View File

@ -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 <vapier@gentoo.org>
* 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 <msg00012/signature.asc>*
/Description:/ This is a digitally signed message part.
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__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."

View File

@ -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.6.orig/configure.in glibc-2.6/configure.in
--- glibc-2.6.orig/configure.in 2007-06-08 05:16:36.000000000 +0200
+++ glibc-2.6/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.6.orig/configure glibc-2.6/configure
--- glibc-2.6.orig/configure 2008-06-24 18:35:34.000000000 +0200
+++ glibc-2.6/configure 2008-06-24 18:38:46.000000000 +0200
@@ -4562,8 +4562,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` &&

View File

@ -1,11 +0,0 @@
--- glibc-2.6/sysdeps/unix/sysv/linux/kernel-features.h 2006-07-29 07:43:27.000000000 +0300
+++ glibc-2.6/sysdeps/unix/sysv/linux/kernel-features.h.new 2008-07-26 08:45:06.000000000 +0300
@@ -445,7 +445,7 @@
/* The *at syscalls were introduced just after 2.6.16-rc1. Due to the way the
kernel versions are advertised we can only rely on 2.6.17 to have
the code. */
-#if __LINUX_KERNEL_VERSION >= 0x020611
+#if __LINUX_KERNEL_VERSION >= 0x020611 && !defined __alpha__
# define __ASSUME_ATFCTS 1
#endif

View File

@ -1,103 +0,0 @@
--- glibc-2.6.orig/sysdeps/unix/alpha/sysdep.h
+++ glibc-2.6/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 <stdint.h>
-
-#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.6.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ glibc-2.6/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -29,6 +29,8 @@
/* There is some commonality. */
#include <sysdeps/unix/alpha/sysdep.h>
+#include <tls.h>
+
/* For Linux we can use the system call table in the header file
/usr/include/asm/unistd.h
of the kernel. But these symbols do not follow the SYS_* syntax
@@ -96,4 +96,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 */

View File

@ -1,237 +0,0 @@
Patch provided bu Ioannis E. VENETIS
Using:
typedef int lll_lock_t;
creates problems during compilation. Since glibc 2.7 got rid of the 'typedef' and
uses directly 'int', we do the same here.
diff -Naur glibc-2.6/nptl/allocatestack.c glibc-2.6.new/nptl/allocatestack.c
--- glibc-2.6/nptl/allocatestack.c 2006-08-23 20:39:47.000000000 +0300
+++ glibc-2.6.new/nptl/allocatestack.c 2008-07-27 20:56:19.000000000 +0300
@@ -103,7 +103,7 @@
static size_t stack_cache_actsize;
/* Mutex protecting this variable. */
-static lll_lock_t stack_cache_lock = LLL_LOCK_INITIALIZER;
+static int stack_cache_lock = LLL_LOCK_INITIALIZER;
/* List of queued stack frames. */
static LIST_HEAD (stack_cache);
diff -Naur glibc-2.6/nptl/descr.h glibc-2.6.new/nptl/descr.h
--- glibc-2.6/nptl/descr.h 2006-09-24 20:10:55.000000000 +0300
+++ glibc-2.6.new/nptl/descr.h 2008-07-27 20:54:41.000000000 +0300
@@ -304,10 +304,10 @@
int parent_cancelhandling;
/* Lock to synchronize access to the descriptor. */
- lll_lock_t lock;
+ int lock;
/* Lock for synchronizing setxid calls. */
- lll_lock_t setxid_futex;
+ int setxid_futex;
#if HP_TIMING_AVAIL
/* Offset of the CPU clock at start thread start time. */
diff -Naur glibc-2.6/nptl/pthread_attr_init.c glibc-2.6.new/nptl/pthread_attr_init.c
--- glibc-2.6/nptl/pthread_attr_init.c 2004-03-19 01:56:31.000000000 +0200
+++ glibc-2.6.new/nptl/pthread_attr_init.c 2008-07-27 20:55:03.000000000 +0300
@@ -27,7 +27,7 @@
struct pthread_attr *__attr_list;
-lll_lock_t __attr_list_lock = LLL_LOCK_INITIALIZER;
+int __attr_list_lock = LLL_LOCK_INITIALIZER;
int
diff -Naur glibc-2.6/nptl/pthreadP.h glibc-2.6.new/nptl/pthreadP.h
--- glibc-2.6/nptl/pthreadP.h 2006-08-23 20:42:52.000000000 +0300
+++ glibc-2.6.new/nptl/pthreadP.h 2008-07-27 20:56:40.000000000 +0300
@@ -143,7 +143,7 @@
/* Attribute handling. */
extern struct pthread_attr *__attr_list attribute_hidden;
-extern lll_lock_t __attr_list_lock attribute_hidden;
+extern int __attr_list_lock attribute_hidden;
/* First available RT signal. */
extern int __current_sigrtmin attribute_hidden;
diff -Naur glibc-2.6/nptl/semaphoreP.h glibc-2.6.new/nptl/semaphoreP.h
--- glibc-2.6/nptl/semaphoreP.h 2006-05-11 20:08:37.000000000 +0300
+++ glibc-2.6.new/nptl/semaphoreP.h 2008-07-27 20:55:42.000000000 +0300
@@ -48,7 +48,7 @@
extern void *__sem_mappings attribute_hidden;
/* Lock to protect the search tree. */
-extern lll_lock_t __sem_mappings_lock attribute_hidden;
+extern int __sem_mappings_lock attribute_hidden;
/* Initializer for mountpoint. */
diff -Naur glibc-2.6/nptl/sem_open.c glibc-2.6.new/nptl/sem_open.c
--- glibc-2.6/nptl/sem_open.c 2006-05-11 20:09:43.000000000 +0300
+++ glibc-2.6.new/nptl/sem_open.c 2008-07-27 20:55:22.000000000 +0300
@@ -147,7 +147,7 @@
void *__sem_mappings attribute_hidden;
/* Lock to protect the search tree. */
-lll_lock_t __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
+int __sem_mappings_lock attribute_hidden = LLL_LOCK_INITIALIZER;
/* Search for existing mapping and if possible add the one provided. */
diff -Naur glibc-2.6/nptl/pthread_once.c glibc-2.6.new/nptl/pthread_once.c
--- glibc-2.6/nptl/pthread_once.c 2002-11-27 00:50:31.000000000 +0200
+++ glibc-2.6.new/nptl/pthread_once.c 2008-07-27 20:57:12.000000000 +0300
@@ -22,7 +22,7 @@
-static lll_lock_t once_lock = LLL_LOCK_INITIALIZER;
+static int once_lock = LLL_LOCK_INITIALIZER;
int
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/alpha/lowlevellock.h 2008-07-27 20:59:15.000000000 +0300
@@ -230,9 +230,6 @@
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.c glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.c
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.c 2003-12-21 01:37:13.000000000 +0200
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.c 2008-07-27 21:00:01.000000000 +0300
@@ -183,7 +183,7 @@
}
/* Initialize the fork lock. */
- __fork_lock = (lll_lock_t) LLL_LOCK_INITIALIZER;
+ __fork_lock = (int) LLL_LOCK_INITIALIZER;
}
else
{
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/fork.h 2006-05-15 23:19:43.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/fork.h 2008-07-27 20:58:49.000000000 +0300
@@ -26,7 +26,7 @@
extern unsigned long int *__fork_generation_pointer attribute_hidden;
/* Lock to protect allocation and deallocation of fork handlers. */
-extern lll_lock_t __fork_lock attribute_hidden;
+extern int __fork_lock attribute_hidden;
/* Elements of the fork handler lists. */
struct fork_handler
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2006-09-05 17:44:25.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h 2008-07-27 21:00:19.000000000 +0300
@@ -436,9 +436,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/ia64/lowlevellock.h 2008-07-27 20:58:16.000000000 +0300
@@ -223,9 +223,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* Initializers for lock. */
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/powerpc/lowlevellock.h 2008-07-27 21:00:36.000000000 +0300
@@ -254,9 +254,6 @@
/* Our internal lock implementation is identical to the binary-compatible
mutex implementation. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/register-atfork.c glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2005-12-22 00:17:21.000000000 +0200
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/register-atfork.c 2008-07-27 21:00:55.000000000 +0300
@@ -24,7 +24,7 @@
/* Lock to protect allocation and deallocation of fork handlers. */
-lll_lock_t __fork_lock = LLL_LOCK_INITIALIZER;
+int __fork_lock = LLL_LOCK_INITIALIZER;
/* Number of pre-allocated handler entries. */
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2006-07-29 08:06:07.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h 2008-07-27 21:01:14.000000000 +0300
@@ -309,9 +309,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h 2008-07-27 20:58:00.000000000 +0300
@@ -278,9 +278,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2006-07-29 08:06:06.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h 2008-07-27 20:59:39.000000000 +0300
@@ -237,9 +237,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. We can use the lll_mutex_*. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
/* Initializers for lock. */
diff -Naur glibc-2.6/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
--- glibc-2.6/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2006-09-05 17:45:34.000000000 +0300
+++ glibc-2.6.new/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h 2008-07-27 20:58:33.000000000 +0300
@@ -446,9 +446,6 @@
/* We have a separate internal lock implementation which is not tied
to binary compatibility. */
-/* Type for lock object. */
-typedef int lll_lock_t;
-
/* Initializers for lock. */
#define LLL_LOCK_INITIALIZER (0)
#define LLL_LOCK_INITIALIZER_LOCKED (1)

View File

@ -1,65 +0,0 @@
On 20090111.1151+0100, Thomas Jourdan <tjourdan@neuf.fr> wrote:
I'm still working on the solaris port an I have the same issue here.
While trying to build the i686-nptl-linux-gnu toolchain under
OpenSolaris, the problems appears during the make install rule of the
libc function.
The problem is that solaris tries to execute ld-linux.so.2, which is an
elf 32 bits dyn lib, and it fails with a memory fault, not a "cannot
execute binary file". Hence the build stops on this error.
And on 20090111.1339+0100, he replied with:
After digging a little, the problem comes from the
glibc-2.6.1/posix/Makefile. It has been solved starting from glibc 2.7
so I extracted a patch for glibc 2.6.1.
--- glibc-2.6.1/posix/Makefile 2007-04-04 01:28:20.000000000 +0200
+++ glibc-2.7/posix/Makefile 2007-09-12 01:57:22.000000000 +0200
@@ -98,7 +98,7 @@
endif
others := getconf
install-bin := getconf
-install-others := $(inst_libexecdir)/getconf
+install-others-programs := $(inst_libexecdir)/getconf
before-compile := testcases.h ptestcases.h
@@ -110,7 +110,7 @@
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
- tst-vfork3-mem tst-vfork3.mtrace
+ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
include ../Rules
@@ -291,12 +291,20 @@
$(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
-$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
+$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
+ $(objpfx)getconf.speclist FORCE
$(addprefix $(..)./scripts/mkinstalldirs ,\
$(filter-out $(wildcard $@),$@))
- for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< \
- _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
- $(INSTALL_PROGRAM) $< $@/$$spec.new; \
- mv -f $@/$$spec.new $@/$$spec; \
- done
+ while read spec; do \
+ ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
+ mv -f $@/$$spec.new $@/$$spec; \
+ done < $(objpfx)getconf.speclist
+
+$(objpfx)getconf.speclist: $(objpfx)getconf
+ifeq (no,$(cross-compiling))
+ LC_ALL=C GETCONF_DIR=/dev/null \
+ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
+else
+ > $@.new
+endif
+ mv -f $@.new $@

View File

@ -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 <cvachoucek@unicontrols.cz>
To: Dan Kegel <dank@kegel.com>
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

View File

@ -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...
<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
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 </dev/null 2>&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]*)

View File

@ -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

View File

@ -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 <vapier@gentoo.org>
* 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 <dl-sysdep.h>
#include <tls.h>
+#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*/");

View File

@ -1,18 +0,0 @@
(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
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

View File

@ -1,26 +0,0 @@
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <asm/page.h>
#include <asm/reg.h>
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)

View File

@ -1,22 +0,0 @@
Matthias Kaehlcke <matthias at kaehlcke dot net> 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;

View File

@ -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. */

View File

@ -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` &&

View File

@ -1,171 +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 <vapier@gentoo.org>
* 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 <msg00012/signature.asc>*
/Description:/ This is a digitally signed message part.
2008-06-07 Mike Frysinger <vapier@gentoo.org>
* 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 <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/*
+ * The OSF/1 version of <sys/procfs.h> 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/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 <features.h>
-#include <signal.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/ucontext.h>
-#include <sys/user.h>
-#include <asm/elf.h>
-
-__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."

View File

@ -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

View File

@ -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 <stdint.h>
-
-#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 */

View File

@ -1,13 +0,0 @@
diff -durN glibc-2.7.orig/Makerules glibc-2.7/Makerules
--- glibc-2.7.orig/Makerules 2007-08-26 04:18:03.000000000 +0200
+++ glibc-2.7/Makerules 2008-07-28 15:17:27.000000000 +0200
@@ -1203,6 +1203,9 @@
# The include magic above causes those files to use this variable for flags.
CPPFLAGS-nonlib = -DNOT_IN_libc=1
+ifneq ($(OBJDUMP_FOR_HOST),)
+OBJDUMP = $(OBJDUMP_FOR_HOST)
+endif
ifeq ($(versioning),yes)
# Generate normalized lists of symbols, versions, and data sizes.

View File

@ -1,15 +0,0 @@
2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
[BZ 6740]
nptl/sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET):
Guard sym definition with #ifndef __ASSUME_PRIVATE_FUTEX.
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
@@ -15,4 +15,6 @@
PID thread_offsetof (pid)
TID thread_offsetof (tid)
POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t))
+#ifndef __ASSUME_PRIVATE_FUTEX
PRIVATE_FUTEX_OFFSET thread_offsetof (header.private_futex)
+#endif

View File

@ -1,56 +0,0 @@
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S.orig 2007-08-03 16:44:15.000000000 +0100
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2008-08-19 21:08:19.000000000 +0100
@@ -76,7 +76,7 @@
add tmp2, tmp ; \
mov.l @tmp, tmp2 ; \
bra 98f ; \
- mov #FUTEX_PRIVATE_FLAG, tmp
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
98: extu.b tmp, tmp ; \
xor tmp, reg ; \
@@ -88,7 +88,7 @@
add tmp2, tmp ; \
mov.l @tmp, tmp2 ; \
bra 98f ; \
- mov #FUTEX_PRIVATE_FLAG, tmp
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
98: extu.b tmp, tmp ; \
xor tmp, reg ; \
@@ -96,13 +96,13 @@
mov #FUTEX_WAIT, tmp ; \
or tmp, reg
# endif
-# define LOAD_FUTEX_WAKE(reg,tmp) \
+# define LOAD_FUTEX_WAKE(reg,tmp,tmp2) \
stc gbr, tmp ; \
mov.w 99f, tmp2 ; \
add tmp2, tmp ; \
mov.l @tmp, tmp2 ; \
bra 98f ; \
- mov #FUTEX_PRIVATE_FLAG, tmp
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
98: extu.b tmp, tmp ; \
xor tmp, reg ; \
--- glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S.orig 2007-08-03 16:44:57.000000000 +0100
+++ glibc-2.7/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S 2008-08-19 21:08:22.000000000 +0100
@@ -42,7 +42,7 @@
add tmp2, tmp ; \
mov.l @tmp, tmp2 ; \
bra 98f ; \
- mov #FUTEX_PRIVATE_FLAG, tmp
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
98: extu.b tmp, tmp ; \
xor tmp, reg ; \
@@ -54,7 +54,7 @@
add tmp2, tmp ; \
mov.l @tmp, tmp2 ; \
bra 98f ; \
- mov #FUTEX_PRIVATE_FLAG, tmp
+ mov #FUTEX_PRIVATE_FLAG, tmp ; \
99: .word PRIVATE_FUTEX - TLS_PRE_TCB_SIZE ; \
98: extu.b tmp, tmp ; \
xor tmp, reg ; \

View File

@ -1,49 +0,0 @@
--- glibc-2.7/sysdeps/unix/sysv/linux/dl-osinfo.h.orig 2007-09-15 23:54:08.000000000 +0100
+++ glibc-2.7/sysdeps/unix/sysv/linux/dl-osinfo.h 2008-08-20 09:26:26.000000000 +0100
@@ -83,6 +83,10 @@
int parts;
char *cp;
struct utsname uts;
+ int dotsfound = 0;
+ int versionindex = 0;
+ char *choppoint;
+
/* Try the uname system call. */
if (__uname (&uts))
@@ -102,8 +106,34 @@
else
buf = uts.release;
+ /* We are only interested in the first three kernel numbers, so */
+ /* chop off anything past that: */
+
+ choppoint = buf;
+ while (1)
+ {
+ versionindex++;
+ if (versionindex == 63) break;
+ if (*choppoint == '.') dotsfound++;
+ choppoint++;
+ if (dotsfound == 2)
+ {
+ if (*choppoint == '0' || *choppoint == '1'
+ || *choppoint == '2' || *choppoint == '3'
+ || *choppoint == '4' || *choppoint == '5'
+ || *choppoint == '6' || *choppoint == '7'
+ || *choppoint == '8' || *choppoint == '9')
+ continue;
+ else
+ {
+ *choppoint = 0;
+ break;
+ }
+ }
+ }
+
/* Now convert it into a number. The string consists of at most
- three parts. */
+ three parts. Now it does, anyway. ;-) */
version = 0;
parts = 0;
cp = buf;

View File

@ -1,26 +0,0 @@
--- glibc-2.7/sysdeps/unix/sysv/linux/sh/sysdep.S.orig 2005-12-30 22:16:43.000000000 +0000
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/sysdep.S 2008-08-19 22:33:14.000000000 +0100
@@ -32,3 +32,13 @@
#define __syscall_error __syscall_error_1
#include <sysdeps/unix/sh/sysdep.S>
+
+ .data
+ .align 3
+ .globl ___fpscr_values
+ .type ___fpscr_values, @object
+ .size ___fpscr_values, 8
+___fpscr_values:
+ .long 0
+ .long 0x80000
+weak_alias (___fpscr_values, __fpscr_values)
--- glibc-2.7/sysdeps/unix/sysv/linux/sh/Versions.orig 2003-09-01 05:05:09.000000000 +0100
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/Versions 2008-08-19 22:33:14.000000000 +0100
@@ -2,6 +2,7 @@
GLIBC_2.2 {
# functions used in other libraries
__xstat64; __fxstat64; __lxstat64;
+ __fpscr_values;
# a*
alphasort64;

View File

@ -1,37 +0,0 @@
diff -durN glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2004-11-20 18:56:16.000000000 +0100
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2008-10-24 11:21:15.000000000 +0200
@@ -29,10 +29,32 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+/* BEGIN - UGLY HACK - YEM
+ * These definitions are copied from the Alpha file,
+ * and the register numbers are set accordingly to
+ * what I could find in the Linux kernel sources
+ * Highly dubious !!!!
+ * BIG FAT WARNING !!!
+ */
+
+/* Linux kernel says 16 (standards?) registers */
+#define ELF_NGREG 16
+/* Linux kernel says 16 floating point registers */
+#define ELF_NFPREG 16
+
+/* Copied from Alpha as is */
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Ditto */
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+/* END - UGLY HACK - YEM */
+
struct elf_siginfo
{
int si_signo; /* Signal number. */

View File

@ -1,23 +0,0 @@
diff -durN glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2008-10-22 21:23:32.000000000 +0200
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/procfs.h 2008-10-22 21:41:54.000000000 +0200
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
+#include <asm/ptrace.h>
__BEGIN_DECLS
diff -durN glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/user.h glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/user.h
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/sh/sys/user.h 2008-10-22 21:23:32.000000000 +0200
+++ glibc-2.7/sysdeps/unix/sysv/linux/sh/sys/user.h 2008-10-22 21:33:34.000000000 +0200
@@ -21,8 +21,6 @@
#include <features.h>
-#include <asm/user.h>
-
#undef start_thread
#endif /* sys/user.h */

View File

@ -1,56 +0,0 @@
Fix memset on PowerPC 8xx, by Nye Liu:
http://sourceware.org/ml/crossgcc/2008-10/msg00067.html
Quote:
I am working on a powerpc 860 toolchain, but I am having problems
convincing glibc to not emit code that uses the dcbz instruction (CPU15
dcbX bug). The source of the problem is sysdeps/powerpc/power3/memset.S
--- glibc-2.7/sysdeps/powerpc/powerpc32/memset.S 2007-03-26 13:09:07.000000000 -0700
+++ glibc-2.7/sysdeps/powerpc/powerpc32/memset.S.new 2008-10-23 20:28:52.000000000 -0700
@@ -112,11 +112,13 @@
clrrwi. rALIGN, rLEN, 5
mtcrf 0x01, rLEN /* 40th instruction from .align */
+#ifndef BROKEN_PPC_8xx_CPU15
/* Check if we can use the special case for clearing memory using dcbz.
This requires that we know the correct cache line size for this
processor. Getting the __cache_line_size may require establishing GOT
addressability, so branch out of line to set this up. */
beq cr1, L(checklinesize)
+#endif
/* Store blocks of 32-bytes (256-bits) starting on a 32-byte boundary.
Can't assume that rCHR is zero or that the cache line size is either
@@ -158,6 +160,7 @@
add rMEMP, rMEMP, rALIGN
b L(medium_tail2) /* 72nd instruction from .align */
+#ifndef BROKEN_PPC_8xx_CPU15
.align 5
nop
/* Clear cache lines of memory in 128-byte chunks.
@@ -191,6 +194,7 @@
bdnz L(zloop)
beqlr cr5
b L(medium_tail2)
+#endif /* ! BROKEN_PPC_8xx_CPU15 */
.align 5
L(small):
@@ -248,6 +252,7 @@
stw rCHR, -8(rMEMP)
blr
+#ifndef BROKEN_PPC_8xx_CPU15
L(checklinesize):
#ifdef SHARED
mflr rTMP
@@ -329,6 +334,7 @@
L(handletail32):
clrrwi. rALIGN, rLEN, 5
b L(nondcbz)
+#endif /* ! BROKEN_PPC_8xx_CPU15 */
END (BP_SYM (memset))
libc_hidden_builtin_def (memset)

View File

@ -1,190 +0,0 @@
--- glibc-2.7.OLD/elf/Makefile 2009-04-22 17:08:55.000000000 +0300
+++ glibc-2.7/elf/Makefile 2009-04-22 18:09:18.000000000 +0300
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1995-2007, 2008, 2009 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
@@ -23,7 +23,7 @@
headers = elf.h bits/elfclass.h link.h bits/link.h
routines = $(dl-routines) dl-support dl-iteratephdr \
dl-addr enbl-secure dl-profstub \
- dl-origin dl-libc dl-sym dl-tsd
+ dl-origin dl-libc dl-sym dl-tsd dl-sysdep
# The core dynamic linking functions are in libc for the static and
# profiled libraries.
@@ -33,7 +33,8 @@
execstack caller open close trampoline)
all-dl-routines = $(dl-routines) $(sysdep-dl-routines)
# But they are absent from the shared libc, because that code is in ld.so.
-elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin
+elide-routines.os = $(all-dl-routines) dl-support enbl-secure dl-origin \
+ dl-sysdep
shared-only-routines += dl-caller
# ld.so uses those routines, plus some special stuff for being the program
@@ -120,13 +121,6 @@
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
@@ -165,14 +159,14 @@
endif
ifeq (yes,$(build-shared))
tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
- constload1 order $(tests-vis-$(have-protected)) noload filter unload \
+ constload1 order vismain noload filter unload \
reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
nodlopen nodlopen2 neededtest neededtest2 \
neededtest3 neededtest4 unload2 lateglobal initfirst global \
restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 \
- tst-tls-dlinfo \
+ tst-tls16 tst-tls17 tst-tls18 tst-tls-dlinfo \
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
@@ -181,16 +175,17 @@
tst-stackguard1 tst-addr1 tst-thrlock
# reldep9
test-srcs = tst-pathopt
-tests-vis-yes = vismain
tests-execstack-yes = tst-execstack tst-execstack-needed tst-execstack-prog
endif
ifeq (yesyes,$(have-fpie)$(build-shared))
tests: $(objpfx)tst-pie1.out
endif
tests: $(objpfx)tst-leaks1-mem
+tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
+tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
testobj1_1 failobj constload2 constload3 unloadmod \
- dep1 dep2 dep3 dep4 $(modules-vis-$(have-protected)) \
+ dep1 dep2 dep3 dep4 vismod1 vismod2 vismod3 \
nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
nodel2mod1 nodel2mod2 nodel2mod3 \
nodlopenmod nodlopenmod2 filtmod1 filtmod2 \
@@ -206,7 +201,10 @@
tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
- tst-tlsmod15a tst-tlsmod15b \
+ tst-tlsmod15a tst-tlsmod15b tst-tlsmod16a tst-tlsmod16b \
+ $(patsubst %,tst-tlsmod17a%,$(tlsmod17a-suffixes)) \
+ tst-tlsmod17b \
+ $(patsubst %,tst-tlsmod18a%,$(tlsmod18a-suffixes)) \
circlemod1 circlemod1a circlemod2 circlemod2a \
circlemod3 circlemod3a \
reldep8mod1 reldep8mod2 reldep8mod3 \
@@ -226,7 +224,6 @@
ifeq (yesyes,$(have-fpie)$(build-shared))
modules-names += tst-piemod1
endif
-modules-vis-yes = vismod1 vismod2 vismod3
modules-execstack-yes = tst-execstack-mod
extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
# We need this variable to be sure the test modules get the right CPPFLAGS.
@@ -307,7 +304,7 @@
$(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
LC_ALL=C \
sed -e '/^=========/,/^=========/!d;/^=========/d' \
- -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> $@.lds
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
$(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
@@ -315,7 +312,7 @@
-Wl,-soname=$(rtld-installed-name) -T $@.lds
rm -f $@.lds
readelf -s $@ \
- | awk '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
+ | $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
# interp.c exists just to get this string into the libraries.
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
@@ -499,6 +496,7 @@
tst-tlsmod14a.so-no-z-defs = yes
tst-tlsmod14b.so-no-z-defs = yes
tst-tlsmod15a.so-no-z-defs = yes
+tst-tlsmod16b.so-no-z-defs = yes
circlemod2.so-no-z-defs = yes
circlemod3.so-no-z-defs = yes
circlemod3a.so-no-z-defs = yes
@@ -718,6 +716,22 @@
+$(objpfx)tst-tls16: $(libdl)
+$(objpfx)tst-tls16.out: $(objpfx)tst-tlsmod16a.so $(objpfx)tst-tlsmod16b.so
+
+$(objpfx)tst-tls17: $(libdl)
+$(objpfx)tst-tls17.out: $(objpfx)tst-tlsmod17b.so
+$(patsubst %,$(objpfx)tst-tlsmod17a%.os,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.os : tst-tlsmod17a.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ -DN=$* -DNOT_IN_libc=1 $<
+$(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes)): $(objpfx)tst-tlsmod17a%.so: $(objpfx)ld.so
+$(objpfx)tst-tlsmod17b.so: $(patsubst %,$(objpfx)tst-tlsmod17a%.so,$(tlsmod17a-suffixes))
+
+$(objpfx)tst-tls18: $(libdl)
+$(objpfx)tst-tls18.out: $(patsubst %,$(objpfx)tst-tlsmod18a%.so,$(tlsmod18a-suffixes))
+$(patsubst %,$(objpfx)tst-tlsmod18a%.os,$(tlsmod18a-suffixes)): $(objpfx)tst-tlsmod18a%.os : tst-tlsmod18a.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ -DN=$* -DNOT_IN_libc=1 $<
+$(patsubst %,$(objpfx)tst-tlsmod18a%.so,$(tlsmod18a-suffixes)): $(objpfx)tst-tlsmod18a%.so: $(objpfx)ld.so
+
CFLAGS-tst-align.c = $(stack-align-test-flags)
CFLAGS-tst-align2.c = $(stack-align-test-flags)
CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
@@ -804,7 +818,7 @@
cmp $@ tst-array5-static.exp > /dev/null
ifeq (yesyes,$(have-fpie)$(build-shared))
-CFLAGS-tst-pie1.c += -fpie
+CFLAGS-tst-pie1.c += $(pie-ccflag)
$(objpfx)tst-pie1.out: $(objpfx)tst-pie1
$(elf-objpfx)$(rtld-installed-name) \
@@ -845,10 +859,14 @@
$(objpfx)tst-dlmodcount.out: $(test-modules)
check-data := $(firstword $(wildcard \
- $(patsubst %,../scripts/data/localplt-%.data,\
- $(addsuffix -$(config-os),\
- $(config-machine) $(base-machine))\
- generic)))
+ $(foreach D,$(add-ons) scripts,\
+ $(patsubst %,$(..)$D/data/localplt-%.data,\
+ $(abi-name) \
+ $(addsuffix -$(config-os),\
+ $(config-machine) \
+ $(base-machine)) \
+ generic))))
+
tests: $(objpfx)check-localplt.out
ifeq ($(have-thread-library),yes)
@@ -857,9 +875,11 @@
$(objpfx)check-localplt.out: $(objpfx)check-localplt \
$(common-objpfx)libc.so \
- $(common-objpfx)math/libm.so $(thread-dso) \
- $(common-objpfx)rt/librt.so \
- $(common-objpfx)dlfcn/libdl.so \
+ $(common-objpfx)math/libm.so $(thread-dso) \
+ $(common-objpfx)rt/librt.so \
+ $(common-objpfx)dlfcn/libdl.so \
+ $(common-objpfx)resolv/libresolv.so \
+ $(common-objpfx)crypt/libcrypt.so \
$(check-data)
$(dir $<)$(notdir $<) $(filter-out $< $(check-data),$^) | \
LC_ALL=C sort | \

View File

@ -1,193 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0010_all_glibc-2.7-ssp-compat.patch
-= BEGIN original header =-
Add backwards compat support for gcc-3.x ssp ... older ssp versions
used __guard and __stack_smash_handler symbols while gcc-4.1 and newer
uses __stack_chk_guard and __stack_chk_fail.
-= END original header =-
diff -durN glibc-2_9.orig/Versions.def glibc-2_9/Versions.def
--- glibc-2_9.orig/Versions.def 2008-08-01 19:13:40.000000000 +0200
+++ glibc-2_9/Versions.def 2009-02-02 22:00:33.000000000 +0100
@@ -113,6 +113,9 @@
GLIBC_2.0
GLIBC_2.1
GLIBC_2.3
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2
+%endif
GLIBC_2.4
GLIBC_PRIVATE
}
diff -durN glibc-2_9.orig/config.h.in glibc-2_9/config.h.in
--- glibc-2_9.orig/config.h.in 2007-03-26 22:40:08.000000000 +0200
+++ glibc-2_9/config.h.in 2009-02-02 22:00:32.000000000 +0100
@@ -42,6 +42,9 @@
assembler instructions per line. Default is `;' */
#undef ASM_LINE_SEP
+/* Define if we want to enable support for old ssp symbols */
+#undef ENABLE_OLD_SSP_COMPAT
+
/* Define if not using ELF, but `.init' and `.fini' sections are available. */
#undef HAVE_INITFINI
diff -durN glibc-2_9.orig/configure glibc-2_9/configure
--- glibc-2_9.orig/configure 2008-11-11 10:50:11.000000000 +0100
+++ glibc-2_9/configure 2009-02-02 22:00:32.000000000 +0100
@@ -1380,6 +1380,9 @@
--enable-kernel=VERSION compile for compatibility with kernel not older than
VERSION
--enable-all-warnings enable all useful warnings gcc can issue
+ --disable-old-ssp-compat
+ enable support for older ssp symbols
+ [default=no]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -6470,6 +6473,20 @@
echo "${ECHO_T}$libc_cv_ssp" >&6; }
+# Check whether --enable-old-ssp-compat or --disable-old-ssp-compat was given.
+if test "${enable_old_ssp_compat+set}" = set; then
+ enableval="$enable_old_ssp_compat"
+ enable_old_ssp_compat=$enableval
+else
+ enable_old_ssp_compat=no
+fi;
+if test "x$enable_old_ssp_compat" = "xyes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define ENABLE_OLD_SSP_COMPAT 1
+_ACEOF
+
+fi
+
{ echo "$as_me:$LINENO: checking for -fgnu89-inline" >&5
echo $ECHO_N "checking for -fgnu89-inline... $ECHO_C" >&6; }
if test "${libc_cv_gnu89_inline+set}" = set; then
diff -durN glibc-2_9.orig/configure.in glibc-2_9/configure.in
--- glibc-2_9.orig/configure.in 2008-11-11 10:50:11.000000000 +0100
+++ glibc-2_9/configure.in 2009-02-02 22:00:32.000000000 +0100
@@ -1647,6 +1647,15 @@
rm -f conftest*])
AC_SUBST(libc_cv_ssp)
+AC_ARG_ENABLE([old-ssp-compat],
+ AC_HELP_STRING([--enable-old-ssp-compat],
+ [enable support for older ssp symbols @<:@default=no@:>@]),
+ [enable_old_ssp_compat=$enableval],
+ [enable_old_ssp_compat=no])
+if test "x$enable_old_ssp_compat" = "xyes"; then
+ AC_DEFINE(ENABLE_OLD_SSP_COMPAT)
+fi
+
AC_CACHE_CHECK(for -fgnu89-inline, libc_cv_gnu89_inline, [dnl
cat > conftest.c <<EOF
int foo;
diff -durN glibc-2_9.orig/csu/Versions glibc-2_9/csu/Versions
--- glibc-2_9.orig/csu/Versions 2006-10-28 01:11:41.000000000 +0200
+++ glibc-2_9/csu/Versions 2009-02-02 22:00:32.000000000 +0100
@@ -17,6 +17,12 @@
# New special glibc functions.
gnu_get_libc_release; gnu_get_libc_version;
}
+ GLIBC_2.3.2 {
+%ifdef ENABLE_OLD_SSP_COMPAT
+ # global objects and functions for the old propolice patch in gcc
+ __guard;
+%endif
+ }
GLIBC_PRIVATE {
%if HAVE___THREAD
# This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
diff -durN glibc-2_9.orig/csu/libc-start.c glibc-2_9/csu/libc-start.c
--- glibc-2_9.orig/csu/libc-start.c 2007-08-21 00:27:50.000000000 +0200
+++ glibc-2_9/csu/libc-start.c 2009-02-02 22:00:32.000000000 +0100
@@ -37,6 +37,9 @@
uintptr_t __stack_chk_guard attribute_relro;
# endif
#endif
+#ifdef ENABLE_OLD_SSP_COMPAT
+uintptr_t __guard attribute_relro;
+#endif
#ifdef HAVE_PTR_NTHREADS
/* We need atomic operations. */
@@ -141,6 +144,9 @@
/* Set up the stack checker's canary. */
uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+#ifdef ENABLE_OLD_SSP_COMPAT
+ __guard = stack_chk_guard;
+#endif
# ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
# else
diff -durN glibc-2_9.orig/debug/Versions glibc-2_9/debug/Versions
--- glibc-2_9.orig/debug/Versions 2008-03-05 07:53:41.000000000 +0100
+++ glibc-2_9/debug/Versions 2009-02-02 22:00:32.000000000 +0100
@@ -10,6 +10,12 @@
# These are to support some gcc features.
__cyg_profile_func_enter; __cyg_profile_func_exit;
}
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2 {
+ # backwards ssp compat support; alias to __stack_chk_fail
+ __stack_smash_handler;
+ }
+%endif
GLIBC_2.3.4 {
__chk_fail;
__memcpy_chk; __memmove_chk; __mempcpy_chk; __memset_chk; __stpcpy_chk;
diff -durN glibc-2_9.orig/debug/stack_chk_fail.c glibc-2_9/debug/stack_chk_fail.c
--- glibc-2_9.orig/debug/stack_chk_fail.c 2007-05-25 01:47:08.000000000 +0200
+++ glibc-2_9/debug/stack_chk_fail.c 2009-02-02 22:00:32.000000000 +0100
@@ -28,3 +28,7 @@
{
__fortify_fail ("stack smashing detected");
}
+
+#ifdef ENABLE_OLD_SSP_COMPAT
+strong_alias (__stack_chk_fail, __stack_smash_handler)
+#endif
diff -durN glibc-2_9.orig/elf/Versions glibc-2_9/elf/Versions
--- glibc-2_9.orig/elf/Versions 2008-03-08 06:42:26.000000000 +0100
+++ glibc-2_9/elf/Versions 2009-02-02 22:00:33.000000000 +0100
@@ -43,6 +43,12 @@
# runtime interface to TLS
__tls_get_addr;
}
+%ifdef ENABLE_OLD_SSP_COMPAT
+ GLIBC_2.3.2 {
+ # backwards ssp compat support
+ __guard;
+ }
+%endif
GLIBC_2.4 {
# stack canary
__stack_chk_guard;
diff -durN glibc-2_9.orig/elf/rtld.c glibc-2_9/elf/rtld.c
--- glibc-2_9.orig/elf/rtld.c 2008-08-14 19:01:56.000000000 +0200
+++ glibc-2_9/elf/rtld.c 2009-02-02 22:00:32.000000000 +0100
@@ -89,6 +89,9 @@
in thread local area. */
uintptr_t __stack_chk_guard attribute_relro;
#endif
+#ifdef ENABLE_OLD_SSP_COMPAT
+uintptr_t __guard attribute_relro;
+#endif
/* Only exported for architectures that don't store the pointer guard
value in thread local area. */
@@ -842,6 +845,9 @@
{
/* Set up the stack checker's canary. */
uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+#ifdef ENABLE_OLD_SSP_COMPAT
+ __guard = stack_chk_guard;
+#endif
#ifdef THREAD_SET_STACK_GUARD
THREAD_SET_STACK_GUARD (stack_chk_guard);
#else

View File

@ -1,30 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0030_all_glibc-respect-env-CPPFLAGS.patch
-= BEGIN original header =-
Respect environment CPPFLAGS when we run ./configure so we can inject
random -D things without having to set CFLAGS/ASFLAGS
-= END original header =-
diff -durN glibc-2_9.orig/Makeconfig glibc-2_9/Makeconfig
--- glibc-2_9.orig/Makeconfig 2008-08-18 11:42:17.000000000 +0200
+++ glibc-2_9/Makeconfig 2009-02-02 22:00:35.000000000 +0100
@@ -673,6 +673,7 @@
$(foreach lib,$(libof-$(basename $(@F))) \
$(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \
$(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F)))
+CPPFLAGS += $(CPPFLAGS-config)
override CFLAGS = -std=gnu99 $(gnu89-inline-CFLAGS) \
$(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
$(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
diff -durN glibc-2_9.orig/config.make.in glibc-2_9/config.make.in
--- glibc-2_9.orig/config.make.in 2008-08-18 11:42:17.000000000 +0200
+++ glibc-2_9/config.make.in 2009-02-02 22:00:35.000000000 +0100
@@ -97,6 +97,7 @@
CXX = @CXX@
BUILD_CC = @BUILD_CC@
CFLAGS = @CFLAGS@
+CPPFLAGS-config = @CPPFLAGS@
ASFLAGS-config = @ASFLAGS_config@
AR = @AR@
RANLIB = @RANLIB@

View File

@ -1,35 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0050_all_glibc-_nss_dns_gethostbyaddr2_r-check-and-adjust-the-buffer-alignment.patch
-= BEGIN original header =-
http://sourceware.org/ml/libc-alpha/2009-01/msg00000.html
From 8ad7030880eaa18dcabf8e284e79026301fd3fa4 Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <drepper@redhat.com>
Date: Thu, 8 Jan 2009 00:02:38 +0000
Subject: [PATCH] (_nss_dns_gethostbyaddr2_r): Check and adjust the buffer alignment.
-= END original header =-
diff -durN glibc-2_9.orig/resolv/nss_dns/dns-host.c glibc-2_9/resolv/nss_dns/dns-host.c
--- glibc-2_9.orig/resolv/nss_dns/dns-host.c 2008-11-12 08:52:20.000000000 +0100
+++ glibc-2_9/resolv/nss_dns/dns-host.c 2009-02-02 22:00:36.000000000 +0100
@@ -364,6 +364,19 @@
int n, status;
int olderr = errno;
+ uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct host_data);
+ buffer += pad;
+ buflen = buflen > pad ? buflen - pad : 0;
+
+ if (__builtin_expect (buflen < sizeof (struct host_data), 0))
+ {
+ *errnop = ERANGE;
+ *h_errnop = NETDB_INTERNAL;
+ return NSS_STATUS_TRYAGAIN;
+ }
+
+ host_data = (struct host_data *) buffer;
+
if (__res_maybe_init (&_res, 0) == -1)
return NSS_STATUS_UNAVAIL;

View File

@ -1,26 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0051_all_glibc-2.9-add_prio-macros.patch
-= BEGIN original header =-
http://sourceware.org/ml/libc-alpha/2009-01/msg00003.html
From a1737958e074e8f990760acc8abeb0c23715a859 Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland@gnu.org>
Date: Sat, 3 Jan 2009 21:04:01 +0000
Subject: [PATCH] 2009-01-03 Samuel Thibault <samuel.thibault@ens-lyon.org>
* bits/resource.h (PRIO_PROCESS, PRIO_PGRP, PRIO_USER): Add macros.
-= END original header =-
diff -durN glibc-2_9.orig/bits/resource.h glibc-2_9/bits/resource.h
--- glibc-2_9.orig/bits/resource.h 2006-03-05 23:48:10.000000000 +0100
+++ glibc-2_9/bits/resource.h 2009-02-02 22:00:38.000000000 +0100
@@ -185,6 +185,9 @@
enum __priority_which
{
PRIO_PROCESS = 0, /* WHO is a process ID. */
+#define PRIO_PROCESS PRIO_PROCESS
PRIO_PGRP = 1, /* WHO is a process group ID. */
+#define PRIO_PGRP PRIO_PGRP
PRIO_USER = 2 /* WHO is a user ID. */
+#define PRIO_USER PRIO_USER
};

View File

@ -1,111 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0052_all_glibc-2.9-regex-BZ9697.patch
-= BEGIN original header =-
http://sourceware.org/ml/libc-alpha/2009-01/msg00005.html
From ea8ca0dfcbf2721bcf2c08ce3c01d5764b827572 Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <drepper@redhat.com>
Date: Thu, 8 Jan 2009 00:42:28 +0000
Subject: [PATCH] (re_compile_fastmap_iter): Rewrite COMPLEX_BRACKET handling.
-= END original header =-
diff -durN glibc-2_9.orig/posix/regcomp.c glibc-2_9/posix/regcomp.c
--- glibc-2_9.orig/posix/regcomp.c 2008-05-15 05:07:21.000000000 +0200
+++ glibc-2_9/posix/regcomp.c 2009-02-02 22:00:41.000000000 +0100
@@ -350,47 +350,67 @@
#ifdef RE_ENABLE_I18N
else if (type == COMPLEX_BRACKET)
{
- int i;
re_charset_t *cset = dfa->nodes[node].opr.mbcset;
- if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes
- || cset->nranges || cset->nchar_classes)
- {
+ int i;
+
# ifdef _LIBC
- if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0)
+ /* See if we have to try all bytes which start multiple collation
+ elements.
+ e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+ collation element, and don't catch 'b' since 'b' is
+ the only collation element which starts from 'b' (and
+ it is caught by SIMPLE_BRACKET). */
+ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+ && (cset->ncoll_syms || cset->nranges))
{
- /* In this case we want to catch the bytes which are
- the first byte of any collation elements.
- e.g. In da_DK, we want to catch 'a' since "aa"
- is a valid collation element, and don't catch
- 'b' since 'b' is the only collation element
- which starts from 'b'. */
const int32_t *table = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
for (i = 0; i < SBC_MAX; ++i)
if (table[i] < 0)
re_set_fastmap (fastmap, icase, i);
}
-# else
- if (dfa->mb_cur_max > 1)
- for (i = 0; i < SBC_MAX; ++i)
- if (__btowc (i) == WEOF)
- re_set_fastmap (fastmap, icase, i);
-# endif /* not _LIBC */
- }
- for (i = 0; i < cset->nmbchars; ++i)
+# endif /* _LIBC */
+
+ /* See if we have to start the match at all multibyte characters,
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+ if (dfa->mb_cur_max > 1
+ && (cset->nchar_classes || cset->non_match
+# ifdef _LIBC
+ || cset->nequiv_classes
+# endif /* _LIBC */
+ ))
{
- char buf[256];
- mbstate_t state;
- memset (&state, '\0', sizeof (state));
- if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
- re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ unsigned char c = 0;
+ do
{
- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
- != (size_t) -1)
- re_set_fastmap (fastmap, 0, *(unsigned char *) buf);
+ mbstate_t mbs;
+ memset (&mbs, 0, sizeof (mbs));
+ if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+ re_set_fastmap (fastmap, false, (int) c);
}
+ while (++c != 0);
}
+
+ else
+ {
+ /* ... Else catch all bytes which can start the mbchars. */
+ for (i = 0; i < cset->nmbchars; ++i)
+ {
+ char buf[256];
+ mbstate_t state;
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+ re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+ }
+ }
+ }
}
#endif /* RE_ENABLE_I18N */
else if (type == OP_PERIOD

View File

@ -1,28 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0053_all_glibc-2.9-regex-BZ697.patch
-= BEGIN original header =-
http://sourceware.org/ml/libc-alpha/2009-01/msg00006.html
From 37bdc055ceeb6b1144c07448a7210d9ab3fbb2f5 Mon Sep 17 00:00:00 2001
From: Ulrich Drepper <drepper@redhat.com>
Date: Thu, 8 Jan 2009 00:47:05 +0000
Subject: [PATCH] (prune_impossible_nodes): Handle sifted_states[0] being NULL also if
there are no backreferences.
-= END original header =-
diff -durN glibc-2_9.orig/posix/regexec.c glibc-2_9/posix/regexec.c
--- glibc-2_9.orig/posix/regexec.c 2007-10-12 19:47:13.000000000 +0200
+++ glibc-2_9/posix/regexec.c 2009-02-02 22:00:43.000000000 +0100
@@ -1004,6 +1004,11 @@
re_node_set_free (&sctx.limits);
if (BE (ret != REG_NOERROR, 0))
goto free_return;
+ if (sifted_states[0] == NULL)
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
}
re_free (mctx->state_log);
mctx->state_log = sifted_states;

View File

@ -1,53 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0070_all_glibc-i386-x86_64-revert-clone-cfi.patch
-= BEGIN original header =-
revert cfi additions to clone on i386/x86_64 to workaround problems in
gcc's unwinder code. this is not a bug in glibc, it triggers problems
elsewhere. this cfi code does not gain us a whole lot anyways.
http://gcc.gnu.org/ml/gcc/2006-12/msg00293.html
-= END original header =-
diff -durN glibc-2_9.orig/sysdeps/unix/sysv/linux/i386/clone.S glibc-2_9/sysdeps/unix/sysv/linux/i386/clone.S
--- glibc-2_9.orig/sysdeps/unix/sysv/linux/i386/clone.S 2006-12-04 00:12:36.000000000 +0100
+++ glibc-2_9/sysdeps/unix/sysv/linux/i386/clone.S 2009-02-02 22:00:45.000000000 +0100
@@ -120,9 +120,6 @@
ret
L(thread_start):
- cfi_startproc;
- /* Clearing frame pointer is insufficient, use CFI. */
- cfi_undefined (eip);
/* Note: %esi is zero. */
movl %esi,%ebp /* terminate the stack frame */
#ifdef RESET_PID
@@ -155,7 +152,6 @@
jmp L(haspid)
.previous
#endif
- cfi_endproc;
cfi_startproc
PSEUDO_END (BP_SYM (__clone))
diff -durN glibc-2_9.orig/sysdeps/unix/sysv/linux/x86_64/clone.S glibc-2_9/sysdeps/unix/sysv/linux/x86_64/clone.S
--- glibc-2_9.orig/sysdeps/unix/sysv/linux/x86_64/clone.S 2006-12-04 00:12:36.000000000 +0100
+++ glibc-2_9/sysdeps/unix/sysv/linux/x86_64/clone.S 2009-02-02 22:00:45.000000000 +0100
@@ -89,9 +89,6 @@
ret
L(thread_start):
- cfi_startproc;
- /* Clearing frame pointer is insufficient, use CFI. */
- cfi_undefined (rip);
/* Clear the frame pointer. The ABI suggests this be done, to mark
the outermost frame obviously. */
xorl %ebp, %ebp
@@ -116,7 +113,6 @@
/* Call exit with return value from function call. */
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
- cfi_endproc;
cfi_startproc;
PSEUDO_END (BP_SYM (__clone))

View File

@ -1,35 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0080_all_glibc-2.10-dns-no-gethostbyname4.patch
-= BEGIN original header =-
http://sourceware.org/bugzilla/show_bug.cgi?id=7060
http://bugs.gentoo.org/250468
The gethostbyname4() lookup method is problematic since it fires out both
the A and AAAA DNS queries in parallel and over the same socket. This
should work in theory, but it turns out that many cheap DSL modems and
similar devices have buggy DNS servers - if the AAAA query arrives too
quickly after the A query, the server will generate only a single reply
with the A query id but returning an error for the AAAA query; we get
stuck waiting for the second reply.
For gethostbyname4() users affected, disabling IPv6 in the system might
work around the issue, unfortunately it only helps with applications
using AI_ADDRCONFIG (e.g. Firefox); some (notably e.g. Pidgin) neglect
to do that.
Real fix should be using separate ports for the A and AAAA queries.
-= END original header =-
diff -durN glibc-2_9.orig/resolv/Versions glibc-2_9/resolv/Versions
--- glibc-2_9.orig/resolv/Versions 2008-08-01 19:15:34.000000000 +0200
+++ glibc-2_9/resolv/Versions 2009-02-02 22:00:46.000000000 +0100
@@ -102,7 +102,7 @@
_nss_dns_gethostbyname_r; _nss_dns_getnetbyaddr_r;
_nss_dns_getnetbyname_r; _nss_dns_getcanonname_r;
_nss_dns_gethostbyaddr2_r;
- _nss_dns_gethostbyname4_r;
+# _nss_dns_gethostbyname4_r;
}
}

View File

@ -1,72 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/0090_all_glibc-math-tests.patch
-= BEGIN original header =-
From: "Joseph S. Myers" <joseph at codesourcery dot com>
To: libc-alpha at sourceware dot org
Date: Tue, 15 Jul 2008 14:43:04 +0000 (UTC)
Subject: expm1 ulps
If you test glibc on i686 with GCC 4.3, you get a test-ildoubl failure:
Failure: Test: expm1 (1) == M_El - 1.0
Result:
is: 1.71828182845904523532e+00 0xd.bf0a8b14576953500000p-3
should be: 1.71828182845904523543e+00 0xd.bf0a8b14576953600000p-3
difference: 1.08420217248550443401e-19 0x8.00000000000000000000p-66
ulp : 1.0000
max.ulp : 0.0000
Maximal error of `expm1'
is : 1 ulp
accepted: 0 ulp
What happens is that the inline expansion of expm1l uses __builtin_expm1l,
and GCC 4.3 optimizes calls to __builtin_expm1l with constant argument to
a correctly rounded result using MPFR. The result returned is thus the
value of e-1 rounded once to long double precision. However, the test
expects M_El - 1.0, and the result of rounding e to long double precision,
then subtracting 1, differs in the last place from the result of rounding
e-1 to long double precision (the latter has smaller exponent, and the
last bit is 1).
There are two obvious approaches possible to fixing this. The first patch
below changes the expectation to a decimal expansion for e-1 (taken from
that of M_El) rather than doing arithmetic in the expected value. This in
turn requires ulps to be set for the out-of-line version of expm1. It
might also need ulps to be set for the inline version for older compilers
if they should continue to pass the test, and possibly for other targets.
The second patch below takes the alternative approach of keeping the
existing expectation (which has the wrong bit in the last place) and
setting ulps for the inline expansion of expm1, which avoids the risk of
breaking the test for other targets.
2008-07-15 Joseph Myers <joseph@codesourcery.com>
* sysdeps/i386/fpu/libm-test-ulps: Add inline long double ulps for
expm1.
-= END original header =-
diff -durN glibc-2_9.orig/sysdeps/i386/fpu/libm-test-ulps glibc-2_9/sysdeps/i386/fpu/libm-test-ulps
--- glibc-2_9.orig/sysdeps/i386/fpu/libm-test-ulps 2006-01-15 18:59:37.000000000 +0100
+++ glibc-2_9/sysdeps/i386/fpu/libm-test-ulps 2009-02-02 22:00:47.000000000 +0100
@@ -453,6 +453,10 @@
ildouble: 8
ldouble: 8
+# expm1
+Test "expm1 (1) == M_El - 1.0":
+ildouble: 1
+
# gamma
Test "gamma (-0.5) == log(2*sqrt(pi))":
double: 1
@@ -1134,6 +1138,9 @@
ildouble: 8
ldouble: 8
+Function: "expm1":
+ildouble: 1
+
Function: "gamma":
double: 1
idouble: 1

View File

@ -1,89 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/1010_all_glibc-queue-header-updates.patch
-= BEGIN original header =-
grab some updates from FreeBSD
http://bugs.gentoo.org/201979
-= END original header =-
diff -durN glibc-2_9.orig/misc/sys/queue.h glibc-2_9/misc/sys/queue.h
--- glibc-2_9.orig/misc/sys/queue.h 2008-03-05 06:50:30.000000000 +0100
+++ glibc-2_9/misc/sys/queue.h 2009-02-02 22:00:48.000000000 +0100
@@ -136,6 +136,11 @@
(var); \
(var) = ((var)->field.le_next))
+#define LIST_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = LIST_FIRST((head)); \
+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \
+ (var) = (tvar))
+
/*
* List access methods.
*/
@@ -197,6 +202,16 @@
#define SLIST_FOREACH(var, head, field) \
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = SLIST_FIRST((head)); \
+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \
+ (var) = (tvar))
+
+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
+ for ((varp) = &SLIST_FIRST((head)); \
+ ((var) = *(varp)) != NULL; \
+ (varp) = &SLIST_NEXT((var), field))
+
/*
* Singly-linked List access methods.
*/
@@ -242,6 +257,12 @@
(head)->stqh_last = &(elm)->field.stqe_next; \
} while (/*CONSTCOND*/0)
+#define STAILQ_LAST(head, type, field) \
+ (STAILQ_EMPTY((head)) ? \
+ NULL : \
+ ((struct type *)(void *) \
+ ((char *)((head)->stqh_last) - __offsetof(struct type, field))))
+
#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
(head)->stqh_last = &(elm)->field.stqe_next; \
@@ -286,6 +307,11 @@
#define STAILQ_FIRST(head) ((head)->stqh_first)
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = STAILQ_FIRST((head)); \
+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
+ (var) = (tvar))
+
/*
* Simple queue definitions.
@@ -437,11 +463,22 @@
(var); \
(var) = ((var)->field.tqe_next))
+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
+ for ((var) = TAILQ_FIRST((head)); \
+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
+ (var) = (tvar))
+
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
(var); \
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
+ for ((var) = TAILQ_LAST((head), headname); \
+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
+ (var) = (tvar))
+
+
#define TAILQ_CONCAT(head1, head2, field) do { \
if (!TAILQ_EMPTY(head2)) { \
*(head1)->tqh_last = (head2)->tqh_first; \

View File

@ -1,23 +0,0 @@
Original patch from: gentoo/src/patchsets/glibc/2.9/1018_all_glibc-awk-in-C-locale.patch
-= BEGIN original header =-
http://bugs.gentoo.org/252802
2008-12-29 Mike Frysinger <vapier@gentoo.org>
* iconvdata/Makefile (iconv-rules): Use LC_ALL=C when running awk script.
-= END original header =-
diff -durN glibc-2_9.orig/iconvdata/Makefile glibc-2_9/iconvdata/Makefile
--- glibc-2_9.orig/iconvdata/Makefile 2008-05-15 03:54:31.000000000 +0200
+++ glibc-2_9/iconvdata/Makefile 2009-02-02 22:00:50.000000000 +0100
@@ -286,7 +286,7 @@
{ echo $(filter-out lib%, $(modules)); \
echo 8bit $(gen-8bit-modules); \
echo 8bit-gap $(gen-8bit-gap-modules); } | \
- $(AWK) 'NR == 1 { \
+ LC_ALL=C $(AWK) 'NR == 1 { \
for (i = 1; i <= NF; i++) { \
printf "%s-routines := %s\n", $$i, tolower($$i); \
printf "%s-map := gconv.map\n", $$i; \

Some files were not shown because too many files have changed in this diff Show More