mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-04-16 15:28:55 +00:00
Vampirise patches for gcc-4.3.{0,1} from gentoo. Absolutely untested...
/trunk/patches/gcc/4.3.0/275-gcc-x86-emit-cld.patch | 156 156 0 0 + /trunk/patches/gcc/4.3.0/450-gcc4-noteGNUstack.patch | 198 198 0 0 + /trunk/patches/gcc/4.3.0/550-gcc43-pr25343.patch | 21 21 0 0 + /trunk/patches/gcc/4.3.0/375-gcc43-pr35440.patch | 59 59 0 0 + /trunk/patches/gcc/4.3.0/125-gcc-trampolinewarn.patch | 35 35 0 0 + /trunk/patches/gcc/4.3.0/475-gcc43-pr35705.patch | 21 21 0 0 + /trunk/patches/gcc/4.3.0/700-204-uclibc-locale-wchar_fix.patch | 51 51 0 0 + /trunk/patches/gcc/4.3.0/775-303-c99-complex-ugly-hack.patch | 14 14 0 0 + /trunk/patches/gcc/4.3.0/575-sh-pr24836.patch | 28 28 0 0 + /trunk/patches/gcc/4.3.0/675-203-uclibc-locale-no__x.patch | 224 224 0 0 + /trunk/patches/gcc/4.3.0/400-gcc43-pr24170.patch | 61 61 0 0 + /trunk/patches/gcc/4.3.0/100-gcc-4.1-alpha-mieee-default.patch | 34 34 0 0 + /trunk/patches/gcc/4.3.0/825-305-libmudflap-susv3-legacy.patch | 49 49 0 0 + /trunk/patches/gcc/4.3.0/175-gcc-4.1-cross-compile.patch | 44 44 0 0 + /trunk/patches/gcc/4.3.0/850-306-libstdc++-namespace.patch | 38 38 0 0 + /trunk/patches/gcc/4.3.0/200-gcc-netbsd-symbolic.patch | 14 14 0 0 + /trunk/patches/gcc/4.3.0/750-301-missing-execinfo_h.patch | 13 13 0 0 + /trunk/patches/gcc/4.3.0/225-gcc-sparc64-bsd.patch | 30 30 0 0 + /trunk/patches/gcc/4.3.0/350-300-libstdc++-pic.patch | 56 56 0 0 + /trunk/patches/gcc/4.3.0/500-gcc43-pr34571.patch | 35 35 0 0 + /trunk/patches/gcc/4.3.0/300-gcc-3.4-libiberty-pic.patch | 12 12 0 0 + /trunk/patches/gcc/4.3.0/625-103-uclibc-conf-noupstream.patch | 13 13 0 0 + /trunk/patches/gcc/4.3.0/425-gcc4-ia64-noteGNUstack.patch | 96 96 0 0 + /trunk/patches/gcc/4.3.0/325-gcc4-superh-default-multilib.patch | 25 25 0 0 + /trunk/patches/gcc/4.3.0/725-205-uclibc-locale-update.patch | 355 355 0 0 ++ /trunk/patches/gcc/4.3.0/800-304-index_macro.patch | 27 27 0 0 + /trunk/patches/gcc/4.3.0/600-gcc-ca-translation-typo.patch | 19 19 0 0 + /trunk/patches/gcc/4.3.0/650-200-uclibc-locale.patch | 2794 2794 0 0 +++++++++++++++ /trunk/patches/gcc/4.3.0/525-gcc43-pr35982.patch | 23 23 0 0 + /trunk/patches/gcc/4.3.0/150-gcc43-java-nomulti.patch | 47 47 0 0 + /trunk/patches/gcc/4.3.0/250-904-flatten-switch-stmt-00.patch | 76 76 0 0 + /trunk/patches/gcc/4.3.1/100-gcc-4.1-alpha-mieee-default.patch | 34 34 0 0 + /trunk/patches/gcc/4.3.1/500-103-uclibc-conf-noupstream.patch | 13 13 0 0 + /trunk/patches/gcc/4.3.1/175-gcc-4.1-cross-compile.patch | 44 44 0 0 + /trunk/patches/gcc/4.3.1/400-gcc4-noteGNUstack.patch | 198 198 0 0 + /trunk/patches/gcc/4.3.1/600-205-uclibc-locale-update.patch | 355 355 0 0 ++ /trunk/patches/gcc/4.3.1/725-306-libstdc++-namespace.patch | 38 38 0 0 + /trunk/patches/gcc/4.3.1/350-gcc43-pr24170.patch | 61 61 0 0 + /trunk/patches/gcc/4.3.1/300-gcc4-superh-default-multilib.patch | 25 25 0 0 + /trunk/patches/gcc/4.3.1/575-204-uclibc-locale-wchar_fix.patch | 51 51 0 0 + /trunk/patches/gcc/4.3.1/200-gcc-netbsd-symbolic.patch | 14 14 0 0 + /trunk/patches/gcc/4.3.1/225-gcc-sparc64-bsd.patch | 30 30 0 0 + /trunk/patches/gcc/4.3.1/450-gcc43-pr25343.patch | 21 21 0 0 + /trunk/patches/gcc/4.3.1/625-301-missing-execinfo_h.patch | 13 13 0 0 + /trunk/patches/gcc/4.3.1/325-300-libstdc++-pic.patch | 56 56 0 0 + /trunk/patches/gcc/4.3.1/425-gcc43-pr34571.patch | 35 35 0 0 + /trunk/patches/gcc/4.3.1/375-gcc4-ia64-noteGNUstack.patch | 96 96 0 0 + /trunk/patches/gcc/4.3.1/125-gcc-trampolinewarn.patch | 35 35 0 0 + /trunk/patches/gcc/4.3.1/275-gcc-3.4-libiberty-pic.patch | 12 12 0 0 + /trunk/patches/gcc/4.3.1/650-303-c99-complex-ugly-hack.patch | 14 14 0 0 + /trunk/patches/gcc/4.3.1/525-200-uclibc-locale.patch | 2794 2794 0 0 +++++++++++++++ /trunk/patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch | 224 224 0 0 + /trunk/patches/gcc/4.3.1/150-gcc43-java-nomulti.patch | 47 47 0 0 + /trunk/patches/gcc/4.3.1/700-305-libmudflap-susv3-legacy.patch | 49 49 0 0 + /trunk/patches/gcc/4.3.1/675-304-index_macro.patch | 27 27 0 0 + /trunk/patches/gcc/4.3.1/250-904-flatten-switch-stmt-00.patch | 76 76 0 0 + /trunk/patches/gcc/4.3.1/475-sh-pr24836.patch | 28 28 0 0 + 57 files changed, 9058 insertions(+)
This commit is contained in:
parent
b237809704
commit
bfb7f715f2
34
patches/gcc/4.3.0/100-gcc-4.1-alpha-mieee-default.patch
Normal file
34
patches/gcc/4.3.0/100-gcc-4.1-alpha-mieee-default.patch
Normal file
@ -0,0 +1,34 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch
|
||||
Set the default behavior on alpha to use -mieee since the large majority of
|
||||
time we want this (bad/weird things can happen with packages built without
|
||||
-mieee).
|
||||
|
||||
To satisfy those people who may not want -mieee forced on them all the time,
|
||||
we also provide -mno-ieee.
|
||||
|
||||
Patch by Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/alpha/alpha.h gcc-4.3.0/gcc/config/alpha/alpha.h
|
||||
--- gcc-4.3.0.orig/gcc/config/alpha/alpha.h 2007-12-06 14:25:37.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/alpha/alpha.h 2008-06-10 14:44:06.000000000 +0200
|
||||
@@ -95,6 +95,8 @@
|
||||
while (0)
|
||||
#endif
|
||||
|
||||
+#define CPP_SPEC "%{!no-ieee:-mieee}"
|
||||
+
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/alpha/alpha.opt gcc-4.3.0/gcc/config/alpha/alpha.opt
|
||||
--- gcc-4.3.0.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/alpha/alpha.opt 2008-06-10 14:44:06.000000000 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
Request IEEE-conformant math library routines (OSF/1)
|
||||
|
||||
mieee
|
||||
-Target Report RejectNegative Mask(IEEE)
|
||||
+Target Report Mask(IEEE)
|
||||
Emit IEEE-conformant code, without inexact exceptions
|
||||
|
||||
mieee-with-inexact
|
35
patches/gcc/4.3.0/125-gcc-trampolinewarn.patch
Normal file
35
patches/gcc/4.3.0/125-gcc-trampolinewarn.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/00_all_gcc-trampolinewarn.patch
|
||||
This trivial patch causes gcc to emit a warning whenever
|
||||
it generates a trampoline. These are otherwise hard to
|
||||
locate. It is rigged to default ON - to have it default
|
||||
to OFF remove the text 'Init(1)' from the common.opt
|
||||
patch, leaving just 'Common Var(warn_trampolines)'.
|
||||
Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/builtins.c gcc-4.3.0/gcc/builtins.c
|
||||
--- gcc-4.3.0.orig/gcc/builtins.c 2008-02-20 18:27:21.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/builtins.c 2008-06-10 14:44:10.000000000 +0200
|
||||
@@ -5659,6 +5659,9 @@
|
||||
trampolines_created = 1;
|
||||
INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
|
||||
|
||||
+ if (warn_trampolines)
|
||||
+ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
|
||||
+
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/common.opt gcc-4.3.0/gcc/common.opt
|
||||
--- gcc-4.3.0.orig/gcc/common.opt 2008-01-22 15:11:44.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/common.opt 2008-06-10 14:44:10.000000000 +0200
|
||||
@@ -182,6 +182,10 @@
|
||||
Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers
|
||||
|
||||
+Wtrampolines
|
||||
+Common Var(warn_trampolines) Init(1)
|
||||
+Warn whenever a trampoline is generated
|
||||
+
|
||||
Wuninitialized
|
||||
Common Var(warn_uninitialized) Warning
|
||||
Warn about uninitialized automatic variables
|
47
patches/gcc/4.3.0/150-gcc43-java-nomulti.patch
Normal file
47
patches/gcc/4.3.0/150-gcc43-java-nomulti.patch
Normal file
@ -0,0 +1,47 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/03_all_gcc43-java-nomulti.patch
|
||||
diff -durN gcc-4.3.0.orig/libjava/configure gcc-4.3.0/libjava/configure
|
||||
--- gcc-4.3.0.orig/libjava/configure 2008-03-05 19:44:25.000000000 +0100
|
||||
+++ gcc-4.3.0/libjava/configure 2008-06-10 14:44:13.000000000 +0200
|
||||
@@ -1018,6 +1018,8 @@
|
||||
--enable-gconf-peer compile GConf native peers for util.preferences
|
||||
--enable-java-maintainer-mode
|
||||
allow rebuilding of .class and .h files
|
||||
+ --enable-libjava-multilib
|
||||
+ build libjava as multilib
|
||||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-maintainer-mode enable make rules and dependencies not useful
|
||||
@@ -1850,6 +1852,16 @@
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-libjava-multilib was given.
|
||||
+if test "${enable_libjava_multilib+set}" = set; then
|
||||
+ enableval=$enable_libjava_multilib;
|
||||
+fi
|
||||
+
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libjava/configure.ac gcc-4.3.0/libjava/configure.ac
|
||||
--- gcc-4.3.0.orig/libjava/configure.ac 2007-12-22 16:48:46.000000000 +0100
|
||||
+++ gcc-4.3.0/libjava/configure.ac 2008-06-10 14:44:13.000000000 +0200
|
||||
@@ -82,6 +82,13 @@
|
||||
[allow rebuilding of .class and .h files]))
|
||||
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
|
||||
|
||||
+AC_ARG_ENABLE(libjava-multilib,
|
||||
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
GCC_NO_EXECUTABLES
|
||||
|
44
patches/gcc/4.3.0/175-gcc-4.1-cross-compile.patch
Normal file
44
patches/gcc/4.3.0/175-gcc-4.1-cross-compile.patch
Normal file
@ -0,0 +1,44 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/08_all_gcc-4.1-cross-compile.patch
|
||||
Some notes on the 'bootstrap with or without libc headers' debate:
|
||||
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
|
||||
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/configure gcc-4.3.0/gcc/configure
|
||||
--- gcc-4.3.0.orig/gcc/configure 2008-03-05 00:39:11.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/configure 2008-06-10 14:44:17.000000000 +0200
|
||||
@@ -13274,7 +13274,7 @@
|
||||
| powerpc*-*-*,powerpc64*-*-*)
|
||||
CROSS="$CROSS -DNATIVE_CROSS" ;;
|
||||
esac
|
||||
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
|
||||
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
|
||||
SYSTEM_HEADER_DIR=$build_system_header_dir
|
||||
fi
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/configure.ac gcc-4.3.0/gcc/configure.ac
|
||||
--- gcc-4.3.0.orig/gcc/configure.ac 2008-03-05 00:39:11.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/configure.ac 2008-06-10 14:44:17.000000000 +0200
|
||||
@@ -1745,7 +1745,7 @@
|
||||
| powerpc*-*-*,powerpc64*-*-*)
|
||||
CROSS="$CROSS -DNATIVE_CROSS" ;;
|
||||
esac
|
||||
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
|
||||
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
|
||||
SYSTEM_HEADER_DIR=$build_system_header_dir
|
||||
fi
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/unwind-dw2.c gcc-4.3.0/gcc/unwind-dw2.c
|
||||
--- gcc-4.3.0.orig/gcc/unwind-dw2.c 2007-07-25 20:14:57.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/unwind-dw2.c 2008-06-10 14:44:17.000000000 +0200
|
||||
@@ -334,9 +334,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef inhibit_libc
|
||||
#ifdef MD_UNWIND_SUPPORT
|
||||
#include MD_UNWIND_SUPPORT
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Extract any interesting information from the CIE for the translation
|
||||
unit F belongs to. Return a pointer to the byte after the augmentation,
|
14
patches/gcc/4.3.0/200-gcc-netbsd-symbolic.patch
Normal file
14
patches/gcc/4.3.0/200-gcc-netbsd-symbolic.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/11_all_gcc-netbsd-symbolic.patch
|
||||
http://bugs.gentoo.org/122698
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/netbsd-elf.h gcc-4.3.0/gcc/config/netbsd-elf.h
|
||||
--- gcc-4.3.0.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/netbsd-elf.h 2008-06-10 14:44:21.000000000 +0200
|
||||
@@ -82,6 +82,7 @@
|
||||
#define NETBSD_LINK_SPEC_ELF \
|
||||
"%{assert*} %{R*} %{rpath*} \
|
||||
%{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
%{!shared: \
|
||||
-dc -dp \
|
||||
%{!nostdlib: \
|
30
patches/gcc/4.3.0/225-gcc-sparc64-bsd.patch
Normal file
30
patches/gcc/4.3.0/225-gcc-sparc64-bsd.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/14_all_gcc-sparc64-bsd.patch
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/sparc/freebsd.h gcc-4.3.0/gcc/config/sparc/freebsd.h
|
||||
--- gcc-4.3.0.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/sparc/freebsd.h 2008-06-10 14:44:26.000000000 +0200
|
||||
@@ -25,9 +25,22 @@
|
||||
/* FreeBSD needs the platform name (sparc64) defined.
|
||||
Emacs needs to know if the arch is 64 or 32-bits. */
|
||||
|
||||
-#undef CPP_CPU64_DEFAULT_SPEC
|
||||
-#define CPP_CPU64_DEFAULT_SPEC \
|
||||
- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
|
||||
+#undef FBSD_TARGET_CPU_CPP_BUILTINS
|
||||
+#define FBSD_TARGET_CPU_CPP_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (TARGET_ARCH64) \
|
||||
+ { \
|
||||
+ builtin_define ("__sparc64__"); \
|
||||
+ builtin_define ("__sparc_v9__"); \
|
||||
+ builtin_define ("__sparcv9"); \
|
||||
+ } \
|
||||
+ else \
|
||||
+ builtin_define ("__sparc"); \
|
||||
+ builtin_define ("__sparc__"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
|
||||
#define LINK_SPEC "%(link_arch) \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
76
patches/gcc/4.3.0/250-904-flatten-switch-stmt-00.patch
Normal file
76
patches/gcc/4.3.0/250-904-flatten-switch-stmt-00.patch
Normal file
@ -0,0 +1,76 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/18_all_904-flatten-switch-stmt-00.patch
|
||||
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html
|
||||
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/stmt.c gcc-4.3.0/gcc/stmt.c
|
||||
--- gcc-4.3.0.orig/gcc/stmt.c 2007-12-04 22:55:32.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/stmt.c 2008-06-10 14:44:33.000000000 +0200
|
||||
@@ -2508,7 +2508,11 @@
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3066,6 +3070,7 @@
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
156
patches/gcc/4.3.0/275-gcc-x86-emit-cld.patch
Normal file
156
patches/gcc/4.3.0/275-gcc-x86-emit-cld.patch
Normal file
@ -0,0 +1,156 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/20_all_gcc-x86-emit-cld.patch
|
||||
bandaid for the cld issue. to be dropped when gcc-4.3 goes stable.
|
||||
|
||||
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00417.html
|
||||
|
||||
2008-03-06 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.h (TARGET_CLD): New define.
|
||||
(struct machine_function): Add needs_cld field.
|
||||
(ix86_current_function_needs_cld): New define.
|
||||
* config/i386/i386.md (UNSPEC_CLD): New unspec volatile constant.
|
||||
("cld"): New isns pattern.
|
||||
("strmov_singleop"): Set ix86_current_function_needs_cld flag.
|
||||
("rep_mov"): Ditto.
|
||||
("strset_singleop"): Ditto.
|
||||
("rep_stos"): Ditto.
|
||||
("cmpstrnqi_nz_1"): Ditto.
|
||||
("cmpstrnqi_1"): Ditto.
|
||||
("strlenqi_1"): Ditto.
|
||||
* config/i386/i386.c (ix86_expand_prologue): Emit cld insn for
|
||||
TARGET_CLD when ix86_current_function_needs_cld is set.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/i386/i386.c gcc-4.3.0/gcc/config/i386/i386.c
|
||||
--- gcc-4.3.0.orig/gcc/config/i386/i386.c 2008-02-21 13:30:00.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/i386/i386.c 2008-06-10 14:44:37.000000000 +0200
|
||||
@@ -6448,6 +6448,10 @@
|
||||
emit_insn (gen_prologue_use (pic_offset_table_rtx));
|
||||
emit_insn (gen_blockage ());
|
||||
}
|
||||
+
|
||||
+ /* Emit cld instruction if stringops are used in the function. */
|
||||
+ if (TARGET_CLD && ix86_current_function_needs_cld)
|
||||
+ emit_insn (gen_cld ());
|
||||
}
|
||||
|
||||
/* Emit code to restore saved registers using MOV insns. First register
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/i386/i386.h gcc-4.3.0/gcc/config/i386/i386.h
|
||||
--- gcc-4.3.0.orig/gcc/config/i386/i386.h 2008-02-15 09:12:02.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/i386/i386.h 2008-06-10 14:44:37.000000000 +0200
|
||||
@@ -388,6 +388,7 @@
|
||||
|
||||
extern int x86_prefetch_sse;
|
||||
|
||||
+#define TARGET_CLD 1
|
||||
#define TARGET_ABM x86_abm
|
||||
#define TARGET_CMPXCHG16B x86_cmpxchg16b
|
||||
#define TARGET_POPCNT x86_popcnt
|
||||
@@ -2443,8 +2444,9 @@
|
||||
int save_varrargs_registers;
|
||||
int accesses_prev_frame;
|
||||
int optimize_mode_switching[MAX_386_ENTITIES];
|
||||
- /* Set by ix86_compute_frame_layout and used by prologue/epilogue expander to
|
||||
- determine the style used. */
|
||||
+ int needs_cld;
|
||||
+ /* Set by ix86_compute_frame_layout and used by prologue/epilogue
|
||||
+ expander to determine the style used. */
|
||||
int use_fast_prologue_epilogue;
|
||||
/* Number of saved registers USE_FAST_PROLOGUE_EPILOGUE has been computed
|
||||
for. */
|
||||
@@ -2464,6 +2466,7 @@
|
||||
#define ix86_stack_locals (cfun->machine->stack_locals)
|
||||
#define ix86_save_varrargs_registers (cfun->machine->save_varrargs_registers)
|
||||
#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
|
||||
+#define ix86_current_function_needs_cld (cfun->machine->needs_cld)
|
||||
#define ix86_tls_descriptor_calls_expanded_in_cfun \
|
||||
(cfun->machine->tls_descriptor_call_expanded_p)
|
||||
/* Since tls_descriptor_call_expanded is not cleared, even if all TLS
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/i386/i386.md gcc-4.3.0/gcc/config/i386/i386.md
|
||||
--- gcc-4.3.0.orig/gcc/config/i386/i386.md 2008-02-06 12:34:00.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/i386/i386.md 2008-06-10 14:44:37.000000000 +0200
|
||||
@@ -205,6 +205,7 @@
|
||||
(UNSPECV_XCHG 12)
|
||||
(UNSPECV_LOCK 13)
|
||||
(UNSPECV_PROLOGUE_USE 14)
|
||||
+ (UNSPECV_CLD 15)
|
||||
])
|
||||
|
||||
;; Constants to represent pcomtrue/pcomfalse variants
|
||||
@@ -18529,6 +18530,14 @@
|
||||
|
||||
;; Block operation instructions
|
||||
|
||||
+(define_insn "cld"
|
||||
+ [(unspec_volatile [(const_int 0)] UNSPECV_CLD)]
|
||||
+ ""
|
||||
+ "cld"
|
||||
+ [(set_attr "length" "1")
|
||||
+ (set_attr "length_immediate" "0")
|
||||
+ (set_attr "modrm" "0")])
|
||||
+
|
||||
(define_expand "movmemsi"
|
||||
[(use (match_operand:BLK 0 "memory_operand" ""))
|
||||
(use (match_operand:BLK 1 "memory_operand" ""))
|
||||
@@ -18601,7 +18610,7 @@
|
||||
(set (match_operand 2 "register_operand" "")
|
||||
(match_operand 5 "" ""))])]
|
||||
"TARGET_SINGLE_STRINGOP || optimize_size"
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*strmovdi_rex_1"
|
||||
[(set (mem:DI (match_operand:DI 2 "register_operand" "0"))
|
||||
@@ -18718,7 +18727,7 @@
|
||||
(match_operand 3 "memory_operand" ""))
|
||||
(use (match_dup 4))])]
|
||||
""
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*rep_movdi_rex64"
|
||||
[(set (match_operand:DI 2 "register_operand" "=c") (const_int 0))
|
||||
@@ -18878,7 +18887,7 @@
|
||||
(set (match_operand 0 "register_operand" "")
|
||||
(match_operand 3 "" ""))])]
|
||||
"TARGET_SINGLE_STRINGOP || optimize_size"
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*strsetdi_rex_1"
|
||||
[(set (mem:DI (match_operand:DI 1 "register_operand" "0"))
|
||||
@@ -18972,7 +18981,7 @@
|
||||
(use (match_operand 3 "register_operand" ""))
|
||||
(use (match_dup 1))])]
|
||||
""
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*rep_stosdi_rex64"
|
||||
[(set (match_operand:DI 1 "register_operand" "=c") (const_int 0))
|
||||
@@ -19148,7 +19157,7 @@
|
||||
(clobber (match_operand 1 "register_operand" ""))
|
||||
(clobber (match_dup 2))])]
|
||||
""
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*cmpstrnqi_nz_1"
|
||||
[(set (reg:CC FLAGS_REG)
|
||||
@@ -19195,7 +19204,7 @@
|
||||
(clobber (match_operand 1 "register_operand" ""))
|
||||
(clobber (match_dup 2))])]
|
||||
""
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*cmpstrnqi_1"
|
||||
[(set (reg:CC FLAGS_REG)
|
||||
@@ -19264,7 +19273,7 @@
|
||||
(clobber (match_operand 1 "register_operand" ""))
|
||||
(clobber (reg:CC FLAGS_REG))])]
|
||||
""
|
||||
- "")
|
||||
+ "ix86_current_function_needs_cld = 1;")
|
||||
|
||||
(define_insn "*strlenqi_1"
|
||||
[(set (match_operand:SI 0 "register_operand" "=&c")
|
12
patches/gcc/4.3.0/300-gcc-3.4-libiberty-pic.patch
Normal file
12
patches/gcc/4.3.0/300-gcc-3.4-libiberty-pic.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/51_all_gcc-3.4-libiberty-pic.patch
|
||||
diff -durN gcc-4.3.0.orig/libiberty/Makefile.in gcc-4.3.0/libiberty/Makefile.in
|
||||
--- gcc-4.3.0.orig/libiberty/Makefile.in 2007-07-25 08:26:45.000000000 +0200
|
||||
+++ gcc-4.3.0/libiberty/Makefile.in 2008-06-10 14:44:43.000000000 +0200
|
||||
@@ -225,6 +225,7 @@
|
||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
||||
$(RANLIB) $(TARGETLIB); \
|
||||
+ cp $(TARGETLIB) ../ ; \
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
25
patches/gcc/4.3.0/325-gcc4-superh-default-multilib.patch
Normal file
25
patches/gcc/4.3.0/325-gcc4-superh-default-multilib.patch
Normal file
@ -0,0 +1,25 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/53_all_gcc4-superh-default-multilib.patch
|
||||
The gcc-3.x toolchains would contain all the targets by default. With gcc-4,
|
||||
you have to actually list out the multilibs you want or you will end up with
|
||||
just one when using targets like 'sh4-linux-gnu'.
|
||||
|
||||
The resulting toolchain can't even build a kernel as the kernel needs to build
|
||||
with the nofpu flag to be sure that no fpu ops are generated.
|
||||
|
||||
Here we restore the gcc-3.x behavior; the additional overhead of building all
|
||||
of these multilibs by default is negligible.
|
||||
|
||||
http://bugs.gentoo.org/140205
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config.gcc gcc-4.3.0/gcc/config.gcc
|
||||
--- gcc-4.3.0.orig/gcc/config.gcc 2008-01-29 17:28:10.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config.gcc 2008-06-10 14:44:47.000000000 +0200
|
||||
@@ -2271,7 +2271,7 @@
|
||||
if test x${sh_multilibs} = x ; then
|
||||
case ${target} in
|
||||
sh64-superh-linux* | \
|
||||
- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
|
||||
+ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
|
||||
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
|
||||
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
|
||||
sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
|
56
patches/gcc/4.3.0/350-300-libstdc++-pic.patch
Normal file
56
patches/gcc/4.3.0/350-300-libstdc++-pic.patch
Normal file
@ -0,0 +1,56 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/54_all_300-libstdc++-pic.patch
|
||||
install libstdc++_pic.a if we have pic objs
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/src/Makefile.am gcc-4.3.0/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/src/Makefile.am 2008-02-29 19:26:50.000000000 +0100
|
||||
+++ gcc-4.3.0/libstdc++-v3/src/Makefile.am 2008-06-10 14:44:51.000000000 +0200
|
||||
@@ -289,6 +289,13 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
|
||||
+ if [ x"$$pic_objs" != x ]; then \
|
||||
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
|
||||
+ fi
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/src/Makefile.in gcc-4.3.0/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/src/Makefile.in 2008-02-29 19:26:50.000000000 +0100
|
||||
+++ gcc-4.3.0/libstdc++-v3/src/Makefile.in 2008-06-10 14:44:51.000000000 +0200
|
||||
@@ -693,7 +693,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -732,7 +732,7 @@
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
- uninstall-toolexeclibLTLIBRARIES
|
||||
+ uninstall-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
|
||||
# Symbol versioning for shared libraries.
|
||||
@@ -858,6 +858,14 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
|
||||
+ if [ x"$$pic_objs" != x ]; then \
|
||||
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
|
||||
+ fi
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
59
patches/gcc/4.3.0/375-gcc43-pr35440.patch
Normal file
59
patches/gcc/4.3.0/375-gcc43-pr35440.patch
Normal file
@ -0,0 +1,59 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/60_all_gcc43-pr35440.patch
|
||||
2008-03-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/35440
|
||||
* c-pretty-print.c (pp_c_initializer_list): Handle CONSTRUCTOR
|
||||
for all types.
|
||||
|
||||
* gcc.dg/pr35440.c: New test.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/c-pretty-print.c gcc-4.3.0/gcc/c-pretty-print.c
|
||||
--- gcc-4.3.0.orig/gcc/c-pretty-print.c 2008-01-29 14:59:59.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/c-pretty-print.c 2008-06-10 14:44:54.000000000 +0200
|
||||
@@ -1173,6 +1173,12 @@
|
||||
tree type = TREE_TYPE (e);
|
||||
const enum tree_code code = TREE_CODE (type);
|
||||
|
||||
+ if (TREE_CODE (e) == CONSTRUCTOR)
|
||||
+ {
|
||||
+ pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
switch (code)
|
||||
{
|
||||
case RECORD_TYPE:
|
||||
@@ -1207,16 +1213,12 @@
|
||||
case VECTOR_TYPE:
|
||||
if (TREE_CODE (e) == VECTOR_CST)
|
||||
pp_c_expression_list (pp, TREE_VECTOR_CST_ELTS (e));
|
||||
- else if (TREE_CODE (e) == CONSTRUCTOR)
|
||||
- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
|
||||
else
|
||||
break;
|
||||
return;
|
||||
|
||||
case COMPLEX_TYPE:
|
||||
- if (TREE_CODE (e) == CONSTRUCTOR)
|
||||
- pp_c_constructor_elts (pp, CONSTRUCTOR_ELTS (e));
|
||||
- else if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
|
||||
+ if (TREE_CODE (e) == COMPLEX_CST || TREE_CODE (e) == COMPLEX_EXPR)
|
||||
{
|
||||
const bool cst = TREE_CODE (e) == COMPLEX_CST;
|
||||
pp_expression (pp, cst ? TREE_REALPART (e) : TREE_OPERAND (e, 0));
|
||||
diff -durN gcc-4.3.0.orig/gcc/testsuite/gcc.dg/pr35440.c gcc-4.3.0/gcc/testsuite/gcc.dg/pr35440.c
|
||||
--- gcc-4.3.0.orig/gcc/testsuite/gcc.dg/pr35440.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/testsuite/gcc.dg/pr35440.c 2008-06-10 14:44:54.000000000 +0200
|
||||
@@ -0,0 +1,12 @@
|
||||
+/* PR c/35440 */
|
||||
+/* { dg-do compile } */
|
||||
+/* { dg-options "-std=gnu99" } */
|
||||
+
|
||||
+struct A {};
|
||||
+struct B { int i; char j[2]; };
|
||||
+
|
||||
+void foo (void)
|
||||
+{
|
||||
+ (struct A){}(); /* { dg-error "called object" } */
|
||||
+ (struct B){ .i = 2, .j[1] = 1 }(); /* { dg-error "called object" } */
|
||||
+}
|
61
patches/gcc/4.3.0/400-gcc43-pr24170.patch
Normal file
61
patches/gcc/4.3.0/400-gcc43-pr24170.patch
Normal file
@ -0,0 +1,61 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/61_all_gcc43-pr24170.patch
|
||||
http://gcc.gnu.org/PR24170
|
||||
|
||||
2008-02-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR libgcj/24170:
|
||||
* java/io/natFilePosix.cc (File::performList): Don't use
|
||||
readdir_r.
|
||||
* configure, include/config.h.in: Rebuilt.
|
||||
* configure.ac: Don't check for readdir_r.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libjava/configure.ac gcc-4.3.0/libjava/configure.ac
|
||||
--- gcc-4.3.0.orig/libjava/configure.ac 2008-06-10 14:44:17.000000000 +0200
|
||||
+++ gcc-4.3.0/libjava/configure.ac 2008-06-10 14:44:58.000000000 +0200
|
||||
@@ -1030,7 +1030,7 @@
|
||||
PLATFORMNET=NoNet
|
||||
else
|
||||
AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
|
||||
- localtime_r readdir_r getpwuid_r getcwd \
|
||||
+ localtime_r getpwuid_r getcwd \
|
||||
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
|
||||
nl_langinfo setlocale \
|
||||
inet_pton uname inet_ntoa \
|
||||
diff -durN gcc-4.3.0.orig/libjava/include/config.h.in gcc-4.3.0/libjava/include/config.h.in
|
||||
--- gcc-4.3.0.orig/libjava/include/config.h.in 2007-07-31 18:17:21.000000000 +0200
|
||||
+++ gcc-4.3.0/libjava/include/config.h.in 2008-06-10 14:44:58.000000000 +0200
|
||||
@@ -214,9 +214,6 @@
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
-/* Define to 1 if you have the `readdir_r' function. */
|
||||
-#undef HAVE_READDIR_R
|
||||
-
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
#undef HAVE_READLINK
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libjava/java/io/natFilePosix.cc gcc-4.3.0/libjava/java/io/natFilePosix.cc
|
||||
--- gcc-4.3.0.orig/libjava/java/io/natFilePosix.cc 2007-08-04 23:50:01.000000000 +0200
|
||||
+++ gcc-4.3.0/libjava/java/io/natFilePosix.cc 2008-06-10 14:44:58.000000000 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
// natFile.cc - Native part of File class for POSIX.
|
||||
|
||||
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006
|
||||
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008
|
||||
Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
@@ -292,13 +292,7 @@
|
||||
|
||||
java::util::ArrayList *list = new java::util::ArrayList ();
|
||||
struct dirent *d;
|
||||
-#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS)
|
||||
- int name_max = pathconf (buf, _PC_NAME_MAX);
|
||||
- char dbuf[sizeof (struct dirent) + name_max + 1];
|
||||
- while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)
|
||||
-#else /* HAVE_READDIR_R */
|
||||
while ((d = readdir (dir)) != NULL)
|
||||
-#endif /* HAVE_READDIR_R */
|
||||
{
|
||||
// Omit "." and "..".
|
||||
if (d->d_name[0] == '.'
|
96
patches/gcc/4.3.0/425-gcc4-ia64-noteGNUstack.patch
Normal file
96
patches/gcc/4.3.0/425-gcc4-ia64-noteGNUstack.patch
Normal file
@ -0,0 +1,96 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/61_all_gcc4-ia64-noteGNUstack.patch
|
||||
2004-09-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
|
||||
on ppc64-linux.
|
||||
|
||||
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
|
||||
ia64-linux.
|
||||
* config/ia64/crtbegin.asm: Likewise.
|
||||
* config/ia64/crtend.asm: Likewise.
|
||||
* config/ia64/crti.asm: Likewise.
|
||||
* config/ia64/crtn.asm: Likewise.
|
||||
|
||||
2004-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtbegin.asm gcc-4.3.0/gcc/config/ia64/crtbegin.asm
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/crtbegin.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/ia64/crtbegin.asm 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -255,3 +255,7 @@
|
||||
.weak __cxa_finalize
|
||||
#endif
|
||||
.weak _Jv_RegisterClasses
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtend.asm gcc-4.3.0/gcc/config/ia64/crtend.asm
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/crtend.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/ia64/crtend.asm 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -122,3 +122,7 @@
|
||||
|
||||
br.ret.sptk.many rp
|
||||
.endp __do_global_ctors_aux
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/crti.asm gcc-4.3.0/gcc/config/ia64/crti.asm
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/crti.asm 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/ia64/crti.asm 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -64,3 +64,7 @@
|
||||
.body
|
||||
|
||||
# end of crti.asm
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/crtn.asm gcc-4.3.0/gcc/config/ia64/crtn.asm
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/crtn.asm 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/ia64/crtn.asm 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -54,3 +54,7 @@
|
||||
br.ret.sptk.many b0
|
||||
|
||||
# end of crtn.asm
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/lib1funcs.asm gcc-4.3.0/gcc/config/ia64/lib1funcs.asm
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/lib1funcs.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/ia64/lib1funcs.asm 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -792,3 +792,7 @@
|
||||
}
|
||||
.endp __floattitf
|
||||
#endif
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/ia64/linux.h gcc-4.3.0/gcc/config/ia64/linux.h
|
||||
--- gcc-4.3.0.orig/gcc/config/ia64/linux.h 2006-12-12 16:15:19.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/ia64/linux.h 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
|
||||
|
||||
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
+
|
||||
/* This is for -profile to use -lc_p instead of -lc. */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{profile:-p} %{G*}"
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/rs6000/ppc-asm.h gcc-4.3.0/gcc/config/rs6000/ppc-asm.h
|
||||
--- gcc-4.3.0.orig/gcc/config/rs6000/ppc-asm.h 2003-06-04 18:44:51.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/rs6000/ppc-asm.h 2008-06-10 14:45:02.000000000 +0200
|
||||
@@ -158,7 +158,7 @@
|
||||
.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
|
||||
#endif
|
||||
|
||||
-#if defined __linux__ && !defined __powerpc64__
|
||||
+#if defined __linux__
|
||||
.section .note.GNU-stack
|
||||
.previous
|
||||
#endif
|
198
patches/gcc/4.3.0/450-gcc4-noteGNUstack.patch
Normal file
198
patches/gcc/4.3.0/450-gcc4-noteGNUstack.patch
Normal file
@ -0,0 +1,198 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/62_all_gcc4-noteGNUstack.patch
|
||||
2005-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
|
||||
* src/s390/sysv.S: Likewise.
|
||||
* src/powerpc/linux64.S: Likewise.
|
||||
* src/powerpc/linux64_closure.S: Likewise.
|
||||
* src/powerpc/ppc_closure.S: Likewise.
|
||||
* src/powerpc/sysv.S: Likewise.
|
||||
* src/x86/unix64.S: Likewise.
|
||||
* src/x86/sysv.S: Likewise.
|
||||
* src/sparc/v8.S: Likewise.
|
||||
* src/sparc/v9.S: Likewise.
|
||||
* src/m68k/sysv.S: Likewise.
|
||||
* src/ia64/unix.S: Likewise.
|
||||
* src/arm/sysv.S: Likewise.
|
||||
|
||||
* ia64_save_regs_in_stack.s: Moved to...
|
||||
* ia64_save_regs_in_stack.S: ... this. Add .note.GNU-stack
|
||||
on Linux.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/boehm-gc/ia64_save_regs_in_stack.S gcc-4.3.0/boehm-gc/ia64_save_regs_in_stack.S
|
||||
--- gcc-4.3.0.orig/boehm-gc/ia64_save_regs_in_stack.S 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-4.3.0/boehm-gc/ia64_save_regs_in_stack.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -0,0 +1,15 @@
|
||||
+ .text
|
||||
+ .align 16
|
||||
+ .global GC_save_regs_in_stack
|
||||
+ .proc GC_save_regs_in_stack
|
||||
+GC_save_regs_in_stack:
|
||||
+ .bodyfoo.mpg
|
||||
+ flushrs
|
||||
+ ;;
|
||||
+ mov r8=ar.bsp
|
||||
+ br.ret.sptk.few rp
|
||||
+ .endp GC_save_regs_in_stack
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/boehm-gc/ia64_save_regs_in_stack.s gcc-4.3.0/boehm-gc/ia64_save_regs_in_stack.s
|
||||
--- gcc-4.3.0.orig/boehm-gc/ia64_save_regs_in_stack.s 2001-10-15 06:57:59.000000000 +0200
|
||||
+++ gcc-4.3.0/boehm-gc/ia64_save_regs_in_stack.s 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -1,12 +0,0 @@
|
||||
- .text
|
||||
- .align 16
|
||||
- .global GC_save_regs_in_stack
|
||||
- .proc GC_save_regs_in_stack
|
||||
-GC_save_regs_in_stack:
|
||||
- .body
|
||||
- flushrs
|
||||
- ;;
|
||||
- mov r8=ar.bsp
|
||||
- br.ret.sptk.few rp
|
||||
- .endp GC_save_regs_in_stack
|
||||
-
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/alpha/osf.S gcc-4.3.0/libffi/src/alpha/osf.S
|
||||
--- gcc-4.3.0.orig/libffi/src/alpha/osf.S 2007-04-06 18:24:16.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/alpha/osf.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -358,4 +358,8 @@
|
||||
.byte 16 # uleb128 offset 16*-8
|
||||
.align 3
|
||||
$LEFDE3:
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/arm/sysv.S gcc-4.3.0/libffi/src/arm/sysv.S
|
||||
--- gcc-4.3.0.orig/libffi/src/arm/sysv.S 2007-09-04 19:52:45.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/arm/sysv.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -293,3 +293,6 @@
|
||||
UNWIND .fnend
|
||||
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/ia64/unix.S gcc-4.3.0/libffi/src/ia64/unix.S
|
||||
--- gcc-4.3.0.orig/libffi/src/ia64/unix.S 2005-03-30 23:49:19.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/ia64/unix.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -553,3 +553,7 @@
|
||||
data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT
|
||||
data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE
|
||||
data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/m68k/sysv.S gcc-4.3.0/libffi/src/m68k/sysv.S
|
||||
--- gcc-4.3.0.orig/libffi/src/m68k/sysv.S 2007-05-10 23:29:04.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/m68k/sysv.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -207,3 +207,7 @@
|
||||
rts
|
||||
CFI_ENDPROC()
|
||||
.size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/powerpc/linux64.S gcc-4.3.0/libffi/src/powerpc/linux64.S
|
||||
--- gcc-4.3.0.orig/libffi/src/powerpc/linux64.S 2007-11-17 00:24:53.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/powerpc/linux64.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -179,3 +179,7 @@
|
||||
.align 3
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/powerpc/linux64_closure.S gcc-4.3.0/libffi/src/powerpc/linux64_closure.S
|
||||
--- gcc-4.3.0.orig/libffi/src/powerpc/linux64_closure.S 2005-08-11 23:18:24.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/powerpc/linux64_closure.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -204,3 +204,7 @@
|
||||
.align 3
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/powerpc/ppc_closure.S gcc-4.3.0/libffi/src/powerpc/ppc_closure.S
|
||||
--- gcc-4.3.0.orig/libffi/src/powerpc/ppc_closure.S 2007-12-01 22:00:04.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/powerpc/ppc_closure.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -295,3 +295,7 @@
|
||||
.LEFDE1:
|
||||
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/powerpc/sysv.S gcc-4.3.0/libffi/src/powerpc/sysv.S
|
||||
--- gcc-4.3.0.orig/libffi/src/powerpc/sysv.S 2007-12-01 22:00:04.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/powerpc/sysv.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -223,3 +223,7 @@
|
||||
.align 2
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/s390/sysv.S gcc-4.3.0/libffi/src/s390/sysv.S
|
||||
--- gcc-4.3.0.orig/libffi/src/s390/sysv.S 2003-10-21 21:01:58.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/s390/sysv.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -427,3 +427,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/sparc/v8.S gcc-4.3.0/libffi/src/sparc/v8.S
|
||||
--- gcc-4.3.0.orig/libffi/src/sparc/v8.S 2004-11-22 19:35:16.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/sparc/v8.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -265,3 +265,7 @@
|
||||
.byte 0x1f ! uleb128 0x1f
|
||||
.align WS
|
||||
.LLEFDE2:
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/sparc/v9.S gcc-4.3.0/libffi/src/sparc/v9.S
|
||||
--- gcc-4.3.0.orig/libffi/src/sparc/v9.S 2004-01-25 07:58:33.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/sparc/v9.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -300,3 +300,7 @@
|
||||
.align 8
|
||||
.LLEFDE2:
|
||||
#endif
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/x86/sysv.S gcc-4.3.0/libffi/src/x86/sysv.S
|
||||
--- gcc-4.3.0.orig/libffi/src/x86/sysv.S 2008-01-30 15:36:58.000000000 +0100
|
||||
+++ gcc-4.3.0/libffi/src/x86/sysv.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -430,3 +430,7 @@
|
||||
#endif
|
||||
|
||||
#endif /* ifndef __x86_64__ */
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.0.orig/libffi/src/x86/unix64.S gcc-4.3.0/libffi/src/x86/unix64.S
|
||||
--- gcc-4.3.0.orig/libffi/src/x86/unix64.S 2005-05-05 06:06:38.000000000 +0200
|
||||
+++ gcc-4.3.0/libffi/src/x86/unix64.S 2008-06-10 14:45:05.000000000 +0200
|
||||
@@ -410,3 +410,7 @@
|
||||
.LEFDE3:
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
21
patches/gcc/4.3.0/475-gcc43-pr35705.patch
Normal file
21
patches/gcc/4.3.0/475-gcc43-pr35705.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/63_all_gcc43-pr35705.patch
|
||||
http://gcc.gnu.org/PR35705
|
||||
|
||||
2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR middle-end/35705
|
||||
* fold-const.c (get_pointer_modulus_and_residue): Return modulus 1 if
|
||||
the expression is a function address.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/fold-const.c gcc-4.3.0/gcc/fold-const.c
|
||||
--- gcc-4.3.0.orig/gcc/fold-const.c 2008-02-27 15:12:33.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/fold-const.c 2008-06-10 14:45:09.000000000 +0200
|
||||
@@ -9357,7 +9357,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (DECL_P (expr))
|
||||
+ if (DECL_P (expr) && TREE_CODE (expr) != FUNCTION_DECL)
|
||||
return DECL_ALIGN_UNIT (expr);
|
||||
}
|
||||
else if (code == POINTER_PLUS_EXPR)
|
35
patches/gcc/4.3.0/500-gcc43-pr34571.patch
Normal file
35
patches/gcc/4.3.0/500-gcc43-pr34571.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/64_all_gcc43-pr34571.patch
|
||||
http://gcc.gnu.org/PR34571
|
||||
|
||||
2007-12-26 Rask Ingemann Lambertsen <rask@sygehus.dk>
|
||||
|
||||
PR target/34571
|
||||
* config/alpha/alpha.c (alpha_cannot_force_const_mem): Use
|
||||
symbolic_operand.
|
||||
* varasm.c (output_constant_pool_1): Fix typo.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/alpha/alpha.c gcc-4.3.0/gcc/config/alpha/alpha.c
|
||||
--- gcc-4.3.0.orig/gcc/config/alpha/alpha.c 2008-02-07 18:45:24.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/config/alpha/alpha.c 2008-06-10 14:45:13.000000000 +0200
|
||||
@@ -1113,8 +1113,7 @@
|
||||
static bool
|
||||
alpha_cannot_force_const_mem (rtx x)
|
||||
{
|
||||
- enum rtx_code code = GET_CODE (x);
|
||||
- return code == SYMBOL_REF || code == LABEL_REF || code == CONST;
|
||||
+ return symbolic_operand (x, GET_MODE (x));
|
||||
}
|
||||
|
||||
/* We do not allow indirect calls to be optimized into sibling calls, nor
|
||||
diff -durN gcc-4.3.0.orig/gcc/varasm.c gcc-4.3.0/gcc/varasm.c
|
||||
--- gcc-4.3.0.orig/gcc/varasm.c 2007-12-05 22:55:10.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/varasm.c 2008-06-10 14:45:13.000000000 +0200
|
||||
@@ -3710,7 +3710,7 @@
|
||||
/* FALLTHRU */
|
||||
|
||||
case LABEL_REF:
|
||||
- tmp = XEXP (x, 0);
|
||||
+ tmp = XEXP (tmp, 0);
|
||||
gcc_assert (!INSN_DELETED_P (tmp));
|
||||
gcc_assert (!NOTE_P (tmp)
|
||||
|| NOTE_KIND (tmp) != NOTE_INSN_DELETED);
|
23
patches/gcc/4.3.0/525-gcc43-pr35982.patch
Normal file
23
patches/gcc/4.3.0/525-gcc43-pr35982.patch
Normal file
@ -0,0 +1,23 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/65_all_gcc43-pr35982.patch
|
||||
http://gcc.gnu.org/PR35982
|
||||
|
||||
2008-04-23 Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
PR tree-optimization/35982
|
||||
* tree-vect-analyze.c (vect_check_interleaving): Check that the
|
||||
interleaved data-refs are of the same type.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/tree-vect-analyze.c gcc-4.3.0/gcc/tree-vect-analyze.c
|
||||
--- gcc-4.3.0.orig/gcc/tree-vect-analyze.c 2007-12-06 17:18:55.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/tree-vect-analyze.c 2008-06-10 14:45:17.000000000 +0200
|
||||
@@ -1081,7 +1081,9 @@
|
||||
type_size_b = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (drb))));
|
||||
|
||||
if (type_size_a != type_size_b
|
||||
- || tree_int_cst_compare (DR_STEP (dra), DR_STEP (drb)))
|
||||
+ || tree_int_cst_compare (DR_STEP (dra), DR_STEP (drb))
|
||||
+ || !types_compatible_p (TREE_TYPE (DR_REF (dra)),
|
||||
+ TREE_TYPE (DR_REF (drb))))
|
||||
return;
|
||||
|
||||
init_a = TREE_INT_CST_LOW (DR_INIT (dra));
|
21
patches/gcc/4.3.0/550-gcc43-pr25343.patch
Normal file
21
patches/gcc/4.3.0/550-gcc43-pr25343.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/66_all_gcc43-pr25343.patch
|
||||
http://gcc.gnu.org/PR25343
|
||||
|
||||
sniped from Debian
|
||||
|
||||
2008-04-27 Roman Zippel <zippel@linux-m68k.org>
|
||||
|
||||
* config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for __mc68000__.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/config/host-linux.c gcc-4.3.0/gcc/config/host-linux.c
|
||||
--- gcc-4.3.0.orig/gcc/config/host-linux.c 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config/host-linux.c 2008-06-10 14:45:20.000000000 +0200
|
||||
@@ -84,6 +84,8 @@
|
||||
# define TRY_EMPTY_VM_SPACE 0x8000000000
|
||||
#elif defined(__sparc__)
|
||||
# define TRY_EMPTY_VM_SPACE 0x60000000
|
||||
+#elif defined(__mc68000__)
|
||||
+# define TRY_EMPTY_VM_SPACE 0x40000000
|
||||
#else
|
||||
# define TRY_EMPTY_VM_SPACE 0
|
||||
#endif
|
28
patches/gcc/4.3.0/575-sh-pr24836.patch
Normal file
28
patches/gcc/4.3.0/575-sh-pr24836.patch
Normal file
@ -0,0 +1,28 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/74_all_sh-pr24836.patch
|
||||
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
|
||||
http://gcc.gnu.org/PR24836
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/configure gcc-4.3.0/gcc/configure
|
||||
--- gcc-4.3.0.orig/gcc/configure 2008-06-10 14:44:21.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/configure 2008-06-10 14:45:24.000000000 +0200
|
||||
@@ -14700,7 +14700,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
diff -durN gcc-4.3.0.orig/gcc/configure.ac gcc-4.3.0/gcc/configure.ac
|
||||
--- gcc-4.3.0.orig/gcc/configure.ac 2008-06-10 14:44:21.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/configure.ac 2008-06-10 14:45:24.000000000 +0200
|
||||
@@ -2533,7 +2533,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
19
patches/gcc/4.3.0/600-gcc-ca-translation-typo.patch
Normal file
19
patches/gcc/4.3.0/600-gcc-ca-translation-typo.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/gentoo/85_all_gcc-ca-translation-typo.patch
|
||||
http://bugs.gentoo.org/127190
|
||||
|
||||
2006-03-28 Harald van Dijk <truedfx@gentoo.org>
|
||||
|
||||
* ca.po: Fix printf flag typo in negative value translation.
|
||||
|
||||
diff -durN gcc-4.3.0.orig/gcc/po/ca.po gcc-4.3.0/gcc/po/ca.po
|
||||
--- gcc-4.3.0.orig/gcc/po/ca.po 2007-11-10 19:36:27.000000000 +0100
|
||||
+++ gcc-4.3.0/gcc/po/ca.po 2008-06-10 14:45:27.000000000 +0200
|
||||
@@ -36028,7 +36028,7 @@
|
||||
#~ msgstr "passant el valor negatiu `%E' per a %s %P de \"%D\""
|
||||
|
||||
#~ msgid "%s of negative value `%E' to `%T'"
|
||||
-#~ msgstr "%s de valor negatiu `%I' a \"%T\""
|
||||
+#~ msgstr "%s de valor negatiu `%E' a \"%T\""
|
||||
|
||||
#~ msgid "initializing array with parameter list"
|
||||
#~ msgstr "inicialitzant una matriu amb una llista de paràmetres"
|
13
patches/gcc/4.3.0/625-103-uclibc-conf-noupstream.patch
Normal file
13
patches/gcc/4.3.0/625-103-uclibc-conf-noupstream.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_103-uclibc-conf-noupstream.patch
|
||||
diff -durN gcc-4.3.0.orig/gcc/config.gcc gcc-4.3.0/gcc/config.gcc
|
||||
--- gcc-4.3.0.orig/gcc/config.gcc 2008-06-10 14:44:51.000000000 +0200
|
||||
+++ gcc-4.3.0/gcc/config.gcc 2008-06-10 14:45:31.000000000 +0200
|
||||
@@ -2142,7 +2142,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
2794
patches/gcc/4.3.0/650-200-uclibc-locale.patch
Normal file
2794
patches/gcc/4.3.0/650-200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
224
patches/gcc/4.3.0/675-203-uclibc-locale-no__x.patch
Normal file
224
patches/gcc/4.3.0/675-203-uclibc-locale-no__x.patch
Normal file
@ -0,0 +1,224 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_203-uclibc-locale-no__x.patch
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:45:39.000000000 +0200
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
51
patches/gcc/4.3.0/700-204-uclibc-locale-wchar_fix.patch
Normal file
51
patches/gcc/4.3.0/700-204-uclibc-locale-wchar_fix.patch
Normal file
@ -0,0 +1,51 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_204-uclibc-locale-wchar_fix.patch
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
355
patches/gcc/4.3.0/725-205-uclibc-locale-update.patch
Normal file
355
patches/gcc/4.3.0/725-205-uclibc-locale-update.patch
Normal file
@ -0,0 +1,355 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_205-uclibc-locale-update.patch
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -46,16 +46,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +60,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +74,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +101,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:45:43.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:45:46.000000000 +0200
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
13
patches/gcc/4.3.0/750-301-missing-execinfo_h.patch
Normal file
13
patches/gcc/4.3.0/750-301-missing-execinfo_h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_301-missing-execinfo_h.patch
|
||||
diff -durN gcc-4.3.0.orig/boehm-gc/include/gc.h gcc-4.3.0/boehm-gc/include/gc.h
|
||||
--- gcc-4.3.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
|
||||
+++ gcc-4.3.0/boehm-gc/include/gc.h 2008-06-10 14:45:50.000000000 +0200
|
||||
@@ -503,7 +503,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
14
patches/gcc/4.3.0/775-303-c99-complex-ugly-hack.patch
Normal file
14
patches/gcc/4.3.0/775-303-c99-complex-ugly-hack.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_303-c99-complex-ugly-hack.patch
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/configure gcc-4.3.0/libstdc++-v3/configure
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/configure 2008-06-10 14:45:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/configure 2008-06-10 14:45:54.000000000 +0200
|
||||
@@ -39006,6 +39006,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
27
patches/gcc/4.3.0/800-304-index_macro.patch
Normal file
27
patches/gcc/4.3.0/800-304-index_macro.patch
Normal file
@ -0,0 +1,27 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_304-index_macro.patch
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/include/ext/rope gcc-4.3.0/libstdc++-v3/include/ext/rope
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/include/ext/rope 2008-01-31 19:44:55.000000000 +0100
|
||||
+++ gcc-4.3.0/libstdc++-v3/include/ext/rope 2008-06-10 14:45:58.000000000 +0200
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/gthr.h>
|
||||
#include <tr1/functional>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.3.0/libstdc++-v3/include/ext/ropeimpl.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/include/ext/ropeimpl.h 2007-05-04 17:06:46.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/include/ext/ropeimpl.h 2008-06-10 14:45:58.000000000 +0200
|
||||
@@ -54,6 +54,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
49
patches/gcc/4.3.0/825-305-libmudflap-susv3-legacy.patch
Normal file
49
patches/gcc/4.3.0/825-305-libmudflap-susv3-legacy.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_305-libmudflap-susv3-legacy.patch
|
||||
diff -durN gcc-4.3.0.orig/libmudflap/mf-hooks2.c gcc-4.3.0/libmudflap/mf-hooks2.c
|
||||
--- gcc-4.3.0.orig/libmudflap/mf-hooks2.c 2005-09-23 23:58:39.000000000 +0200
|
||||
+++ gcc-4.3.0/libmudflap/mf-hooks2.c 2008-06-10 14:46:02.000000000 +0200
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
38
patches/gcc/4.3.0/850-306-libstdc++-namespace.patch
Normal file
38
patches/gcc/4.3.0/850-306-libstdc++-namespace.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.0/uclibc/90_all_306-libstdc++-namespace.patch
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:45:50.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:46:05.000000000 +0200
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -durN gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.3.0.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:45:50.000000000 +0200
|
||||
+++ gcc-4.3.0/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:46:05.000000000 +0200
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
34
patches/gcc/4.3.1/100-gcc-4.1-alpha-mieee-default.patch
Normal file
34
patches/gcc/4.3.1/100-gcc-4.1-alpha-mieee-default.patch
Normal file
@ -0,0 +1,34 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/00_all_gcc-4.1-alpha-mieee-default.patch
|
||||
Set the default behavior on alpha to use -mieee since the large majority of
|
||||
time we want this (bad/weird things can happen with packages built without
|
||||
-mieee).
|
||||
|
||||
To satisfy those people who may not want -mieee forced on them all the time,
|
||||
we also provide -mno-ieee.
|
||||
|
||||
Patch by Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/alpha/alpha.h gcc-4.3.1/gcc/config/alpha/alpha.h
|
||||
--- gcc-4.3.1.orig/gcc/config/alpha/alpha.h 2007-12-06 14:25:37.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/alpha/alpha.h 2008-06-10 14:56:36.000000000 +0200
|
||||
@@ -95,6 +95,8 @@
|
||||
while (0)
|
||||
#endif
|
||||
|
||||
+#define CPP_SPEC "%{!no-ieee:-mieee}"
|
||||
+
|
||||
#define WORD_SWITCH_TAKES_ARG(STR) \
|
||||
(!strcmp (STR, "rpath") || DEFAULT_WORD_SWITCH_TAKES_ARG(STR))
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/alpha/alpha.opt gcc-4.3.1/gcc/config/alpha/alpha.opt
|
||||
--- gcc-4.3.1.orig/gcc/config/alpha/alpha.opt 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/alpha/alpha.opt 2008-06-10 14:56:36.000000000 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
Request IEEE-conformant math library routines (OSF/1)
|
||||
|
||||
mieee
|
||||
-Target Report RejectNegative Mask(IEEE)
|
||||
+Target Report Mask(IEEE)
|
||||
Emit IEEE-conformant code, without inexact exceptions
|
||||
|
||||
mieee-with-inexact
|
35
patches/gcc/4.3.1/125-gcc-trampolinewarn.patch
Normal file
35
patches/gcc/4.3.1/125-gcc-trampolinewarn.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/00_all_gcc-trampolinewarn.patch
|
||||
This trivial patch causes gcc to emit a warning whenever
|
||||
it generates a trampoline. These are otherwise hard to
|
||||
locate. It is rigged to default ON - to have it default
|
||||
to OFF remove the text 'Init(1)' from the common.opt
|
||||
patch, leaving just 'Common Var(warn_trampolines)'.
|
||||
Kevin F. Quinn <kevquinn@gentoo.org> 17 Jan 2006
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/builtins.c gcc-4.3.1/gcc/builtins.c
|
||||
--- gcc-4.3.1.orig/gcc/builtins.c 2008-04-23 00:36:27.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/builtins.c 2008-06-10 14:56:54.000000000 +0200
|
||||
@@ -5662,6 +5662,9 @@
|
||||
trampolines_created = 1;
|
||||
INITIALIZE_TRAMPOLINE (r_tramp, r_func, r_chain);
|
||||
|
||||
+ if (warn_trampolines)
|
||||
+ warning (OPT_Wtrampolines, "generating trampoline in object (requires executable stack)");
|
||||
+
|
||||
return const0_rtx;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/common.opt gcc-4.3.1/gcc/common.opt
|
||||
--- gcc-4.3.1.orig/gcc/common.opt 2008-01-22 15:11:44.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/common.opt 2008-06-10 14:56:54.000000000 +0200
|
||||
@@ -182,6 +182,10 @@
|
||||
Common Var(warn_system_headers) Warning
|
||||
Do not suppress warnings from system headers
|
||||
|
||||
+Wtrampolines
|
||||
+Common Var(warn_trampolines) Init(1)
|
||||
+Warn whenever a trampoline is generated
|
||||
+
|
||||
Wuninitialized
|
||||
Common Var(warn_uninitialized) Warning
|
||||
Warn about uninitialized automatic variables
|
47
patches/gcc/4.3.1/150-gcc43-java-nomulti.patch
Normal file
47
patches/gcc/4.3.1/150-gcc43-java-nomulti.patch
Normal file
@ -0,0 +1,47 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/03_all_gcc43-java-nomulti.patch
|
||||
diff -durN gcc-4.3.1.orig/libjava/configure gcc-4.3.1/libjava/configure
|
||||
--- gcc-4.3.1.orig/libjava/configure 2008-06-06 16:49:11.000000000 +0200
|
||||
+++ gcc-4.3.1/libjava/configure 2008-06-10 14:57:38.000000000 +0200
|
||||
@@ -1018,6 +1018,8 @@
|
||||
--enable-gconf-peer compile GConf native peers for util.preferences
|
||||
--enable-java-maintainer-mode
|
||||
allow rebuilding of .class and .h files
|
||||
+ --enable-libjava-multilib
|
||||
+ build libjava as multilib
|
||||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-maintainer-mode enable make rules and dependencies not useful
|
||||
@@ -1850,6 +1852,16 @@
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-libjava-multilib was given.
|
||||
+if test "${enable_libjava_multilib+set}" = set; then
|
||||
+ enableval=$enable_libjava_multilib;
|
||||
+fi
|
||||
+
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libjava/configure.ac gcc-4.3.1/libjava/configure.ac
|
||||
--- gcc-4.3.1.orig/libjava/configure.ac 2007-12-22 16:48:46.000000000 +0100
|
||||
+++ gcc-4.3.1/libjava/configure.ac 2008-06-10 14:57:38.000000000 +0200
|
||||
@@ -82,6 +82,13 @@
|
||||
[allow rebuilding of .class and .h files]))
|
||||
AM_CONDITIONAL(JAVA_MAINTAINER_MODE, test "$enable_java_maintainer_mode" = yes)
|
||||
|
||||
+AC_ARG_ENABLE(libjava-multilib,
|
||||
+ AS_HELP_STRING([--enable-libjava-multilib], [build libjava as multilib]))
|
||||
+if test "$enable_libjava_multilib" = no; then
|
||||
+ multilib=no
|
||||
+ ac_configure_args="$ac_configure_args --disable-multilib"
|
||||
+fi
|
||||
+
|
||||
# It may not be safe to run linking tests in AC_PROG_CC/AC_PROG_CXX.
|
||||
GCC_NO_EXECUTABLES
|
||||
|
44
patches/gcc/4.3.1/175-gcc-4.1-cross-compile.patch
Normal file
44
patches/gcc/4.3.1/175-gcc-4.1-cross-compile.patch
Normal file
@ -0,0 +1,44 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/08_all_gcc-4.1-cross-compile.patch
|
||||
Some notes on the 'bootstrap with or without libc headers' debate:
|
||||
http://linuxfromscratch.org/pipermail/lfs-dev/2005-July/052409.html
|
||||
http://gcc.gnu.org/ml/gcc/2005-07/msg01195.html
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/configure gcc-4.3.1/gcc/configure
|
||||
--- gcc-4.3.1.orig/gcc/configure 2008-05-21 10:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/configure 2008-06-10 14:57:42.000000000 +0200
|
||||
@@ -13283,7 +13283,7 @@
|
||||
| powerpc*-*-*,powerpc64*-*-*)
|
||||
CROSS="$CROSS -DNATIVE_CROSS" ;;
|
||||
esac
|
||||
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
|
||||
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
|
||||
SYSTEM_HEADER_DIR=$build_system_header_dir
|
||||
fi
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/configure.ac gcc-4.3.1/gcc/configure.ac
|
||||
--- gcc-4.3.1.orig/gcc/configure.ac 2008-05-21 10:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/configure.ac 2008-06-10 14:57:42.000000000 +0200
|
||||
@@ -1749,7 +1749,7 @@
|
||||
| powerpc*-*-*,powerpc64*-*-*)
|
||||
CROSS="$CROSS -DNATIVE_CROSS" ;;
|
||||
esac
|
||||
-elif test "x$TARGET_SYSTEM_ROOT" != x; then
|
||||
+elif test "x$TARGET_SYSTEM_ROOT" != x -o $build != $host; then
|
||||
SYSTEM_HEADER_DIR=$build_system_header_dir
|
||||
fi
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/unwind-dw2.c gcc-4.3.1/gcc/unwind-dw2.c
|
||||
--- gcc-4.3.1.orig/gcc/unwind-dw2.c 2007-07-25 20:14:57.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/unwind-dw2.c 2008-06-10 14:57:42.000000000 +0200
|
||||
@@ -334,9 +334,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#ifndef inhibit_libc
|
||||
#ifdef MD_UNWIND_SUPPORT
|
||||
#include MD_UNWIND_SUPPORT
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/* Extract any interesting information from the CIE for the translation
|
||||
unit F belongs to. Return a pointer to the byte after the augmentation,
|
14
patches/gcc/4.3.1/200-gcc-netbsd-symbolic.patch
Normal file
14
patches/gcc/4.3.1/200-gcc-netbsd-symbolic.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/11_all_gcc-netbsd-symbolic.patch
|
||||
http://bugs.gentoo.org/122698
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/netbsd-elf.h gcc-4.3.1/gcc/config/netbsd-elf.h
|
||||
--- gcc-4.3.1.orig/gcc/config/netbsd-elf.h 2007-09-03 18:14:04.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/netbsd-elf.h 2008-06-10 14:57:48.000000000 +0200
|
||||
@@ -82,6 +82,7 @@
|
||||
#define NETBSD_LINK_SPEC_ELF \
|
||||
"%{assert*} %{R*} %{rpath*} \
|
||||
%{shared:-shared} \
|
||||
+ %{symbolic:-Bsymbolic} \
|
||||
%{!shared: \
|
||||
-dc -dp \
|
||||
%{!nostdlib: \
|
30
patches/gcc/4.3.1/225-gcc-sparc64-bsd.patch
Normal file
30
patches/gcc/4.3.1/225-gcc-sparc64-bsd.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/14_all_gcc-sparc64-bsd.patch
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/sparc/freebsd.h gcc-4.3.1/gcc/config/sparc/freebsd.h
|
||||
--- gcc-4.3.1.orig/gcc/config/sparc/freebsd.h 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/sparc/freebsd.h 2008-06-10 14:57:54.000000000 +0200
|
||||
@@ -25,9 +25,22 @@
|
||||
/* FreeBSD needs the platform name (sparc64) defined.
|
||||
Emacs needs to know if the arch is 64 or 32-bits. */
|
||||
|
||||
-#undef CPP_CPU64_DEFAULT_SPEC
|
||||
-#define CPP_CPU64_DEFAULT_SPEC \
|
||||
- "-D__sparc64__ -D__sparc_v9__ -D__sparcv9 -D__arch64__"
|
||||
+#undef FBSD_TARGET_CPU_CPP_BUILTINS
|
||||
+#define FBSD_TARGET_CPU_CPP_BUILTINS() \
|
||||
+ do \
|
||||
+ { \
|
||||
+ if (TARGET_ARCH64) \
|
||||
+ { \
|
||||
+ builtin_define ("__sparc64__"); \
|
||||
+ builtin_define ("__sparc_v9__"); \
|
||||
+ builtin_define ("__sparcv9"); \
|
||||
+ } \
|
||||
+ else \
|
||||
+ builtin_define ("__sparc"); \
|
||||
+ builtin_define ("__sparc__"); \
|
||||
+ } \
|
||||
+ while (0)
|
||||
+
|
||||
|
||||
#define LINK_SPEC "%(link_arch) \
|
||||
%{!mno-relax:%{!r:-relax}} \
|
76
patches/gcc/4.3.1/250-904-flatten-switch-stmt-00.patch
Normal file
76
patches/gcc/4.3.1/250-904-flatten-switch-stmt-00.patch
Normal file
@ -0,0 +1,76 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/18_all_904-flatten-switch-stmt-00.patch
|
||||
http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00927.html
|
||||
|
||||
Hi,
|
||||
|
||||
The attached patch makes sure that we create smaller object code for
|
||||
simple switch statements. We just make sure to flatten the switch
|
||||
statement into an if-else chain, basically.
|
||||
|
||||
This fixes a size-regression as compared to gcc-3.4, as can be seen
|
||||
below.
|
||||
|
||||
2007-04-15 Bernhard Fischer <..>
|
||||
|
||||
* stmt.c (expand_case): Do not create a complex binary tree when
|
||||
optimizing for size but rather use the simple ordered list.
|
||||
(emit_case_nodes): do not emit jumps to the default_label when
|
||||
optimizing for size.
|
||||
|
||||
Not regtested so far.
|
||||
Comments?
|
||||
|
||||
Attached is the test switch.c mentioned below.
|
||||
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
|
||||
$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
|
||||
gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
|
||||
|
||||
$ size switch-*.o
|
||||
text data bss dec hex filename
|
||||
169 0 0 169 a9 switch-2.95.o
|
||||
115 0 0 115 73 switch-3.3.o
|
||||
103 0 0 103 67 switch-3.4.o
|
||||
124 0 0 124 7c switch-4.0.o
|
||||
124 0 0 124 7c switch-4.1.o
|
||||
124 0 0 124 7c switch-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-4.3-HEAD.o
|
||||
124 0 0 124 7c switch-4.3.orig-HEAD.o
|
||||
166 0 0 166 a6 switch-CHAIN-2.95.o
|
||||
111 0 0 111 6f switch-CHAIN-3.3.o
|
||||
95 0 0 95 5f switch-CHAIN-3.4.o
|
||||
95 0 0 95 5f switch-CHAIN-4.0.o
|
||||
95 0 0 95 5f switch-CHAIN-4.1.o
|
||||
95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
|
||||
95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
|
||||
|
||||
|
||||
Content-Type: text/x-diff; charset=us-ascii
|
||||
Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/stmt.c gcc-4.3.1/gcc/stmt.c
|
||||
--- gcc-4.3.1.orig/gcc/stmt.c 2008-05-09 20:12:13.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/stmt.c 2008-06-10 14:57:58.000000000 +0200
|
||||
@@ -2509,7 +2509,11 @@
|
||||
use_cost_table
|
||||
= (TREE_CODE (orig_type) != ENUMERAL_TYPE
|
||||
&& estimate_case_costs (case_list));
|
||||
- balance_case_nodes (&case_list, NULL);
|
||||
+ /* When optimizing for size, we want a straight list to avoid
|
||||
+ jumps as much as possible. This basically creates an if-else
|
||||
+ chain. */
|
||||
+ if (!optimize_size)
|
||||
+ balance_case_nodes (&case_list, NULL);
|
||||
emit_case_nodes (index, case_list, default_label, index_type);
|
||||
emit_jump (default_label);
|
||||
}
|
||||
@@ -3067,6 +3071,7 @@
|
||||
{
|
||||
if (!node_has_low_bound (node, index_type))
|
||||
{
|
||||
+ if (!optimize_size) /* don't jl to the .default_label. */
|
||||
emit_cmp_and_jump_insns (index,
|
||||
convert_modes
|
||||
(mode, imode,
|
12
patches/gcc/4.3.1/275-gcc-3.4-libiberty-pic.patch
Normal file
12
patches/gcc/4.3.1/275-gcc-3.4-libiberty-pic.patch
Normal file
@ -0,0 +1,12 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/51_all_gcc-3.4-libiberty-pic.patch
|
||||
diff -durN gcc-4.3.1.orig/libiberty/Makefile.in gcc-4.3.1/libiberty/Makefile.in
|
||||
--- gcc-4.3.1.orig/libiberty/Makefile.in 2007-07-25 08:26:45.000000000 +0200
|
||||
+++ gcc-4.3.1/libiberty/Makefile.in 2008-06-10 14:58:02.000000000 +0200
|
||||
@@ -225,6 +225,7 @@
|
||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
||||
$(RANLIB) $(TARGETLIB); \
|
||||
+ cp $(TARGETLIB) ../ ; \
|
||||
cd ..; \
|
||||
else true; fi
|
||||
|
25
patches/gcc/4.3.1/300-gcc4-superh-default-multilib.patch
Normal file
25
patches/gcc/4.3.1/300-gcc4-superh-default-multilib.patch
Normal file
@ -0,0 +1,25 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/53_all_gcc4-superh-default-multilib.patch
|
||||
The gcc-3.x toolchains would contain all the targets by default. With gcc-4,
|
||||
you have to actually list out the multilibs you want or you will end up with
|
||||
just one when using targets like 'sh4-linux-gnu'.
|
||||
|
||||
The resulting toolchain can't even build a kernel as the kernel needs to build
|
||||
with the nofpu flag to be sure that no fpu ops are generated.
|
||||
|
||||
Here we restore the gcc-3.x behavior; the additional overhead of building all
|
||||
of these multilibs by default is negligible.
|
||||
|
||||
http://bugs.gentoo.org/140205
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config.gcc gcc-4.3.1/gcc/config.gcc
|
||||
--- gcc-4.3.1.orig/gcc/config.gcc 2008-05-21 10:54:15.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config.gcc 2008-06-10 14:58:06.000000000 +0200
|
||||
@@ -2278,7 +2278,7 @@
|
||||
if test x${sh_multilibs} = x ; then
|
||||
case ${target} in
|
||||
sh64-superh-linux* | \
|
||||
- sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
|
||||
+ sh[1234]*) sh_multilibs=`cd ${srcdir}/config/sh ; echo t-mlib-sh[1-4]* | sed 's:t-mlib-sh:,m:g;s: ::g'` ;;
|
||||
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
|
||||
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
|
||||
sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
|
56
patches/gcc/4.3.1/325-300-libstdc++-pic.patch
Normal file
56
patches/gcc/4.3.1/325-300-libstdc++-pic.patch
Normal file
@ -0,0 +1,56 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/54_all_300-libstdc++-pic.patch
|
||||
install libstdc++_pic.a if we have pic objs
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/src/Makefile.am gcc-4.3.1/libstdc++-v3/src/Makefile.am
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/src/Makefile.am 2008-02-29 19:26:50.000000000 +0100
|
||||
+++ gcc-4.3.1/libstdc++-v3/src/Makefile.am 2008-06-10 14:58:09.000000000 +0200
|
||||
@@ -289,6 +289,13 @@
|
||||
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
|
||||
|
||||
|
||||
+install-exec-local:
|
||||
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
|
||||
+ if [ x"$$pic_objs" != x ]; then \
|
||||
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
|
||||
+ fi
|
||||
+
|
||||
# Added bits to build debug library.
|
||||
if GLIBCXX_BUILD_DEBUG
|
||||
all-local: build_debug
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/src/Makefile.in gcc-4.3.1/libstdc++-v3/src/Makefile.in
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/src/Makefile.in 2008-02-29 19:26:50.000000000 +0100
|
||||
+++ gcc-4.3.1/libstdc++-v3/src/Makefile.in 2008-06-10 14:58:09.000000000 +0200
|
||||
@@ -693,7 +693,7 @@
|
||||
|
||||
install-data-am: install-data-local
|
||||
|
||||
-install-exec-am: install-toolexeclibLTLIBRARIES
|
||||
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
@@ -732,7 +732,7 @@
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-info-am \
|
||||
- uninstall-toolexeclibLTLIBRARIES
|
||||
+ uninstall-toolexeclibLTLIBRARIES install-exec-local
|
||||
|
||||
|
||||
# Symbol versioning for shared libraries.
|
||||
@@ -858,6 +858,14 @@
|
||||
install_debug:
|
||||
(cd ${debugdir} && $(MAKE) \
|
||||
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
|
||||
+
|
||||
+install-exec-local:
|
||||
+ pic_objs=`sed -n "s:'::g;s:^pic_object=::p" *.lo | grep -v '^none$$'`; \
|
||||
+ if [ x"$$pic_objs" != x ]; then \
|
||||
+ $(AR) cru libstdc++_pic.a $$pic_objs $(top_builddir)/libsupc++/*.o || exit 1; \
|
||||
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir) || exit 1; \
|
||||
+ fi
|
||||
+
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
61
patches/gcc/4.3.1/350-gcc43-pr24170.patch
Normal file
61
patches/gcc/4.3.1/350-gcc43-pr24170.patch
Normal file
@ -0,0 +1,61 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/61_all_gcc43-pr24170.patch
|
||||
http://gcc.gnu.org/PR24170
|
||||
|
||||
2008-02-20 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
PR libgcj/24170:
|
||||
* java/io/natFilePosix.cc (File::performList): Don't use
|
||||
readdir_r.
|
||||
* configure, include/config.h.in: Rebuilt.
|
||||
* configure.ac: Don't check for readdir_r.
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libjava/configure.ac gcc-4.3.1/libjava/configure.ac
|
||||
--- gcc-4.3.1.orig/libjava/configure.ac 2008-06-10 14:57:42.000000000 +0200
|
||||
+++ gcc-4.3.1/libjava/configure.ac 2008-06-10 14:58:13.000000000 +0200
|
||||
@@ -1030,7 +1030,7 @@
|
||||
PLATFORMNET=NoNet
|
||||
else
|
||||
AC_CHECK_FUNCS([strerror_r select fstat open fsync sleep opendir \
|
||||
- localtime_r readdir_r getpwuid_r getcwd \
|
||||
+ localtime_r getpwuid_r getcwd \
|
||||
access stat lstat mkdir rename rmdir unlink utime chmod readlink \
|
||||
nl_langinfo setlocale \
|
||||
inet_pton uname inet_ntoa \
|
||||
diff -durN gcc-4.3.1.orig/libjava/include/config.h.in gcc-4.3.1/libjava/include/config.h.in
|
||||
--- gcc-4.3.1.orig/libjava/include/config.h.in 2007-07-31 18:17:21.000000000 +0200
|
||||
+++ gcc-4.3.1/libjava/include/config.h.in 2008-06-10 14:58:13.000000000 +0200
|
||||
@@ -214,9 +214,6 @@
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
-/* Define to 1 if you have the `readdir_r' function. */
|
||||
-#undef HAVE_READDIR_R
|
||||
-
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
#undef HAVE_READLINK
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libjava/java/io/natFilePosix.cc gcc-4.3.1/libjava/java/io/natFilePosix.cc
|
||||
--- gcc-4.3.1.orig/libjava/java/io/natFilePosix.cc 2007-08-04 23:50:01.000000000 +0200
|
||||
+++ gcc-4.3.1/libjava/java/io/natFilePosix.cc 2008-06-10 14:58:13.000000000 +0200
|
||||
@@ -1,6 +1,6 @@
|
||||
// natFile.cc - Native part of File class for POSIX.
|
||||
|
||||
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006
|
||||
+/* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2008
|
||||
Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
@@ -292,13 +292,7 @@
|
||||
|
||||
java::util::ArrayList *list = new java::util::ArrayList ();
|
||||
struct dirent *d;
|
||||
-#if defined(HAVE_READDIR_R) && defined(_POSIX_PTHREAD_SEMANTICS)
|
||||
- int name_max = pathconf (buf, _PC_NAME_MAX);
|
||||
- char dbuf[sizeof (struct dirent) + name_max + 1];
|
||||
- while (readdir_r (dir, (struct dirent *) dbuf, &d) == 0 && d != NULL)
|
||||
-#else /* HAVE_READDIR_R */
|
||||
while ((d = readdir (dir)) != NULL)
|
||||
-#endif /* HAVE_READDIR_R */
|
||||
{
|
||||
// Omit "." and "..".
|
||||
if (d->d_name[0] == '.'
|
96
patches/gcc/4.3.1/375-gcc4-ia64-noteGNUstack.patch
Normal file
96
patches/gcc/4.3.1/375-gcc4-ia64-noteGNUstack.patch
Normal file
@ -0,0 +1,96 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/61_all_gcc4-ia64-noteGNUstack.patch
|
||||
2004-09-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
|
||||
on ppc64-linux.
|
||||
|
||||
* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
|
||||
ia64-linux.
|
||||
* config/ia64/crtbegin.asm: Likewise.
|
||||
* config/ia64/crtend.asm: Likewise.
|
||||
* config/ia64/crti.asm: Likewise.
|
||||
* config/ia64/crtn.asm: Likewise.
|
||||
|
||||
2004-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/crtbegin.asm gcc-4.3.1/gcc/config/ia64/crtbegin.asm
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/crtbegin.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/ia64/crtbegin.asm 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -255,3 +255,7 @@
|
||||
.weak __cxa_finalize
|
||||
#endif
|
||||
.weak _Jv_RegisterClasses
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/crtend.asm gcc-4.3.1/gcc/config/ia64/crtend.asm
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/crtend.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/ia64/crtend.asm 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -122,3 +122,7 @@
|
||||
|
||||
br.ret.sptk.many rp
|
||||
.endp __do_global_ctors_aux
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/crti.asm gcc-4.3.1/gcc/config/ia64/crti.asm
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/crti.asm 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/ia64/crti.asm 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -64,3 +64,7 @@
|
||||
.body
|
||||
|
||||
# end of crti.asm
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/crtn.asm gcc-4.3.1/gcc/config/ia64/crtn.asm
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/crtn.asm 2005-06-25 03:22:41.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/ia64/crtn.asm 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -54,3 +54,7 @@
|
||||
br.ret.sptk.many b0
|
||||
|
||||
# end of crtn.asm
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/lib1funcs.asm gcc-4.3.1/gcc/config/ia64/lib1funcs.asm
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/lib1funcs.asm 2005-09-27 02:52:24.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/ia64/lib1funcs.asm 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -792,3 +792,7 @@
|
||||
}
|
||||
.endp __floattitf
|
||||
#endif
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+.section .note.GNU-stack; .previous
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/ia64/linux.h gcc-4.3.1/gcc/config/ia64/linux.h
|
||||
--- gcc-4.3.1.orig/gcc/config/ia64/linux.h 2006-12-12 16:15:19.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/ia64/linux.h 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
|
||||
|
||||
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
|
||||
+
|
||||
/* This is for -profile to use -lc_p instead of -lc. */
|
||||
#undef CC1_SPEC
|
||||
#define CC1_SPEC "%{profile:-p} %{G*}"
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/rs6000/ppc-asm.h gcc-4.3.1/gcc/config/rs6000/ppc-asm.h
|
||||
--- gcc-4.3.1.orig/gcc/config/rs6000/ppc-asm.h 2003-06-04 18:44:51.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/rs6000/ppc-asm.h 2008-06-10 14:58:17.000000000 +0200
|
||||
@@ -158,7 +158,7 @@
|
||||
.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
|
||||
#endif
|
||||
|
||||
-#if defined __linux__ && !defined __powerpc64__
|
||||
+#if defined __linux__
|
||||
.section .note.GNU-stack
|
||||
.previous
|
||||
#endif
|
198
patches/gcc/4.3.1/400-gcc4-noteGNUstack.patch
Normal file
198
patches/gcc/4.3.1/400-gcc4-noteGNUstack.patch
Normal file
@ -0,0 +1,198 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/62_all_gcc4-noteGNUstack.patch
|
||||
2005-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* src/alpha/osf.S: Add .note.GNU-stack on Linux.
|
||||
* src/s390/sysv.S: Likewise.
|
||||
* src/powerpc/linux64.S: Likewise.
|
||||
* src/powerpc/linux64_closure.S: Likewise.
|
||||
* src/powerpc/ppc_closure.S: Likewise.
|
||||
* src/powerpc/sysv.S: Likewise.
|
||||
* src/x86/unix64.S: Likewise.
|
||||
* src/x86/sysv.S: Likewise.
|
||||
* src/sparc/v8.S: Likewise.
|
||||
* src/sparc/v9.S: Likewise.
|
||||
* src/m68k/sysv.S: Likewise.
|
||||
* src/ia64/unix.S: Likewise.
|
||||
* src/arm/sysv.S: Likewise.
|
||||
|
||||
* ia64_save_regs_in_stack.s: Moved to...
|
||||
* ia64_save_regs_in_stack.S: ... this. Add .note.GNU-stack
|
||||
on Linux.
|
||||
|
||||
diff -durN gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.S gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.S
|
||||
--- gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.S 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -0,0 +1,15 @@
|
||||
+ .text
|
||||
+ .align 16
|
||||
+ .global GC_save_regs_in_stack
|
||||
+ .proc GC_save_regs_in_stack
|
||||
+GC_save_regs_in_stack:
|
||||
+ .bodyfoo.mpg
|
||||
+ flushrs
|
||||
+ ;;
|
||||
+ mov r8=ar.bsp
|
||||
+ br.ret.sptk.few rp
|
||||
+ .endp GC_save_regs_in_stack
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.s gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.s
|
||||
--- gcc-4.3.1.orig/boehm-gc/ia64_save_regs_in_stack.s 2001-10-15 06:57:59.000000000 +0200
|
||||
+++ gcc-4.3.1/boehm-gc/ia64_save_regs_in_stack.s 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -1,12 +0,0 @@
|
||||
- .text
|
||||
- .align 16
|
||||
- .global GC_save_regs_in_stack
|
||||
- .proc GC_save_regs_in_stack
|
||||
-GC_save_regs_in_stack:
|
||||
- .body
|
||||
- flushrs
|
||||
- ;;
|
||||
- mov r8=ar.bsp
|
||||
- br.ret.sptk.few rp
|
||||
- .endp GC_save_regs_in_stack
|
||||
-
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/alpha/osf.S gcc-4.3.1/libffi/src/alpha/osf.S
|
||||
--- gcc-4.3.1.orig/libffi/src/alpha/osf.S 2007-04-06 18:24:16.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/alpha/osf.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -358,4 +358,8 @@
|
||||
.byte 16 # uleb128 offset 16*-8
|
||||
.align 3
|
||||
$LEFDE3:
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/arm/sysv.S gcc-4.3.1/libffi/src/arm/sysv.S
|
||||
--- gcc-4.3.1.orig/libffi/src/arm/sysv.S 2007-09-04 19:52:45.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/arm/sysv.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -293,3 +293,6 @@
|
||||
UNWIND .fnend
|
||||
.size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
|
||||
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",%progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/ia64/unix.S gcc-4.3.1/libffi/src/ia64/unix.S
|
||||
--- gcc-4.3.1.orig/libffi/src/ia64/unix.S 2005-03-30 23:49:19.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/ia64/unix.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -553,3 +553,7 @@
|
||||
data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT
|
||||
data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE
|
||||
data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/m68k/sysv.S gcc-4.3.1/libffi/src/m68k/sysv.S
|
||||
--- gcc-4.3.1.orig/libffi/src/m68k/sysv.S 2007-05-10 23:29:04.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/m68k/sysv.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -207,3 +207,7 @@
|
||||
rts
|
||||
CFI_ENDPROC()
|
||||
.size ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/powerpc/linux64.S gcc-4.3.1/libffi/src/powerpc/linux64.S
|
||||
--- gcc-4.3.1.orig/libffi/src/powerpc/linux64.S 2007-11-17 00:24:53.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/powerpc/linux64.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -179,3 +179,7 @@
|
||||
.align 3
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/powerpc/linux64_closure.S gcc-4.3.1/libffi/src/powerpc/linux64_closure.S
|
||||
--- gcc-4.3.1.orig/libffi/src/powerpc/linux64_closure.S 2005-08-11 23:18:24.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/powerpc/linux64_closure.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -204,3 +204,7 @@
|
||||
.align 3
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/powerpc/ppc_closure.S gcc-4.3.1/libffi/src/powerpc/ppc_closure.S
|
||||
--- gcc-4.3.1.orig/libffi/src/powerpc/ppc_closure.S 2007-12-01 22:00:04.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/powerpc/ppc_closure.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -295,3 +295,7 @@
|
||||
.LEFDE1:
|
||||
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/powerpc/sysv.S gcc-4.3.1/libffi/src/powerpc/sysv.S
|
||||
--- gcc-4.3.1.orig/libffi/src/powerpc/sysv.S 2007-12-01 22:00:04.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/powerpc/sysv.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -223,3 +223,7 @@
|
||||
.align 2
|
||||
.LEFDE1:
|
||||
#endif
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/s390/sysv.S gcc-4.3.1/libffi/src/s390/sysv.S
|
||||
--- gcc-4.3.1.orig/libffi/src/s390/sysv.S 2003-10-21 21:01:58.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/s390/sysv.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -427,3 +427,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/sparc/v8.S gcc-4.3.1/libffi/src/sparc/v8.S
|
||||
--- gcc-4.3.1.orig/libffi/src/sparc/v8.S 2004-11-22 19:35:16.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/sparc/v8.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -265,3 +265,7 @@
|
||||
.byte 0x1f ! uleb128 0x1f
|
||||
.align WS
|
||||
.LLEFDE2:
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/sparc/v9.S gcc-4.3.1/libffi/src/sparc/v9.S
|
||||
--- gcc-4.3.1.orig/libffi/src/sparc/v9.S 2004-01-25 07:58:33.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/sparc/v9.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -300,3 +300,7 @@
|
||||
.align 8
|
||||
.LLEFDE2:
|
||||
#endif
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/x86/sysv.S gcc-4.3.1/libffi/src/x86/sysv.S
|
||||
--- gcc-4.3.1.orig/libffi/src/x86/sysv.S 2008-01-30 15:36:58.000000000 +0100
|
||||
+++ gcc-4.3.1/libffi/src/x86/sysv.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -430,3 +430,7 @@
|
||||
#endif
|
||||
|
||||
#endif /* ifndef __x86_64__ */
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
||||
diff -durN gcc-4.3.1.orig/libffi/src/x86/unix64.S gcc-4.3.1/libffi/src/x86/unix64.S
|
||||
--- gcc-4.3.1.orig/libffi/src/x86/unix64.S 2005-05-05 06:06:38.000000000 +0200
|
||||
+++ gcc-4.3.1/libffi/src/x86/unix64.S 2008-06-10 14:58:21.000000000 +0200
|
||||
@@ -410,3 +410,7 @@
|
||||
.LEFDE3:
|
||||
|
||||
#endif /* __x86_64__ */
|
||||
+
|
||||
+#if defined __ELF__ && defined __linux__
|
||||
+ .section .note.GNU-stack,"",@progbits
|
||||
+#endif
|
35
patches/gcc/4.3.1/425-gcc43-pr34571.patch
Normal file
35
patches/gcc/4.3.1/425-gcc43-pr34571.patch
Normal file
@ -0,0 +1,35 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/64_all_gcc43-pr34571.patch
|
||||
http://gcc.gnu.org/PR34571
|
||||
|
||||
2007-12-26 Rask Ingemann Lambertsen <rask@sygehus.dk>
|
||||
|
||||
PR target/34571
|
||||
* config/alpha/alpha.c (alpha_cannot_force_const_mem): Use
|
||||
symbolic_operand.
|
||||
* varasm.c (output_constant_pool_1): Fix typo.
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/alpha/alpha.c gcc-4.3.1/gcc/config/alpha/alpha.c
|
||||
--- gcc-4.3.1.orig/gcc/config/alpha/alpha.c 2008-02-07 18:45:24.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/config/alpha/alpha.c 2008-06-10 14:58:24.000000000 +0200
|
||||
@@ -1113,8 +1113,7 @@
|
||||
static bool
|
||||
alpha_cannot_force_const_mem (rtx x)
|
||||
{
|
||||
- enum rtx_code code = GET_CODE (x);
|
||||
- return code == SYMBOL_REF || code == LABEL_REF || code == CONST;
|
||||
+ return symbolic_operand (x, GET_MODE (x));
|
||||
}
|
||||
|
||||
/* We do not allow indirect calls to be optimized into sibling calls, nor
|
||||
diff -durN gcc-4.3.1.orig/gcc/varasm.c gcc-4.3.1/gcc/varasm.c
|
||||
--- gcc-4.3.1.orig/gcc/varasm.c 2007-12-05 22:55:10.000000000 +0100
|
||||
+++ gcc-4.3.1/gcc/varasm.c 2008-06-10 14:58:24.000000000 +0200
|
||||
@@ -3710,7 +3710,7 @@
|
||||
/* FALLTHRU */
|
||||
|
||||
case LABEL_REF:
|
||||
- tmp = XEXP (x, 0);
|
||||
+ tmp = XEXP (tmp, 0);
|
||||
gcc_assert (!INSN_DELETED_P (tmp));
|
||||
gcc_assert (!NOTE_P (tmp)
|
||||
|| NOTE_KIND (tmp) != NOTE_INSN_DELETED);
|
21
patches/gcc/4.3.1/450-gcc43-pr25343.patch
Normal file
21
patches/gcc/4.3.1/450-gcc43-pr25343.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/66_all_gcc43-pr25343.patch
|
||||
http://gcc.gnu.org/PR25343
|
||||
|
||||
sniped from Debian
|
||||
|
||||
2008-04-27 Roman Zippel <zippel@linux-m68k.org>
|
||||
|
||||
* config/host-linux.c (TRY_EMPTY_VM_SPACE): Define for __mc68000__.
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/config/host-linux.c gcc-4.3.1/gcc/config/host-linux.c
|
||||
--- gcc-4.3.1.orig/gcc/config/host-linux.c 2007-08-02 12:49:31.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config/host-linux.c 2008-06-10 14:58:28.000000000 +0200
|
||||
@@ -84,6 +84,8 @@
|
||||
# define TRY_EMPTY_VM_SPACE 0x8000000000
|
||||
#elif defined(__sparc__)
|
||||
# define TRY_EMPTY_VM_SPACE 0x60000000
|
||||
+#elif defined(__mc68000__)
|
||||
+# define TRY_EMPTY_VM_SPACE 0x40000000
|
||||
#else
|
||||
# define TRY_EMPTY_VM_SPACE 0
|
||||
#endif
|
28
patches/gcc/4.3.1/475-sh-pr24836.patch
Normal file
28
patches/gcc/4.3.1/475-sh-pr24836.patch
Normal file
@ -0,0 +1,28 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/gentoo/74_all_sh-pr24836.patch
|
||||
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
|
||||
http://gcc.gnu.org/PR24836
|
||||
|
||||
diff -durN gcc-4.3.1.orig/gcc/configure gcc-4.3.1/gcc/configure
|
||||
--- gcc-4.3.1.orig/gcc/configure 2008-06-10 14:57:48.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/configure 2008-06-10 14:58:32.000000000 +0200
|
||||
@@ -14709,7 +14709,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
||||
diff -durN gcc-4.3.1.orig/gcc/configure.ac gcc-4.3.1/gcc/configure.ac
|
||||
--- gcc-4.3.1.orig/gcc/configure.ac 2008-06-10 14:57:48.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/configure.ac 2008-06-10 14:58:32.000000000 +0200
|
||||
@@ -2537,7 +2537,7 @@
|
||||
tls_first_minor=14
|
||||
tls_as_opt="-m64 -Aesame --fatal-warnings"
|
||||
;;
|
||||
- sh-*-* | sh[34]-*-*)
|
||||
+ sh-*-* | sh[34]*-*-*)
|
||||
conftest_s='
|
||||
.section ".tdata","awT",@progbits
|
||||
foo: .long 25
|
13
patches/gcc/4.3.1/500-103-uclibc-conf-noupstream.patch
Normal file
13
patches/gcc/4.3.1/500-103-uclibc-conf-noupstream.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_103-uclibc-conf-noupstream.patch
|
||||
diff -durN gcc-4.3.1.orig/gcc/config.gcc gcc-4.3.1/gcc/config.gcc
|
||||
--- gcc-4.3.1.orig/gcc/config.gcc 2008-06-10 14:58:09.000000000 +0200
|
||||
+++ gcc-4.3.1/gcc/config.gcc 2008-06-10 14:58:36.000000000 +0200
|
||||
@@ -2149,7 +2149,7 @@
|
||||
;;
|
||||
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
|
||||
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
|
||||
- sh-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
|
2794
patches/gcc/4.3.1/525-200-uclibc-locale.patch
Normal file
2794
patches/gcc/4.3.1/525-200-uclibc-locale.patch
Normal file
File diff suppressed because it is too large
Load Diff
224
patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch
Normal file
224
patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch
Normal file
@ -0,0 +1,224 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_203-uclibc-locale-no__x.patch
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -60,4 +60,49 @@
|
||||
extern "C" __typeof(wctype_l) __wctype_l;
|
||||
#endif
|
||||
|
||||
+# define __nl_langinfo_l nl_langinfo_l
|
||||
+# define __strcoll_l strcoll_l
|
||||
+# define __strftime_l strftime_l
|
||||
+# define __strtod_l strtod_l
|
||||
+# define __strtof_l strtof_l
|
||||
+# define __strtold_l strtold_l
|
||||
+# define __strxfrm_l strxfrm_l
|
||||
+# define __newlocale newlocale
|
||||
+# define __freelocale freelocale
|
||||
+# define __duplocale duplocale
|
||||
+# define __uselocale uselocale
|
||||
+
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l iswctype_l
|
||||
+# define __towlower_l towlower_l
|
||||
+# define __towupper_l towupper_l
|
||||
+# define __wcscoll_l wcscoll_l
|
||||
+# define __wcsftime_l wcsftime_l
|
||||
+# define __wcsxfrm_l wcsxfrm_l
|
||||
+# define __wctype_l wctype_l
|
||||
+# endif
|
||||
+
|
||||
+#else
|
||||
+# define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
+# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
+# define __strtod_l(S, E, L) strtod((S), (E))
|
||||
+# define __strtof_l(S, E, L) strtof((S), (E))
|
||||
+# define __strtold_l(S, E, L) strtold((S), (E))
|
||||
+# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
+# warning should dummy __newlocale check for C|POSIX ?
|
||||
+# define __newlocale(a, b, c) NULL
|
||||
+# define __freelocale(a) ((void)0)
|
||||
+# define __duplocale(a) __c_locale()
|
||||
+//# define __uselocale ?
|
||||
+//
|
||||
+# ifdef _GLIBCXX_USE_WCHAR_T
|
||||
+# define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
+# define __towlower_l(C, L) towlower((C))
|
||||
+# define __towupper_l(C, L) towupper((C))
|
||||
+# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
+//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
|
||||
+# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
+# define __wctype_l(S, L) wctype((S))
|
||||
+# endif
|
||||
+
|
||||
#endif // GLIBC 2.3 and later
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -39,20 +39,6 @@
|
||||
#include <langinfo.h>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
|
||||
-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
|
||||
-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
|
||||
-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
|
||||
-#define __strtof_l(S, E, L) strtof((S), (E))
|
||||
-#define __strtod_l(S, E, L) strtod((S), (E))
|
||||
-#define __strtold_l(S, E, L) strtold((S), (E))
|
||||
-#warning should dummy __newlocale check for C|POSIX ?
|
||||
-#define __newlocale(a, b, c) NULL
|
||||
-#define __freelocale(a) ((void)0)
|
||||
-#define __duplocale(a) __c_locale()
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -68,6 +68,7 @@
|
||||
{
|
||||
extern "C" __typeof(uselocale) __uselocale;
|
||||
}
|
||||
+#define __uselocale uselocale
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/collate_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -36,13 +36,6 @@
|
||||
#include <locale>
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
|
||||
-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
|
||||
-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
|
||||
-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// These are basically extensions to char_traits, and perhaps should
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -38,13 +38,6 @@
|
||||
#undef _LIBC
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __wctype_l(S, L) wctype((S))
|
||||
-#define __towupper_l(C, L) towupper((C))
|
||||
-#define __towlower_l(C, L) towlower((C))
|
||||
-#define __iswctype_l(C, M, L) iswctype((C), (M))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// NB: The other ctype<char> specializations are in src/locale.cc and
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -39,13 +39,10 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix gettext stuff
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__dcgettext(const char *domainname,
|
||||
- const char *msgid, int category);
|
||||
#undef gettext
|
||||
-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
|
||||
#else
|
||||
-#undef gettext
|
||||
#define gettext(msgid) (msgid)
|
||||
#endif
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -36,15 +36,11 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-extern "C" char *__textdomain(const char *domainname);
|
||||
-extern "C" char *__bindtextdomain(const char *domainname,
|
||||
- const char *dirname);
|
||||
-#else
|
||||
-#undef __textdomain
|
||||
-#undef __bindtextdomain
|
||||
-#define __textdomain(D) ((void)0)
|
||||
-#define __bindtextdomain(D,P) ((void)0)
|
||||
+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
+#undef textdomain
|
||||
+#undef bindtextdomain
|
||||
+#define textdomain(D) ((void)0)
|
||||
+#define bindtextdomain(D,P) ((void)0)
|
||||
#endif
|
||||
|
||||
// Non-virtual member functions.
|
||||
@@ -70,7 +66,7 @@
|
||||
messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
|
||||
const char* __dir) const
|
||||
{
|
||||
- __bindtextdomain(__s.c_str(), __dir);
|
||||
+ bindtextdomain(__s.c_str(), __dir);
|
||||
return this->do_open(__s, __loc);
|
||||
}
|
||||
|
||||
@@ -90,7 +86,7 @@
|
||||
{
|
||||
// No error checking is done, assume the catalog exists and can
|
||||
// be used.
|
||||
- __textdomain(__s.c_str());
|
||||
+ textdomain(__s.c_str());
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -43,10 +43,6 @@
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
-
|
||||
namespace std
|
||||
{
|
||||
// Construct and return valid pattern consisting of some combination of:
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -41,9 +41,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.cc 2008-06-10 14:58:43.000000000 +0200
|
||||
@@ -40,9 +40,6 @@
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning tailor for stub locale support
|
||||
#endif
|
||||
-#ifndef __UCLIBC_HAS_XLOCALE__
|
||||
-#define __nl_langinfo_l(N, L) nl_langinfo((N))
|
||||
-#endif
|
||||
|
||||
namespace std
|
||||
{
|
51
patches/gcc/4.3.1/575-204-uclibc-locale-wchar_fix.patch
Normal file
51
patches/gcc/4.3.1/575-204-uclibc-locale-wchar_fix.patch
Normal file
@ -0,0 +1,51 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_204-uclibc-locale-wchar_fix.patch
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
@@ -401,7 +401,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
@@ -556,7 +556,7 @@
|
||||
# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
_M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
-# else
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
_M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
_M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
# endif
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
@@ -127,12 +127,25 @@
|
||||
{
|
||||
// Named locale.
|
||||
// NB: In the GNU model wchar_t is always 32 bit wide.
|
||||
+#ifdef __UCLIBC_MJN3_ONLY__
|
||||
+#warning fix this... should be numeric
|
||||
+#endif
|
||||
+#ifdef __UCLIBC__
|
||||
+# ifdef __UCLIBC_HAS_XLOCALE__
|
||||
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
|
||||
+# elif defined __UCLIBC_HAS_LOCALE__
|
||||
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
|
||||
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
|
||||
+# endif
|
||||
+#else
|
||||
union { char *__s; wchar_t __w; } __u;
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
|
||||
_M_data->_M_decimal_point = __u.__w;
|
||||
|
||||
__u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
|
||||
_M_data->_M_thousands_sep = __u.__w;
|
||||
+#endif
|
||||
|
||||
if (_M_data->_M_thousands_sep == L'\0')
|
||||
_M_data->_M_grouping = "";
|
355
patches/gcc/4.3.1/600-205-uclibc-locale-update.patch
Normal file
355
patches/gcc/4.3.1/600-205-uclibc-locale-update.patch
Normal file
@ -0,0 +1,355 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_205-uclibc-locale-update.patch
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -46,16 +46,13 @@
|
||||
__convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __f;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ float __f = __strtof_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __f;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -63,16 +60,13 @@
|
||||
__convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __d;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ double __d = __strtod_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __d;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
template<>
|
||||
@@ -80,16 +74,13 @@
|
||||
__convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
|
||||
const __c_locale& __cloc)
|
||||
{
|
||||
- if (!(__err & ios_base::failbit))
|
||||
- {
|
||||
- char* __sanity;
|
||||
- errno = 0;
|
||||
- long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
- if (__sanity != __s && errno != ERANGE)
|
||||
- __v = __ld;
|
||||
- else
|
||||
- __err |= ios_base::failbit;
|
||||
- }
|
||||
+ char* __sanity;
|
||||
+ errno = 0;
|
||||
+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
|
||||
+ if (__sanity != __s && errno != ERANGE)
|
||||
+ __v = __ld;
|
||||
+ else
|
||||
+ __err |= ios_base::failbit;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -110,7 +101,7 @@
|
||||
void
|
||||
locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
|
||||
{
|
||||
- if (_S_get_c_locale() != __cloc)
|
||||
+ if (__cloc && _S_get_c_locale() != __cloc)
|
||||
__freelocale(__cloc);
|
||||
}
|
||||
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/c_locale.h 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -39,21 +39,23 @@
|
||||
#pragma GCC system_header
|
||||
|
||||
#include <cstring> // get std::strlen
|
||||
-#include <cstdio> // get std::snprintf or std::sprintf
|
||||
+#include <cstdio> // get std::vsnprintf or std::vsprintf
|
||||
#include <clocale>
|
||||
#include <langinfo.h> // For codecvt
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix this
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_LOCALE__
|
||||
+#ifdef _GLIBCXX_USE_ICONV
|
||||
#include <iconv.h> // For codecvt using iconv, iconv_t
|
||||
#endif
|
||||
-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
|
||||
-#include <libintl.h> // For messages
|
||||
+#ifdef HAVE_LIBINTL_H
|
||||
+#include <libintl.h> // For messages
|
||||
#endif
|
||||
+#include <cstdarg>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning what is _GLIBCXX_C_LOCALE_GNU for
|
||||
+// psm: used in os/gnu-linux/ctype_noninline.h
|
||||
#endif
|
||||
#define _GLIBCXX_C_LOCALE_GNU 1
|
||||
|
||||
@@ -62,7 +64,7 @@
|
||||
#endif
|
||||
// #define _GLIBCXX_NUM_CATEGORIES 6
|
||||
#define _GLIBCXX_NUM_CATEGORIES 0
|
||||
-
|
||||
+
|
||||
#ifdef __UCLIBC_HAS_XLOCALE__
|
||||
namespace __gnu_cxx
|
||||
{
|
||||
@@ -79,22 +81,24 @@
|
||||
typedef int* __c_locale;
|
||||
#endif
|
||||
|
||||
- // Convert numeric value of type _Tv to string and return length of
|
||||
- // string. If snprintf is available use it, otherwise fall back to
|
||||
- // the unsafe sprintf which, in general, can be dangerous and should
|
||||
+ // Convert numeric value of type double to string and return length of
|
||||
+ // string. If vsnprintf is available use it, otherwise fall back to
|
||||
+ // the unsafe vsprintf which, in general, can be dangerous and should
|
||||
// be avoided.
|
||||
- template<typename _Tv>
|
||||
- int
|
||||
- __convert_from_v(char* __out,
|
||||
- const int __size __attribute__ ((__unused__)),
|
||||
- const char* __fmt,
|
||||
-#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
- _Tv __v, const __c_locale& __cloc, int __prec)
|
||||
+ inline int
|
||||
+ __convert_from_v(const __c_locale&
|
||||
+#ifndef __UCLIBC_HAS_XCLOCALE__
|
||||
+ __cloc __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+ ,
|
||||
+ char* __out,
|
||||
+ const int __size,
|
||||
+ const char* __fmt, ...)
|
||||
{
|
||||
+ va_list __args;
|
||||
+#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
|
||||
#else
|
||||
- _Tv __v, const __c_locale&, int __prec)
|
||||
- {
|
||||
# ifdef __UCLIBC_HAS_LOCALE__
|
||||
char* __old = std::setlocale(LC_ALL, NULL);
|
||||
char* __sav = new char[std::strlen(__old) + 1];
|
||||
@@ -103,7 +107,9 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
|
||||
+ va_start(__args, __fmt);
|
||||
+ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
|
||||
+ va_end(__args);
|
||||
|
||||
#ifdef __UCLIBC_HAS_XCLOCALE__
|
||||
__gnu_cxx::__uselocale(__old);
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
namespace std
|
||||
@@ -138,20 +143,34 @@
|
||||
ctype<wchar_t>::
|
||||
do_is(mask __m, wchar_t __c) const
|
||||
{
|
||||
- // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
- // library for blank.
|
||||
+ // The case of __m == ctype_base::space is particularly important,
|
||||
+ // due to its use in many istream functions. Therefore we deal with
|
||||
+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
|
||||
+ // is the mask corresponding to ctype_base::space. NB: an encoding
|
||||
+ // change would not affect correctness!
|
||||
bool __ret = false;
|
||||
- const size_t __bitmasksize = 11;
|
||||
- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
- if (__m & _M_bit[__bitcur]
|
||||
- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
- {
|
||||
- __ret = true;
|
||||
- break;
|
||||
- }
|
||||
+ if (__m == _M_bit[5])
|
||||
+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
|
||||
+ else
|
||||
+ {
|
||||
+ // Highest bitmask in ctype_base == 10, but extra in "C"
|
||||
+ // library for blank.
|
||||
+ const size_t __bitmasksize = 11;
|
||||
+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
|
||||
+ if (__m & _M_bit[__bitcur])
|
||||
+ {
|
||||
+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
|
||||
+ {
|
||||
+ __ret = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ else if (__m == _M_bit[__bitcur])
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
return __ret;
|
||||
}
|
||||
-
|
||||
+
|
||||
const wchar_t*
|
||||
ctype<wchar_t>::
|
||||
do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:47.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -47,18 +47,21 @@
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(size_t __refs)
|
||||
: facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
|
||||
- _M_name_messages(_S_get_c_name())
|
||||
+ _M_name_messages(_S_get_c_name())
|
||||
{ }
|
||||
|
||||
template<typename _CharT>
|
||||
messages<_CharT>::messages(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
|
||||
- _M_name_messages(__s)
|
||||
+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_messages = __tmp;
|
||||
+
|
||||
+ // Last to avoid leaking memory if new throws.
|
||||
+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
@@ -206,7 +211,7 @@
|
||||
}
|
||||
break;
|
||||
default:
|
||||
- ;
|
||||
+ __ret = pattern();
|
||||
}
|
||||
return __ret;
|
||||
}
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -33,9 +33,14 @@
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
|
||||
+#include <features.h>
|
||||
+#ifdef __UCLIBC_HAS_LOCALE__
|
||||
#define _LIBC
|
||||
#include <locale>
|
||||
#undef _LIBC
|
||||
+#else
|
||||
+#include <locale>
|
||||
+#endif
|
||||
#include <bits/c++locale_internal.h>
|
||||
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:58:51.000000000 +0200
|
||||
@@ -37,25 +37,33 @@
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
|
||||
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(_S_get_c_name())
|
||||
+ _M_name_timepunct(_S_get_c_name())
|
||||
{ _M_initialize_timepunct(); }
|
||||
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
|
||||
size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
- _M_name_timepunct(__s)
|
||||
+ _M_name_timepunct(NULL)
|
||||
{
|
||||
- char* __tmp = new char[std::strlen(__s) + 1];
|
||||
- std::strcpy(__tmp, __s);
|
||||
+ const size_t __len = std::strlen(__s) + 1;
|
||||
+ char* __tmp = new char[__len];
|
||||
+ std::memcpy(__tmp, __s, __len);
|
||||
_M_name_timepunct = __tmp;
|
||||
- _M_initialize_timepunct(__cloc);
|
||||
+
|
||||
+ try
|
||||
+ { _M_initialize_timepunct(__cloc); }
|
||||
+ catch(...)
|
||||
+ {
|
||||
+ delete [] _M_name_timepunct;
|
||||
+ __throw_exception_again;
|
||||
+ }
|
||||
}
|
||||
|
||||
template<typename _CharT>
|
13
patches/gcc/4.3.1/625-301-missing-execinfo_h.patch
Normal file
13
patches/gcc/4.3.1/625-301-missing-execinfo_h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_301-missing-execinfo_h.patch
|
||||
diff -durN gcc-4.3.1.orig/boehm-gc/include/gc.h gcc-4.3.1/boehm-gc/include/gc.h
|
||||
--- gcc-4.3.1.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200
|
||||
+++ gcc-4.3.1/boehm-gc/include/gc.h 2008-06-10 14:58:54.000000000 +0200
|
||||
@@ -503,7 +503,7 @@
|
||||
#if defined(__linux__) || defined(__GLIBC__)
|
||||
# include <features.h>
|
||||
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
|
||||
- && !defined(__ia64__)
|
||||
+ && !defined(__ia64__) && !defined(__UCLIBC__)
|
||||
# ifndef GC_HAVE_BUILTIN_BACKTRACE
|
||||
# define GC_HAVE_BUILTIN_BACKTRACE
|
||||
# endif
|
14
patches/gcc/4.3.1/650-303-c99-complex-ugly-hack.patch
Normal file
14
patches/gcc/4.3.1/650-303-c99-complex-ugly-hack.patch
Normal file
@ -0,0 +1,14 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_303-c99-complex-ugly-hack.patch
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/configure gcc-4.3.1/libstdc++-v3/configure
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/configure 2008-06-10 14:58:43.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/configure 2008-06-10 14:58:58.000000000 +0200
|
||||
@@ -39006,6 +39006,9 @@
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <complex.h>
|
||||
+#ifdef __UCLIBC__
|
||||
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
|
||||
+#endif
|
||||
int
|
||||
main ()
|
||||
{
|
27
patches/gcc/4.3.1/675-304-index_macro.patch
Normal file
27
patches/gcc/4.3.1/675-304-index_macro.patch
Normal file
@ -0,0 +1,27 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_304-index_macro.patch
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/include/ext/rope gcc-4.3.1/libstdc++-v3/include/ext/rope
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/include/ext/rope 2008-01-31 19:44:55.000000000 +0100
|
||||
+++ gcc-4.3.1/libstdc++-v3/include/ext/rope 2008-06-10 14:59:02.000000000 +0200
|
||||
@@ -59,6 +59,9 @@
|
||||
#include <bits/gthr.h>
|
||||
#include <tr1/functional>
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
# ifdef __GC
|
||||
# define __GC_CONST const
|
||||
# else
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/include/ext/ropeimpl.h gcc-4.3.1/libstdc++-v3/include/ext/ropeimpl.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/include/ext/ropeimpl.h 2007-05-04 17:06:46.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/include/ext/ropeimpl.h 2008-06-10 14:59:02.000000000 +0200
|
||||
@@ -54,6 +54,9 @@
|
||||
#include <ext/memory> // For uninitialized_copy_n
|
||||
#include <ext/numeric> // For power
|
||||
|
||||
+/* cope w/ index defined as macro, SuSv3 proposal */
|
||||
+#undef index
|
||||
+
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
using std::size_t;
|
49
patches/gcc/4.3.1/700-305-libmudflap-susv3-legacy.patch
Normal file
49
patches/gcc/4.3.1/700-305-libmudflap-susv3-legacy.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_305-libmudflap-susv3-legacy.patch
|
||||
diff -durN gcc-4.3.1.orig/libmudflap/mf-hooks2.c gcc-4.3.1/libmudflap/mf-hooks2.c
|
||||
--- gcc-4.3.1.orig/libmudflap/mf-hooks2.c 2005-09-23 23:58:39.000000000 +0200
|
||||
+++ gcc-4.3.1/libmudflap/mf-hooks2.c 2008-06-10 14:59:05.000000000 +0200
|
||||
@@ -427,7 +427,7 @@
|
||||
{
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
|
||||
- bzero (s, n);
|
||||
+ memset (s, 0, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
|
||||
MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
|
||||
- bcopy (src, dest, n);
|
||||
+ memmove (dest, src, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -447,7 +447,7 @@
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
|
||||
MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
|
||||
- return bcmp (s1, s2, n);
|
||||
+ return memcmp (s1, s2, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
|
||||
- return index (s, c);
|
||||
+ return strchr (s, c);
|
||||
}
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@
|
||||
size_t n = strlen (s);
|
||||
TRACE ("%s\n", __PRETTY_FUNCTION__);
|
||||
MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
|
||||
- return rindex (s, c);
|
||||
+ return strrchr (s, c);
|
||||
}
|
||||
|
||||
/* XXX: stpcpy, memccpy */
|
38
patches/gcc/4.3.1/725-306-libstdc++-namespace.patch
Normal file
38
patches/gcc/4.3.1/725-306-libstdc++-namespace.patch
Normal file
@ -0,0 +1,38 @@
|
||||
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_306-libstdc++-namespace.patch
|
||||
diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:58:54.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/messages_members.h 2008-06-10 14:59:09.000000000 +0200
|
||||
@@ -32,7 +32,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
#ifdef __UCLIBC_MJN3_ONLY__
|
||||
#warning fix prototypes for *textdomain funcs
|
||||
#endif
|
||||
@@ -115,3 +116,4 @@
|
||||
this->_S_create_c_locale(this->_M_c_locale_messages, __s);
|
||||
}
|
||||
}
|
||||
+}
|
||||
diff -durN gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.h
|
||||
--- gcc-4.3.1.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:58:54.000000000 +0200
|
||||
+++ gcc-4.3.1/libstdc++-v3/config/locale/uclibc/time_members.h 2008-06-10 14:59:09.000000000 +0200
|
||||
@@ -33,7 +33,8 @@
|
||||
//
|
||||
|
||||
// Written by Benjamin Kosnik <bkoz@redhat.com>
|
||||
-
|
||||
+namespace std
|
||||
+{
|
||||
template<typename _CharT>
|
||||
__timepunct<_CharT>::__timepunct(size_t __refs)
|
||||
: facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
|
||||
@@ -74,3 +75,4 @@
|
||||
delete _M_data;
|
||||
_S_destroy_c_locale(_M_c_locale_timepunct);
|
||||
}
|
||||
+}
|
Loading…
x
Reference in New Issue
Block a user