summaryrefslogtreecommitdiffstats
path: root/main/gcc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-18 13:49:32 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-18 13:49:32 +0000
commit081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c (patch)
tree9e151374b53ad61b9c5407d4cc4f8e8fd8ec3c24 /main/gcc
parentde7b37cbad5d595786fa1b78bed8dac552de1b27 (diff)
downloadaports-081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c.tar.bz2
aports-081c531fecfa27b5c0e9f48a3ca1a96ea3ef553c.tar.xz
main/gcc: upgrade to 4.6.1
Diffstat (limited to 'main/gcc')
-rw-r--r--main/gcc/08_all_cross-compile.patch40
-rw-r--r--main/gcc/09_all_gcc-4.5-Wtrampolines.patch64
-rw-r--r--main/gcc/11_all_default-warn-format-security.patch49
-rw-r--r--main/gcc/12_all_default-warn-trampolines.patch25
-rw-r--r--main/gcc/15_all_libgomp-Werror.patch (renamed from main/gcc/15_all_gcc-libgomp-no-werror.patch)8
-rw-r--r--main/gcc/34_all_ia64_note.GNU-stack.patch89
-rw-r--r--main/gcc/50_all_pr45312-kernel-miscompile.patch181
-rw-r--r--main/gcc/51_all_libiberty-pic.patch (renamed from main/gcc/51_all_gcc-3.4-libiberty-pic.patch)6
-rw-r--r--main/gcc/74_all_gcc46_cloog-dl.patch532
-rw-r--r--main/gcc/APKBUILD120
-rw-r--r--main/gcc/PR32219.patch101
-rw-r--r--main/gcc/gcc-4.6-dynamic-linker.patch (renamed from main/gcc/gcc-4.5-dynamic-linker.patch)32
-rw-r--r--main/gcc/gcc-4.6-pr32219.patch25
-rw-r--r--main/gcc/gcc-go.patch11
-rw-r--r--main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch38
-rw-r--r--main/gcc/gcc-spec-env.patch7
-rw-r--r--main/gcc/gcc4-stack-protector-uclibc-no_tls.patch84
17 files changed, 929 insertions, 483 deletions
diff --git a/main/gcc/08_all_cross-compile.patch b/main/gcc/08_all_cross-compile.patch
new file mode 100644
index 000000000..4203e3a62
--- /dev/null
+++ b/main/gcc/08_all_cross-compile.patch
@@ -0,0 +1,40 @@
+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
+
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11354,7 +11354,7 @@ then
+ *)
+ ;;
+ 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
+
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1759,7 +1759,7 @@ then
+ *)
+ ;;
+ 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
+
+--- a/gcc/unwind-dw2.c
++++ b/gcc/unwind-dw2.c
+@@ -329,9 +329,11 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context)
+ }
+ #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,
diff --git a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch b/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
deleted file mode 100644
index 9c95c1e94..000000000
--- a/main/gcc/09_all_gcc-4.5-Wtrampolines.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-2010-07-15 Magnus Granberg <zorry@gentoo.org>
- Kevin F. Quinn <kevquinn@gentoo.org>
-
- * builtins.c (expand_builtin_init_trampoline): If
- -Wtrampolines make a warning.
- * common.opt: Add -Wtrampolines.
- * doc/invoke.texi: Add -Wtrampolines.
-
-2010-07-31 Magnus Granberg <zorry@gentoo.org>
-
- #328451 set -Wtrampolines as default
-
-http://gcc.gnu.org/viewcvs?view=revision&revision=162205
-
---- a/gcc/builtins.c
-+++ b/gcc/builtins.c
-@@ -5155,6 +5155,10 @@ expand_builtin_init_trampoline (tree exp)
- targetm.calls.trampoline_init (m_tramp, t_func, r_chain);
-
- trampolines_created = 1;
-+
-+ warning_at (DECL_SOURCE_LOCATION (t_func), OPT_Wtrampolines,
-+ "trampoline generated for nested function %qD", t_func);
-+
- return const0_rtx;
- }
-
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -192,6 +192,10 @@ Wsystem-headers
- Common Var(warn_system_headers) Warning
- Do not suppress warnings from system headers
-
-+Wtrampolines
-+Common Var(warn_trampolines) Init(1) Warning
-+Warn whenever a trampoline is generated
-+
- Wtype-limits
- Common Var(warn_type_limits) Init(-1) Warning
- Warn if a comparison is always true or always false due to the limited range of the data type
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -3611,6 +3611,21 @@ code. However, note that using @option{-Wall} in conjunction with this
- option will @emph{not} warn about unknown pragmas in system
- headers---for that, @option{-Wunknown-pragmas} must also be used.
-
-+@item -Wtrampolines
-+@opindex Wtrampolines
-+@opindex Wno-trampolines
-+ Warn about trampolines generated for pointers to nested functions.
-+
-+ NOTE: In Gentoo, @option{-Wtrampolines} is set by default.
-+ To disable, specify @option{-Wno-trampolines}
-+
-+ A trampoline is a small piece of data or code that is created at run
-+ time on the stack when the address of a nested function is taken, and
-+ is used to call the nested function indirectly. For some targets, it
-+ is made up of data only and thus requires no special treatment. But,
-+ for most targets, it is made up of code and thus requires the stack
-+ to be made executable in order for the program to work properly.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
diff --git a/main/gcc/11_all_default-warn-format-security.patch b/main/gcc/11_all_default-warn-format-security.patch
new file mode 100644
index 000000000..5dbab43f1
--- /dev/null
+++ b/main/gcc/11_all_default-warn-format-security.patch
@@ -0,0 +1,49 @@
+Enable -Wformat and -Wformat-security by default.
+
+
+--- a/gcc/c-family/c-common.c
++++ b/gcc/c-family/c-common.c
+@@ -201,7 +201,7 @@ int warn_unknown_pragmas; /* Tri state variable. */
+ /* Warn about format/argument anomalies in calls to formatted I/O functions
+ (*printf, *scanf, strftime, strfmon, etc.). */
+
+-int warn_format;
++int warn_format = 1;
+
+ /* C/ObjC language option variables. */
+
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -384,7 +384,7 @@ C ObjC C++ ObjC++ Var(warn_format_contains_nul) Warning
+ Warn about format strings that contain NUL bytes
+
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning
+ Warn about possible security problems with format functions
+
+ Wformat-y2k
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -3111,6 +3111,9 @@ aspects of format checking, the options @option{-Wformat-y2k},
+ @option{-Wformat-nonliteral}, @option{-Wformat-security}, and
+ @option{-Wformat=2} are available, but are not included in @option{-Wall}.
+
++In Gentoo this option is enabled by default for C, C++, ObjC, ObjC++.
++To disable, use @option{-Wformat=0}.
++
+ @item -Wformat-y2k
+ @opindex Wformat-y2k
+ @opindex Wno-format-y2k
+@@ -3164,6 +3167,11 @@ currently a subset of what @option{-Wformat-nonliteral} warns about, but
+ in future warnings may be added to @option{-Wformat-security} that are not
+ included in @option{-Wformat-nonliteral}.)
+
++In Gentoo this option is enabled by default for C, C++, ObjC, ObjC++.
++To disable, use @option{-Wno-format-security}, or disable all format warnings
++with @option{-Wformat=0}. To make format security warnings fatal, specify
++@option{-Werror=format-security}.
++
+ @item -Wformat=2
+ @opindex Wformat=2
+ @opindex Wno-format=2
diff --git a/main/gcc/12_all_default-warn-trampolines.patch b/main/gcc/12_all_default-warn-trampolines.patch
new file mode 100644
index 000000000..a5606c5ec
--- /dev/null
+++ b/main/gcc/12_all_default-warn-trampolines.patch
@@ -0,0 +1,25 @@
+Enable -Wtrampolines by default.
+
+
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -611,7 +611,7 @@ Common Var(warn_system_headers) Warning
+ Do not suppress warnings from system headers
+
+ Wtrampolines
+-Common Var(warn_trampolines) Warning
++Common Var(warn_trampolines) Init(1) Warning
+ Warn whenever a trampoline is generated
+
+ Wtype-limits
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -3766,6 +3766,8 @@ headers---for that, @option{-Wunknown-pragmas} must also be used.
+ @opindex Wno-trampolines
+ Warn about trampolines generated for pointers to nested functions.
+
++ In Gentoo, @option{-Wtrampolines} is enabled by default.
++
+ A trampoline is a small piece of data or code that is created at run
+ time on the stack when the address of a nested function is taken, and
+ is used to call the nested function indirectly. For some targets, it
diff --git a/main/gcc/15_all_gcc-libgomp-no-werror.patch b/main/gcc/15_all_libgomp-Werror.patch
index 1c3ec3a1e..3456e8ae8 100644
--- a/main/gcc/15_all_gcc-libgomp-no-werror.patch
+++ b/main/gcc/15_all_libgomp-Werror.patch
@@ -1,11 +1,11 @@
libgomp does not respect --disable-werror
-http://bugs.gentoo.org/229059
+https://bugs.gentoo.org/229059
http://gcc.gnu.org/PR38436
---- gcc-4.3.2/libgomp/configure
-+++ gcc-4.3.2/libgomp/configure
-@@ -3297,7 +3297,7 @@
+--- a/libgomp/configure
++++ b/libgomp/configure
+@@ -4284,7 +4284,7 @@ save_CFLAGS="$CFLAGS"
# Add -Wall -Werror if we are using GCC.
if test "x$GCC" = "xyes"; then
diff --git a/main/gcc/34_all_ia64_note.GNU-stack.patch b/main/gcc/34_all_ia64_note.GNU-stack.patch
new file mode 100644
index 000000000..b156eacb2
--- /dev/null
+++ b/main/gcc/34_all_ia64_note.GNU-stack.patch
@@ -0,0 +1,89 @@
+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.
+
+
+--- a/gcc/config/ia64/crtbegin.asm
++++ b/gcc/config/ia64/crtbegin.asm
+@@ -252,3 +252,7 @@ __do_jv_register_classes:
+ .weak __cxa_finalize
+ #endif
+ .weak _Jv_RegisterClasses
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/gcc/config/ia64/crtend.asm
++++ b/gcc/config/ia64/crtend.asm
+@@ -119,3 +119,7 @@ __do_global_ctors_aux:
+
+ br.ret.sptk.many rp
+ .endp __do_global_ctors_aux
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/gcc/config/ia64/crti.asm
++++ b/gcc/config/ia64/crti.asm
+@@ -51,3 +51,7 @@ _fini:
+ .body
+
+ # end of crti.asm
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/gcc/config/ia64/crtn.asm
++++ b/gcc/config/ia64/crtn.asm
+@@ -41,3 +41,7 @@
+ br.ret.sptk.many b0
+
+ # end of crtn.asm
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/gcc/config/ia64/lib1funcs.asm
++++ b/gcc/config/ia64/lib1funcs.asm
+@@ -793,3 +793,7 @@ __floattitf:
+ .endp __floattitf
+ #endif
+ #endif
++
++#ifdef __linux__
++.section .note.GNU-stack; .previous
++#endif
+--- a/gcc/config/ia64/linux.h
++++ b/gcc/config/ia64/linux.h
+@@ -29,6 +29,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+
+ #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*}"
+--- a/gcc/config/rs6000/ppc-asm.h
++++ b/gcc/config/rs6000/ppc-asm.h
+@@ -352,7 +352,7 @@ GLUE(.L,name): \
+ #endif
+ #endif
+
+-#if defined __linux__ && !defined __powerpc64__
++#if defined __linux__
+ .section .note.GNU-stack
+ .previous
+ #endif
diff --git a/main/gcc/50_all_pr45312-kernel-miscompile.patch b/main/gcc/50_all_pr45312-kernel-miscompile.patch
deleted file mode 100644
index b9b1a7d7f..000000000
--- a/main/gcc/50_all_pr45312-kernel-miscompile.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-GCC 4.4.4 miscompiles the Linux kernel
-http://gcc.gnu.org/PR45312
-https://bugzilla.kernel.org/show_bug.cgi?id=16612
-https://bugs.gentoo.org/334269
-
---- a/gcc/reload1.c
-+++ b/gcc/reload1.c
-@@ -431,7 +431,6 @@ static void failed_reload (rtx, int);
- static int set_reload_reg (int, int);
- static void choose_reload_regs_init (struct insn_chain *, rtx *);
- static void choose_reload_regs (struct insn_chain *);
--static void merge_assigned_reloads (rtx);
- static void emit_input_reload_insns (struct insn_chain *, struct reload *,
- rtx, int);
- static void emit_output_reload_insns (struct insn_chain *, struct reload *,
-@@ -4215,12 +4214,6 @@ reload_as_needed (int live_known)
- Record the choices of reload reg in reload_reg_rtx. */
- choose_reload_regs (chain);
-
-- /* Merge any reloads that we didn't combine for fear of
-- increasing the number of spill registers needed but now
-- discover can be safely merged. */
-- if (SMALL_REGISTER_CLASSES)
-- merge_assigned_reloads (insn);
--
- /* Generate the insns to reload operands into or out of
- their reload regs. */
- emit_reload_insns (chain);
-@@ -6598,152 +6591,6 @@ deallocate_reload_reg (int r)
- reload_spill_index[r] = -1;
- }
-
--/* If SMALL_REGISTER_CLASSES is nonzero, we may not have merged two
-- reloads of the same item for fear that we might not have enough reload
-- registers. However, normally they will get the same reload register
-- and hence actually need not be loaded twice.
--
-- Here we check for the most common case of this phenomenon: when we have
-- a number of reloads for the same object, each of which were allocated
-- the same reload_reg_rtx, that reload_reg_rtx is not used for any other
-- reload, and is not modified in the insn itself. If we find such,
-- merge all the reloads and set the resulting reload to RELOAD_OTHER.
-- This will not increase the number of spill registers needed and will
-- prevent redundant code. */
--
--static void
--merge_assigned_reloads (rtx insn)
--{
-- int i, j;
--
-- /* Scan all the reloads looking for ones that only load values and
-- are not already RELOAD_OTHER and ones whose reload_reg_rtx are
-- assigned and not modified by INSN. */
--
-- for (i = 0; i < n_reloads; i++)
-- {
-- int conflicting_input = 0;
-- int max_input_address_opnum = -1;
-- int min_conflicting_input_opnum = MAX_RECOG_OPERANDS;
--
-- if (rld[i].in == 0 || rld[i].when_needed == RELOAD_OTHER
-- || rld[i].out != 0 || rld[i].reg_rtx == 0
-- || reg_set_p (rld[i].reg_rtx, insn))
-- continue;
--
-- /* Look at all other reloads. Ensure that the only use of this
-- reload_reg_rtx is in a reload that just loads the same value
-- as we do. Note that any secondary reloads must be of the identical
-- class since the values, modes, and result registers are the
-- same, so we need not do anything with any secondary reloads. */
--
-- for (j = 0; j < n_reloads; j++)
-- {
-- if (i == j || rld[j].reg_rtx == 0
-- || ! reg_overlap_mentioned_p (rld[j].reg_rtx,
-- rld[i].reg_rtx))
-- continue;
--
-- if (rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- && rld[j].opnum > max_input_address_opnum)
-- max_input_address_opnum = rld[j].opnum;
--
-- /* If the reload regs aren't exactly the same (e.g, different modes)
-- or if the values are different, we can't merge this reload.
-- But if it is an input reload, we might still merge
-- RELOAD_FOR_INPUT_ADDRESS and RELOAD_FOR_OTHER_ADDRESS reloads. */
--
-- if (! rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx)
-- || rld[j].out != 0 || rld[j].in == 0
-- || ! rtx_equal_p (rld[i].in, rld[j].in))
-- {
-- if (rld[j].when_needed != RELOAD_FOR_INPUT
-- || ((rld[i].when_needed != RELOAD_FOR_INPUT_ADDRESS
-- || rld[i].opnum > rld[j].opnum)
-- && rld[i].when_needed != RELOAD_FOR_OTHER_ADDRESS))
-- break;
-- conflicting_input = 1;
-- if (min_conflicting_input_opnum > rld[j].opnum)
-- min_conflicting_input_opnum = rld[j].opnum;
-- }
-- }
--
-- /* If all is OK, merge the reloads. Only set this to RELOAD_OTHER if
-- we, in fact, found any matching reloads. */
--
-- if (j == n_reloads
-- && max_input_address_opnum <= min_conflicting_input_opnum)
-- {
-- gcc_assert (rld[i].when_needed != RELOAD_FOR_OUTPUT);
--
-- for (j = 0; j < n_reloads; j++)
-- if (i != j && rld[j].reg_rtx != 0
-- && rtx_equal_p (rld[i].reg_rtx, rld[j].reg_rtx)
-- && (! conflicting_input
-- || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_OTHER_ADDRESS))
-- {
-- rld[i].when_needed = RELOAD_OTHER;
-- rld[j].in = 0;
-- reload_spill_index[j] = -1;
-- transfer_replacements (i, j);
-- }
--
-- /* If this is now RELOAD_OTHER, look for any reloads that
-- load parts of this operand and set them to
-- RELOAD_FOR_OTHER_ADDRESS if they were for inputs,
-- RELOAD_OTHER for outputs. Note that this test is
-- equivalent to looking for reloads for this operand
-- number.
--
-- We must take special care with RELOAD_FOR_OUTPUT_ADDRESS;
-- it may share registers with a RELOAD_FOR_INPUT, so we can
-- not change it to RELOAD_FOR_OTHER_ADDRESS. We should
-- never need to, since we do not modify RELOAD_FOR_OUTPUT.
--
-- It is possible that the RELOAD_FOR_OPERAND_ADDRESS
-- instruction is assigned the same register as the earlier
-- RELOAD_FOR_OTHER_ADDRESS instruction. Merging these two
-- instructions will cause the RELOAD_FOR_OTHER_ADDRESS
-- instruction to be deleted later on. */
--
-- if (rld[i].when_needed == RELOAD_OTHER)
-- for (j = 0; j < n_reloads; j++)
-- if (rld[j].in != 0
-- && rld[j].when_needed != RELOAD_OTHER
-- && rld[j].when_needed != RELOAD_FOR_OTHER_ADDRESS
-- && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
-- && rld[j].when_needed != RELOAD_FOR_OPERAND_ADDRESS
-- && (! conflicting_input
-- || rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
-- && reg_overlap_mentioned_for_reload_p (rld[j].in,
-- rld[i].in))
-- {
-- int k;
--
-- rld[j].when_needed
-- = ((rld[j].when_needed == RELOAD_FOR_INPUT_ADDRESS
-- || rld[j].when_needed == RELOAD_FOR_INPADDR_ADDRESS)
-- ? RELOAD_FOR_OTHER_ADDRESS : RELOAD_OTHER);
--
-- /* Check to see if we accidentally converted two
-- reloads that use the same reload register with
-- different inputs to the same type. If so, the
-- resulting code won't work. */
-- if (rld[j].reg_rtx)
-- for (k = 0; k < j; k++)
-- gcc_assert (rld[k].in == 0 || rld[k].reg_rtx == 0
-- || rld[k].when_needed != rld[j].when_needed
-- || !rtx_equal_p (rld[k].reg_rtx,
-- rld[j].reg_rtx)
-- || rtx_equal_p (rld[k].in,
-- rld[j].in));
-- }
-- }
-- }
--}
--
- /* These arrays are filled by emit_reload_insns and its subroutines. */
- static rtx input_reload_insns[MAX_RECOG_OPERANDS];
- static rtx other_input_address_reload_insns = 0;
diff --git a/main/gcc/51_all_gcc-3.4-libiberty-pic.patch b/main/gcc/51_all_libiberty-pic.patch
index d9a95a21b..b6160a730 100644
--- a/main/gcc/51_all_gcc-3.4-libiberty-pic.patch
+++ b/main/gcc/51_all_libiberty-pic.patch
@@ -1,6 +1,6 @@
---- gcc-4.1.0-orig/libiberty/Makefile.in 2006-03-01 15:49:14.000000000 -0500
-+++ gcc-4.1.0/libiberty/Makefile.in 2006-03-01 18:10:46.000000000 -0500
-@@ -232,6 +232,7 @@
+--- a/libiberty/Makefile.in
++++ b/libiberty/Makefile.in
+@@ -246,6 +246,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
$(RANLIB) $(TARGETLIB); \
diff --git a/main/gcc/74_all_gcc46_cloog-dl.patch b/main/gcc/74_all_gcc46_cloog-dl.patch
new file mode 100644
index 000000000..21ceb25b7
--- /dev/null
+++ b/main/gcc/74_all_gcc46_cloog-dl.patch
@@ -0,0 +1,532 @@
+When graphite support is enabled, C++ libraries (libppl, libcloog, libgmpxx,
+libstdc++-v3) are linked into cc1. Because of libstdc++ symbol versioning
+this has the unfortunate side effect of making it difficult to switch to a
+previous version of GCC using gcc-config once these libraries have be built
+with the newer version. (http://bugs.gentoo.org/315377#c3)
+
+Instead, dlopen libcloog as necessary. This patch originated in Fedora and
+was modified to work on FreeBSD (http://bugs.gentoo.org/317211).
+
+2011-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.in (BACKENDLIBS): Link against -ldl instead of
+ -lcloog -lppl.
+ (graphite.o, graphite%.o): Force -O, remove -fkeep-inline-functions.
+ (GRAPHITE_CLOOG_UTIL_H, GRAPHITE_POLY_H): New.
+ (graphite*.o): Adjust dependencies.
+ * graphite-cloog-compat.h: Include <dlfcn.h>. Reference libcloog and
+ libppl symbols through pointers in cloog_pointers__ variable.
+ * graphite.c (init_cloog_pointers): New function.
+ (graphite_transform_loops): Call init_cloog_pointers.
+ * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Rename
+ stmt_for argument to stmt_fora.
+ * graphite-poly.h: Include graphite-cloog-util.h.
+
+2011-04-02 Ryan Hill <dirtyepic@gentoo.org>
+
+ * configure.ac (DL_LIB): Check how to dlopen.
+ * configure: Regenerate.
+ * Makefile.in (BACKENDLIBS): Use DL_LIB.
+ * graphite-cloog-compat.h: Add missing symbols.
+
+
+
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -984,6 +984,8 @@ GCC_PLUGIN_H = gcc-plugin.h highlev-plugin-common.h $(CONFIG_H) $(SYSTEM_H) \
+ PLUGIN_H = plugin.h $(GCC_PLUGIN_H)
+ PLUGIN_VERSION_H = plugin-version.h configargs.h
+ LIBFUNCS_H = libfuncs.h $(HASHTAB_H)
++GRAPHITE_CLOOG_UTIL_H = graphite-cloog-util.h graphite-cloog-compat.h
++GRAPHITE_POLY_H = graphite-poly.h $(GRAPHITE_CLOOG_UTIL_H)
+
+ #
+ # Now figure out from those variables how to compile and link.
+@@ -1037,7 +1039,7 @@ BUILD_LIBDEPS= $(BUILD_LIBIBERTY)
+ # and the system's installed libraries.
+ LIBS = @LIBS@ $(CPPLIB) $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(LIBDECNUMBER) \
+ $(HOST_LIBS)
+-BACKENDLIBS = $(CLOOGLIBS) $(PPLLIBS) $(GMPLIBS) $(PLUGINLIBS) $(HOST_LIBS) \
++BACKENDLIBS = $(GMPLIBS) $(if $(CLOOGLIBS),@DL_LIB@) $(PLUGINLIBS) $(HOST_LIBS) \
+ $(ZLIB)
+ # Any system libraries needed just for GNAT.
+ SYSLIBS = @GNAT_LIBEXC@
+@@ -2668,40 +2670,40 @@ sese.o : sese.c sese.h $(CONFIG_H) $(SYSTEM_H) coretypes.h tree-pretty-print.h \
+ $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) tree-pass.h value-prof.h
+ graphite.o : graphite.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) \
+ $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h \
+- $(DBGCNT_H) graphite-ppl.h graphite-poly.h graphite-scop-detection.h \
++ $(DBGCNT_H) graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h \
+ graphite-clast-to-gimple.h graphite-sese-to-poly.h
+ graphite-blocking.o : graphite-blocking.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+- sese.h graphite-ppl.h graphite-poly.h
++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
+ graphite-clast-to-gimple.o : graphite-clast-to-gimple.c $(CONFIG_H) \
+ $(SYSTEM_H) coretypes.h $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) \
+- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-cloog-util.h \
+- graphite-ppl.h graphite-poly.h graphite-clast-to-gimple.h \
++ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h $(GRAPHITE_CLOOG_UTIL_H) \
++ graphite-ppl.h $(GRAPHITE_POLY_H) graphite-clast-to-gimple.h \
+ graphite-dependences.h graphite-cloog-compat.h
+ graphite-cloog-util.o : graphite-cloog-util.c $(CONFIG_H) $(SYSTEM_H) \
+- coretypes.h graphite-cloog-util.h graphite-cloog-compat.h
++ coretypes.h $(GRAPHITE_CLOOG_UTIL_H) graphite-cloog-compat.h
+ graphite-dependences.o : graphite-dependences.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+- sese.h graphite-ppl.h graphite-poly.h graphite-dependences.h \
+- graphite-cloog-util.h
++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-dependences.h \
++ $(GRAPHITE_CLOOG_UTIL_H)
+ graphite-flattening.o : graphite-flattening.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+- sese.h graphite-ppl.h graphite-poly.h
++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
+ graphite-interchange.o : graphite-interchange.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) \
+- sese.h graphite-ppl.h graphite-poly.h
++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H)
+ graphite-poly.o : graphite-poly.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(DIAGNOSTIC_CORE_H) $(TREE_FLOW_H) $(TREE_DUMP_H) gimple-pretty-print.h \
+- $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h graphite-poly.h \
+- graphite-dependences.h graphite-cloog-util.h
++ $(CFGLOOP_H) $(TREE_DATA_REF_H) sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
++ graphite-dependences.h $(GRAPHITE_CLOOG_UTIL_H)
+ graphite-ppl.o : graphite-ppl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+- graphite-cloog-util.h graphite-ppl.h
++ $(GRAPHITE_CLOOG_UTIL_H) graphite-ppl.h
+ graphite-scop-detection.o : graphite-scop-detection.c $(CONFIG_H) $(SYSTEM_H) \
+ coretypes.h $(TREE_FLOW_H) $(CFGLOOP_H) $(TREE_DATA_REF_H) $(TREE_PASS_H) \
+- sese.h graphite-ppl.h graphite-poly.h graphite-scop-detection.h
++ sese.h graphite-ppl.h $(GRAPHITE_POLY_H) graphite-scop-detection.h
+ graphite-sese-to-poly.o : graphite-sese-to-poly.c $(CONFIG_H) \
+ $(SYSTEM_H) coretypes.h $(TREE_FLOW_H) $(TREE_DUMP_H) $(CFGLOOP_H) \
+- $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h graphite-poly.h \
++ $(TREE_DATA_REF_H) domwalk.h sese.h graphite-ppl.h $(GRAPHITE_POLY_H) \
+ graphite-sese-to-poly.h
+ tree-vect-loop.o: tree-vect-loop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
+ $(TM_H) $(GGC_H) $(TREE_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) $(TREE_FLOW_H) \
+@@ -3482,6 +3484,11 @@ $(out_object_file): $(out_file) $(CONFIG_H) coretypes.h $(TM_H) $(TREE_H) \
+ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \
+ $(out_file) $(OUTPUT_OPTION)
+
++graphite%.o : \
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++graphite.o : \
++ ALL_CFLAGS := -O $(filter-out -fkeep-inline-functions, $(ALL_CFLAGS))
++
+ # Build auxiliary files that support ecoff format.
+ mips-tfile: mips-tfile.o version.o $(LIBDEPS)
+ $(LINKER) $(LINKERFLAGS) $(LDFLAGS) -o $@ \
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -602,6 +602,7 @@ ac_subst_vars='LTLIBOBJS
+ LIBOBJS
+ enable_plugin
+ pluginlibs
++DL_LIB
+ CLOOGINC
+ CLOOGLIBS
+ PPLINC
+@@ -17505,7 +17506,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17508 "configure"
++#line 17509 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -17611,7 +17612,7 @@ else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+-#line 17614 "configure"
++#line 17615 "configure"
+ #include "confdefs.h"
+
+ #if HAVE_DLFCN_H
+@@ -26284,6 +26285,7 @@ $as_echo "unable to check" >&6; }
+ fi
+
+ # Check -ldl
++ DL_LIB=
+ saved_LIBS="$LIBS"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+ $as_echo_n "checking for library containing dlopen... " >&6; }
+@@ -26343,7 +26345,9 @@ fi
+
+ if test x"$ac_cv_search_dlopen" = x"-ldl"; then
+ pluginlibs="$pluginlibs -ldl"
++ DL_LIB=$ac_cv_search_dlopen
+ fi
++
+ LIBS="$saved_LIBS"
+
+ # Check that we can build shared objects with -fPIC -shared
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4841,11 +4841,14 @@ if test x"$enable_plugin" = x"yes"; then
+ fi
+
+ # Check -ldl
++ DL_LIB=
+ saved_LIBS="$LIBS"
+ AC_SEARCH_LIBS([dlopen], [dl])
+ if test x"$ac_cv_search_dlopen" = x"-ldl"; then
+ pluginlibs="$pluginlibs -ldl"
++ DL_LIB=$ac_cv_search_dlopen
+ fi
++ AC_SUBST(DL_LIB)
+ LIBS="$saved_LIBS"
+
+ # Check that we can build shared objects with -fPIC -shared
+--- a/gcc/graphite-clast-to-gimple.c
++++ b/gcc/graphite-clast-to-gimple.c
+@@ -738,10 +738,10 @@ clast_get_body_of_loop (struct clast_stmt *stmt)
+ from STMT_FOR. */
+
+ static tree
+-gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_for, int level,
++gcc_type_for_iv_of_clast_loop (struct clast_for *stmt_fora, int level,
+ tree lb_type, tree ub_type)
+ {
+- struct clast_stmt *stmt = (struct clast_stmt *) stmt_for;
++ struct clast_stmt *stmt = (struct clast_stmt *) stmt_fora;
+ struct clast_user_stmt *body = clast_get_body_of_loop (stmt);
+ CloogStatement *cs = body->statement;
+ poly_bb_p pbb = (poly_bb_p) cloog_statement_usr (cs);
+--- a/gcc/graphite-cloog-compat.h
++++ b/gcc/graphite-cloog-compat.h
+@@ -272,4 +272,269 @@ static inline int cloog_matrix_nrows (CloogMatrix * m)
+ return m->NbRows;
+ }
+ #endif /* CLOOG_ORG */
++
++#include <dlfcn.h>
++#define DYNSYMS \
++ DYNSYM (cloog_block_alloc); \
++ DYNSYM (cloog_block_list_free); \
++ DYNSYM (cloog_block_list_malloc); \
++ DYNSYM (cloog_clast_create); \
++ DYNSYM (cloog_clast_free); \
++ DYNSYM (cloog_domain_free); \
++ DYNSYM (cloog_domain_matrix2domain); \
++ DYNSYM (cloog_initialize); \
++ DYNSYM (cloog_loop_malloc); \
++ DYNSYM (cloog_matrix_alloc); \
++ DYNSYM (cloog_matrix_copy); \
++ DYNSYM (cloog_matrix_free); \
++ DYNSYM (cloog_matrix_print); \
++ DYNSYM (cloog_names_malloc); \
++ DYNSYM (cloog_names_scalarize); \
++ DYNSYM (cloog_options_free); \
++ DYNSYM (cloog_options_malloc); \
++ DYNSYM (cloog_program_dump_cloog); \
++ DYNSYM (cloog_program_extract_scalars); \
++ DYNSYM (cloog_program_free); \
++ DYNSYM (cloog_program_generate); \
++ DYNSYM (cloog_program_malloc); \
++ DYNSYM (cloog_program_print); \
++ DYNSYM (cloog_program_scatter); \
++ DYNSYM (cloog_statement_alloc); \
++ DYNSYM (cloog_domain_union); \
++ DYNSYM (cloog_matrix_read); \
++ DYNSYM (cloog_new_pol); \
++ DYNSYM (cloog_vector_gcd); \
++ DYNSYM (ppl_finalize); \
++ DYNSYM (ppl_assign_Coefficient_from_mpz_t); \
++ DYNSYM (ppl_assign_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (ppl_Coefficient_to_mpz_t); \
++ DYNSYM (ppl_Constraint_coefficient); \
++ DYNSYM (ppl_Constraint_inhomogeneous_term); \
++ DYNSYM (ppl_Constraint_space_dimension); \
++ DYNSYM (ppl_Constraint_System_begin); \
++ DYNSYM (ppl_Constraint_System_const_iterator_dereference); \
++ DYNSYM (ppl_Constraint_System_const_iterator_equal_test); \
++ DYNSYM (ppl_Constraint_System_const_iterator_increment); \
++ DYNSYM (ppl_Constraint_System_end); \
++ DYNSYM (ppl_Constraint_System_insert_Constraint); \
++ DYNSYM (ppl_Constraint_System_space_dimension); \
++ DYNSYM (ppl_Constraint_type); \
++ DYNSYM (ppl_delete_Coefficient); \
++ DYNSYM (ppl_delete_Constraint); \
++ DYNSYM (ppl_delete_Constraint_System_const_iterator); \
++ DYNSYM (ppl_delete_Linear_Expression); \
++ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron); \
++ DYNSYM (ppl_delete_Pointset_Powerset_C_Polyhedron_iterator); \
++ DYNSYM (ppl_delete_Polyhedron); \
++ DYNSYM (ppl_Linear_Expression_add_to_coefficient); \
++ DYNSYM (ppl_Linear_Expression_add_to_inhomogeneous); \
++ DYNSYM (ppl_Linear_Expression_coefficient); \
++ DYNSYM (ppl_Linear_Expression_inhomogeneous_term); \
++ DYNSYM (ppl_Linear_Expression_space_dimension); \
++ DYNSYM (ppl_new_Coefficient); \
++ DYNSYM (ppl_new_Coefficient_from_mpz_t); \
++ DYNSYM (ppl_new_Constraint); \
++ DYNSYM (ppl_new_Constraint_System); \
++ DYNSYM (ppl_new_Constraint_System_const_iterator); \
++ DYNSYM (ppl_new_C_Polyhedron_from_C_Polyhedron); \
++ DYNSYM (ppl_new_C_Polyhedron_from_space_dimension); \
++ DYNSYM (ppl_new_C_Polyhedron_recycle_Constraint_System); \
++ DYNSYM (ppl_new_Linear_Expression); \
++ DYNSYM (ppl_new_Linear_Expression_from_Constraint); \
++ DYNSYM (ppl_new_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (ppl_new_Linear_Expression_with_dimension); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension); \
++ DYNSYM (ppl_new_Pointset_Powerset_C_Polyhedron_iterator); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_constraint); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_difference_assign); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_intersection_assign); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_is_empty); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_begin); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_end); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_iterator_increment); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_maximize); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_minimize); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_size); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_space_dimension); \
++ DYNSYM (ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign); \
++ DYNSYM (ppl_Polyhedron_add_constraint); \
++ DYNSYM (ppl_Polyhedron_add_constraints); \
++ DYNSYM (ppl_Polyhedron_add_space_dimensions_and_embed); \
++ DYNSYM (ppl_Polyhedron_get_constraints); \
++ DYNSYM (ppl_Polyhedron_map_space_dimensions); \
++ DYNSYM (ppl_Polyhedron_remove_space_dimensions); \
++ DYNSYM (ppl_Polyhedron_space_dimension); \
++ DYNSYM (ppl_subtract_Linear_Expression_from_Linear_Expression); \
++ DYNSYM (pprint); \
++ DYNSYM (stmt_block); \
++ DYNSYM (stmt_for); \
++ DYNSYM (stmt_guard); \
++ DYNSYM (stmt_root); \
++ DYNSYM (stmt_user); \
++ DYNSYM (ppl_delete_Constraint_System); \
++ DYNSYM (ppl_initialize); \
++ DYNSYM (ppl_new_Constraint_System_from_Constraint); \
++ DYNSYM (ppl_new_C_Polyhedron_from_Constraint_System); \
++ DYNSYM (ppl_Polyhedron_affine_image); \
++ DYNSYM (ppl_io_fprint_Pointset_Powerset_C_Polyhedron); \
++ DYNSYM (ppl_new_PIP_Problem_from_constraints); \
++ DYNSYM (ppl_PIP_Problem_is_satisfiable); \
++ DYNSYM (ppl_delete_PIP_Problem);
++extern struct
++{
++ bool inited;
++ void *h;
++#define DYNSYM(x) __typeof (x) *p_##x
++ DYNSYMS
++#undef DYNSYM
++} cloog_pointers__;
++
++#define cloog_block_alloc (*cloog_pointers__.p_cloog_block_alloc)
++#define cloog_block_list_free (*cloog_pointers__.p_cloog_block_list_free)
++#define cloog_block_list_malloc (*cloog_pointers__.p_cloog_block_list_malloc)
++#define cloog_clast_create (*cloog_pointers__.p_cloog_clast_create)
++#define cloog_clast_free (*cloog_pointers__.p_cloog_clast_free)
++#define cloog_domain_free (*cloog_pointers__.p_cloog_domain_free)
++#define cloog_domain_matrix2domain (*cloog_pointers__.p_cloog_domain_matrix2domain)
++#define cloog_initialize (*cloog_pointers__.p_cloog_initialize)
++#ifndef CLOOG_ORG
++#undef cloog_loop_malloc
++#define cloog_loop_malloc(STATE) (*cloog_pointers__.p_cloog_loop_malloc) ()
++#else
++#define cloog_loop_malloc (*cloog_pointers__.p_cloog_loop_malloc)
++#endif
++#define cloog_matrix_alloc (*cloog_pointers__.p_cloog_matrix_alloc)
++#define cloog_matrix_copy (*cloog_pointers__.p_cloog_matrix_copy)
++#define cloog_matrix_free (*cloog_pointers__.p_cloog_matrix_free)
++#define cloog_matrix_print (*cloog_pointers__.p_cloog_matrix_print)
++#define cloog_names_malloc (*cloog_pointers__.p_cloog_names_malloc)
++#define cloog_names_scalarize (*cloog_pointers__.p_cloog_names_scalarize)
++#define cloog_options_free (*cloog_pointers__.p_cloog_options_free)
++#ifndef CLOOG_ORG
++#undef cloog_options_malloc
++#define cloog_options_malloc(STATE) (*cloog_pointers__.p_cloog_options_malloc) ()
++#undef cloog_program_dump_cloog
++#define cloog_program_dump_cloog(DUMPFILE, PROGRAM, SCATTERINGLIST) \
++ (*cloog_pointers__.p_cloog_program_dump_cloog) (DUMPFILE, PROGRAM)
++#undef cloog_program_extract_scalars
++#define cloog_program_extract_scalars(PROG, SCATT, OPT) \
++ (*cloog_pointers__.p_cloog_program_extract_scalars) (PROG, SCATT)
++#else
++#define cloog_options_malloc (*cloog_pointers__.p_cloog_options_malloc)
++#define cloog_program_dump_cloog (*cloog_pointers__.p_cloog_program_dump_cloog)
++#define cloog_program_extract_scalars (*cloog_pointers__.p_cloog_program_extract_scalars)
++#endif
++#define cloog_program_free (*cloog_pointers__.p_cloog_program_free)
++#define cloog_program_generate (*cloog_pointers__.p_cloog_program_generate)
++#define cloog_program_malloc (*cloog_pointers__.p_cloog_program_malloc)
++#define cloog_program_print (*cloog_pointers__.p_cloog_program_print)
++#ifndef CLOOG_ORG
++#undef cloog_program_scatter
++#define cloog_program_scatter(PROG, SCATT, OPT) \
++ (*cloog_pointers__.p_cloog_program_scatter) (PROG, SCATT)
++#undef cloog_statement_alloc
++#define cloog_statement_alloc(STATE, INDEX) \
++ (*cloog_pointers__.p_cloog_statement_alloc) (INDEX)
++#else
++#define cloog_program_scatter (*cloog_pointers__.p_cloog_program_scatter)
++#define cloog_statement_alloc (*cloog_pointers__.p_cloog_statement_alloc)
++#endif
++#define cloog_domain_union (*cloog_pointers__.p_cloog_domain_union)
++#define cloog_matrix_read (*cloog_pointers__.p_cloog_matrix_read)
++#define cloog_new_pol (*cloog_pointers__.p_cloog_new_pol)
++#define cloog_vector_gcd (*cloog_pointers__.p_cloog_vector_gcd)
++#define ppl_finalize (*cloog_pointers__.p_ppl_finalize)
++#define ppl_assign_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_assign_Coefficient_from_mpz_t)
++#define ppl_assign_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_assign_Linear_Expression_from_Linear_Expression)
++#define ppl_Coefficient_to_mpz_t (*cloog_pointers__.p_ppl_Coefficient_to_mpz_t)
++#define ppl_Constraint_coefficient (*cloog_pointers__.p_ppl_Constraint_coefficient)
++#define ppl_Constraint_inhomogeneous_term (*cloog_pointers__.p_ppl_Constraint_inhomogeneous_term)
++#define ppl_Constraint_space_dimension (*cloog_pointers__.p_ppl_Constraint_space_dimension)
++#define ppl_Constraint_System_begin (*cloog_pointers__.p_ppl_Constraint_System_begin)
++#define ppl_Constraint_System_const_iterator_dereference (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_dereference)
++#define ppl_Constraint_System_const_iterator_equal_test (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_equal_test)
++#define ppl_Constraint_System_const_iterator_increment (*cloog_pointers__.p_ppl_Constraint_System_const_iterator_increment)
++#define ppl_Constraint_System_end (*cloog_pointers__.p_ppl_Constraint_System_end)
++#define ppl_Constraint_System_insert_Constraint (*cloog_pointers__.p_ppl_Constraint_System_insert_Constraint)
++#define ppl_Constraint_System_space_dimension (*cloog_pointers__.p_ppl_Constraint_System_space_dimension)
++#define ppl_Constraint_type (*cloog_pointers__.p_ppl_Constraint_type)
++#define ppl_delete_Coefficient (*cloog_pointers__.p_ppl_delete_Coefficient)
++#define ppl_delete_Constraint (*cloog_pointers__.p_ppl_delete_Constraint)
++#define ppl_delete_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_delete_Constraint_System_const_iterator)
++#define ppl_delete_Linear_Expression (*cloog_pointers__.p_ppl_delete_Linear_Expression)
++#define ppl_delete_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron)
++#define ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_delete_Pointset_Powerset_C_Polyhedron_iterator)
++#define ppl_delete_Polyhedron (*cloog_pointers__.p_ppl_delete_Polyhedron)
++#define ppl_Linear_Expression_add_to_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_add_to_coefficient)
++#define ppl_Linear_Expression_add_to_inhomogeneous (*cloog_pointers__.p_ppl_Linear_Expression_add_to_inhomogeneous)
++#define ppl_Linear_Expression_coefficient (*cloog_pointers__.p_ppl_Linear_Expression_coefficient)
++#define ppl_Linear_Expression_inhomogeneous_term (*cloog_pointers__.p_ppl_Linear_Expression_inhomogeneous_term)
++#define ppl_Linear_Expression_space_dimension (*cloog_pointers__.p_ppl_Linear_Expression_space_dimension)
++#define ppl_new_Coefficient (*cloog_pointers__.p_ppl_new_Coefficient)
++#define ppl_new_Coefficient_from_mpz_t (*cloog_pointers__.p_ppl_new_Coefficient_from_mpz_t)
++#define ppl_new_Constraint (*cloog_pointers__.p_ppl_new_Constraint)
++#define ppl_new_Constraint_System (*cloog_pointers__.p_ppl_new_Constraint_System)
++#define ppl_new_Constraint_System_const_iterator (*cloog_pointers__.p_ppl_new_Constraint_System_const_iterator)
++#define ppl_new_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_C_Polyhedron)
++#define ppl_new_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_space_dimension)
++#define ppl_new_C_Polyhedron_recycle_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_recycle_Constraint_System)
++#define ppl_new_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression)
++#define ppl_new_Linear_Expression_from_Constraint (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Constraint)
++#define ppl_new_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_new_Linear_Expression_from_Linear_Expression)
++#define ppl_new_Linear_Expression_with_dimension (*cloog_pointers__.p_ppl_new_Linear_Expression_with_dimension)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension)
++#define ppl_new_Pointset_Powerset_C_Polyhedron_iterator (*cloog_pointers__.p_ppl_new_Pointset_Powerset_C_Polyhedron_iterator)
++#define ppl_Pointset_Powerset_C_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_constraint)
++#define ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed)
++#define ppl_Pointset_Powerset_C_Polyhedron_difference_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_difference_assign)
++#define ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_intersection_assign)
++#define ppl_Pointset_Powerset_C_Polyhedron_is_empty (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_is_empty)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_begin (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_begin)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_end (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_end)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test)
++#define ppl_Pointset_Powerset_C_Polyhedron_iterator_increment (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_iterator_increment)
++#define ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions)
++#define ppl_Pointset_Powerset_C_Polyhedron_maximize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_maximize)
++#define ppl_Pointset_Powerset_C_Polyhedron_minimize (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_minimize)
++#define ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions)
++#define ppl_Pointset_Powerset_C_Polyhedron_size (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_size)
++#define ppl_Pointset_Powerset_C_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_space_dimension)
++#define ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign (*cloog_pointers__.p_ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign)
++#define ppl_Polyhedron_add_constraint (*cloog_pointers__.p_ppl_Polyhedron_add_constraint)
++#define ppl_Polyhedron_add_constraints (*cloog_pointers__.p_ppl_Polyhedron_add_constraints)
++#define ppl_Polyhedron_add_space_dimensions_and_embed (*cloog_pointers__.p_ppl_Polyhedron_add_space_dimensions_and_embed)
++#define ppl_Polyhedron_get_constraints (*cloog_pointers__.p_ppl_Polyhedron_get_constraints)
++#define ppl_Polyhedron_map_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_map_space_dimensions)
++#define ppl_Polyhedron_remove_space_dimensions (*cloog_pointers__.p_ppl_Polyhedron_remove_space_dimensions)
++#define ppl_Polyhedron_space_dimension (*cloog_pointers__.p_ppl_Polyhedron_space_dimension)
++#define ppl_subtract_Linear_Expression_from_Linear_Expression (*cloog_pointers__.p_ppl_subtract_Linear_Expression_from_Linear_Expression)
++#define pprint (*cloog_pointers__.p_pprint)
++#define stmt_block (*cloog_pointers__.p_stmt_block)
++#define stmt_for (*cloog_pointers__.p_stmt_for)
++#define stmt_guard (*cloog_pointers__.p_stmt_guard)
++#define stmt_root (*cloog_pointers__.p_stmt_root)
++#define stmt_user (*cloog_pointers__.p_stmt_user)
++#define ppl_delete_Constraint_System (*cloog_pointers__.p_ppl_delete_Constraint_System)
++#define ppl_initialize (*cloog_pointers__.p_ppl_initialize)
++#define ppl_new_Constraint_System_from_Constraint (*cloog_pointers__.p_ppl_new_Constraint_System_from_Constraint)
++#define ppl_new_C_Polyhedron_from_Constraint_System (*cloog_pointers__.p_ppl_new_C_Polyhedron_from_Constraint_System)
++#define ppl_Polyhedron_affine_image (*cloog_pointers__.p_ppl_Polyhedron_affine_image)
++#define ppl_io_fprint_Pointset_Powerset_C_Polyhedron (*cloog_pointers__.p_ppl_io_fprint_Pointset_Powerset_C_Polyhedron)
++#define ppl_new_PIP_Problem_from_constraints (*cloog_pointers__.p_ppl_new_PIP_Problem_from_constraints)
++#define ppl_PIP_Problem_is_satisfiable (*cloog_pointers__.p_ppl_PIP_Problem_is_satisfiable)
++#define ppl_delete_PIP_Problem (*cloog_pointers__.p_ppl_delete_PIP_Problem)
++
++#define cloog_finalize (*cloog_pointers__.p_ppl_finalize)
++
++
+ #endif /* GRAPHITE_CLOOG_COMPAT_H */
+--- a/gcc/graphite-poly.h
++++ b/gcc/graphite-poly.h
+@@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
+ #ifndef GCC_GRAPHITE_POLY_H
+ #define GCC_GRAPHITE_POLY_H
+
++#include "graphite-cloog-util.h"
++
+ typedef struct poly_dr *poly_dr_p;
+ DEF_VEC_P(poly_dr_p);
+ DEF_VEC_ALLOC_P (poly_dr_p, heap);
+--- a/gcc/graphite.c
++++ b/gcc/graphite.c
+@@ -56,6 +56,35 @@ along with GCC; see the file COPYING3. If not see
+
+ CloogState *cloog_state;
+
++__typeof (cloog_pointers__) cloog_pointers__;
++
++static bool
++init_cloog_pointers (void)
++{
++ void *h;
++
++ if (cloog_pointers__.inited)
++ return cloog_pointers__.h != NULL;
++ h = dlopen ("libcloog.so.0", RTLD_LAZY);
++ cloog_pointers__.h = h;
++ if (h == NULL)
++ return false;
++#define DYNSYM(x) \
++ do \
++ { \
++ union { __typeof (cloog_pointers__.p_##x) p; void *q; } u; \
++ u.q = dlsym (h, #x); \
++ if (u.q == NULL) \
++ return false; \
++ cloog_pointers__.p_##x = u.p; \
++ } \
++ while (0)
++ DYNSYMS
++#undef DYNSYM
++ return true;
++}
++
++
+ /* Print global statistics to FILE. */
+
+ static void
+@@ -201,6 +230,12 @@ graphite_initialize (void)
+ return false;
+ }
+
++ if (!init_cloog_pointers ())
++ {
++ sorry ("Graphite loop optimizations cannot be used");
++ return false;
++ }
++
+ scev_reset ();
+ recompute_all_dominators ();
+ initialize_original_copy_tables ();
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 1c2c0d72f..3d5ce070e 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -1,48 +1,68 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gcc
-pkgver=4.5.3
+pkgver=4.6.1
_piepatchver=0.4.5
_specs_ver=0.2.0
_specs_gcc_ver=4.4.3
_uclibc_abiver=0.9.32
-pkgrel=0
+pkgrel=3
pkgdesc="The GNU Compiler Collection"
url="http://gcc.gnu.org"
arch="all"
license="GPL LGPL"
depends="binutils libgcc libgomp libobjc"
-makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip"
-subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp"
+makedepends="bison flex gmp-dev mpfr-dev texinfo libmpc-dev gawk zlib-dev zip
+ cloog-dev"
+subpackages="$pkgname-doc libstdc++:libcxx g++:gpp libgcc libgomp $pkgname-go
+ libgo"
replaces="libstdc++"
+if [ -n "$BOOTSTRAP" ]; then
+ LANG_OBJC=off
+ LANG_JAVA=off
+fi
+
if [ "$LANG_OBJC" != "off" ]; then
subpackages="$subpackages libobjc"
fi
if [ "$LANG_JAVA" != "off" ]; then
subpackages="$subpackages $pkgname-java libgcj"
+ makedepends="$makedepends paxctl"
fi
+if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
+
source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-core-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-g++-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-objc-$pkgver.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-java-$pkgver.tar.bz2
- http://distfiles.gentoo.org/distfiles/gcc-4.5.1-piepatches-v${_piepatchver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-go-$pkgver.tar.bz2
+ http://distfiles.gentoo.org/distfiles/gcc-4.6.1-piepatches-v${_piepatchver}.tar.bz2
http://distfiles.gentoo.org/distfiles/gcc-$_specs_gcc_ver-specs-$_specs_ver.tar.bz2
ftp://sourceware.org/pub/java/ecj-latest.jar
- 09_all_gcc-4.5-Wtrampolines.patch
- 15_all_gcc-libgomp-no-werror.patch
- 51_all_gcc-3.4-libiberty-pic.patch
+ 08_all_cross-compile.patch
+ 11_all_default-warn-format-security.patch
+ 12_all_default-warn-trampolines.patch
+ 15_all_libgomp-Werror.patch
+ 34_all_ia64_note.GNU-stack.patch
+ 51_all_libiberty-pic.patch
+ 74_all_gcc46_cloog-dl.patch
gcc-spec-env.patch
pt_gnu_eh_frame.patch
uclibc-getipinfo.patch
- gcc-4.5-dynamic-linker.patch
- PR32219.patch
+ gcc-4.6-dynamic-linker.patch
+ gcc-4.6-pr32219.patch
boehem-gc-uclibc.patch
gcc-pure64.patch
+ gcc-go.patch
+ gcc-libgcc-x86.get_pc_thunk.bx.patch
"
# we build out-of-tree
@@ -61,19 +81,28 @@ prepare() {
# thanks to Zorry for hard work on those patches
for i in "$srcdir"/piepatch/*.patch; do
msg "Applying $i"
- patch -p0 -i $i || return 1
+ patch -p0 -i $i || patch -p1 -i $i || return 1
done
# Gentoo and uclibc patches
+ _err=
for i in $source; do
case "$i" in
*.patch)
msg "Applying $i"
- patch -p1 -i "$srcdir"/$i || return 1
+ patch -p1 -i "$srcdir"/$i || _err="$_err $i"
;;
esac
done
+ if [ -n "$_err" ]; then
+ error "The following patches failed:"
+ for i in $_err; do
+ echo " $i"
+ done
+ return 1
+ fi
+
#PR33200
sed -i 's/use_fixproto=yes/:/' gcc/config.gcc || return 1
@@ -123,6 +152,10 @@ build() {
_languages="$_languages,java"
fi
+ if [ "$LANG_GO" != "off" ]; then
+ _languages="$_languages,go"
+ fi
+
# --enable-target-optspace is broken on powerpc
if [ "$CARCH" != "powerpc" ]; then
_target_optspace="--enable-target-optspace"
@@ -146,7 +179,7 @@ build() {
--build=${CBUILD} \
--host=${CHOST} \
--target=${CTARGET} \
- --with-pkgversion='Alpine' \
+ --with-pkgversion="Alpine ${pkgver}-r${pkgrel}" \
--disable-altivec \
--disable-checking \
--disable-fixed-point \
@@ -158,6 +191,7 @@ build() {
--enable-__cxa_atexit \
--enable-cld \
--enable-esp \
+ --enable-cloog-backend \
--enable-languages=$_languages \
--enable-shared \
$_target_optspace \
@@ -174,6 +208,8 @@ build() {
package() {
cd "$_builddir"
make -j1 DESTDIR="${pkgdir}" install || return 1
+ find "$pkgdir" -name '*.la' -delete || return 1
+
ln -s gcc "$pkgdir"/usr/bin/cc
# binutils provides libiberty.a
@@ -255,6 +291,7 @@ libgomp() {
java() {
pkgdesc="Java support for GCC"
+ paxctl -c -p -e -m "$pkgdir"/usr/libexec/gcc/*/*/ecj1 || return 1
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib
cd "$pkgdir"/usr/bin
mv gcj gcj-dbtool gjavah gcjh jcf-dump "$subpkgdir"/usr/bin/
@@ -265,9 +302,7 @@ java() {
done
mv \
"$pkgdir"/usr/lib/libgcj*.so \
- "$pkgdir"/usr/lib/libgcj*.la \
"$pkgdir"/usr/lib/libgij.so \
- "$pkgdir"/usr/lib/libgij.la \
"$pkgdir"/usr/lib/libgcj.spec \
"$subpkgdir"/usr/lib/
}
@@ -297,21 +332,50 @@ libgcj() {
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/java "$subpkgdir"/usr/share/
}
-
-md5sums="98be5094b5b5a7b9087494291bc7f522 gcc-core-4.5.3.tar.bz2
-2c78bf1d5f08a0b116f280de88d3ffe7 gcc-g++-4.5.3.tar.bz2
-9bb53e37e589515ba55979a19be9c036 gcc-objc-4.5.3.tar.bz2
-08e045fdbdc22ac9af3aec3b8d16dbab gcc-java-4.5.3.tar.bz2
-1f86fe5dc7d506b7fc04fcd8b7d2693c gcc-4.5.1-piepatches-v0.4.5.tar.bz2
+
+libgo() {
+ pkgdesc="Go runtime library for GCC"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
+}
+
+go() {
+ pkgdesc="Go support for GCC"
+ depends="libgo"
+ local libexec=usr/libexec/gcc/${CHOST:-$_chost}/$pkgver
+ mkdir -p "$subpkgdir"/$libexec \
+ "$subpkgdir"/usr/lib \
+ "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ || return 1
+ mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ || return 1
+ mv "$pkgdir"/$libexec/go1 "$subpkgdir"/$libexec/ || return 1
+ mv "$pkgdir"/usr/lib/libgo.a \
+ "$pkgdir"/usr/lib/libgo.so \
+ "$pkgdir"/usr/lib/libgobegin.a \
+ "$subpkgdir"/usr/lib/ || return 1
+}
+
+md5sums="0c0e7e35d2215e19de9c97efba507553 gcc-core-4.6.1.tar.bz2
+0d75ca7ca35b1e7f252223f9d23a6ad1 gcc-g++-4.6.1.tar.bz2
+cbf0d4b701827922cf37ba6a4ace0079 gcc-objc-4.6.1.tar.bz2
+32431ba42c1d18e64f2abfdfc834ef94 gcc-java-4.6.1.tar.bz2
+a69f9f156172c2e1da5590faa70f4fc7 gcc-go-4.6.1.tar.bz2
+5dc7efd84b526801b94fed21462aea62 gcc-4.6.1-piepatches-v0.4.5.tar.bz2
441c76504e1d97170117c294e65c7a72 gcc-4.4.3-specs-0.2.0.tar.bz2
d7cd6a27c8801e66cbaa964a039ecfdb ecj-latest.jar
-ab090760506eb70aa4436a349c6bd788 09_all_gcc-4.5-Wtrampolines.patch
-1c00bd9d12891a3e2311b32b98deb6fa 15_all_gcc-libgomp-no-werror.patch
-45951dd3bbc979c9e043c7203745cf31 51_all_gcc-3.4-libiberty-pic.patch
-c4045bfa85d8be780affd465be9d8ca8 gcc-spec-env.patch
+b1b5987e7c53f2c8a0fa929444bd9129 08_all_cross-compile.patch
+34e4a0260e9dbd434ac84b9dda381240 11_all_default-warn-format-security.patch
+a78022925c0ecb1f13384238b81adbe7 12_all_default-warn-trampolines.patch
+6862cb5268fef68a4a1906e0c4ea0d46 15_all_libgomp-Werror.patch
+1a8ce6b7a0b9a115e37fdda311704451 34_all_ia64_note.GNU-stack.patch
+d8692c56f04b92667096f59d843e95c5 51_all_libiberty-pic.patch
+656565d2e2c30ea12a398ef6959a9391 74_all_gcc46_cloog-dl.patch
+a695d7648509b4f8e18b389a19e6037c gcc-spec-env.patch
2db1e3482c5dd59dab70f701afa2ca80 pt_gnu_eh_frame.patch
6cc2385c5bbd6d0da6eaedd53c8bf547 uclibc-getipinfo.patch
-7f35da0f88f4d9c3d3839498bbda0eb3 gcc-4.5-dynamic-linker.patch
-6c866c7fb8d56deb8f6d652bee64e228 PR32219.patch
+3be85df859fa1d5c875bbfcc2dee8288 gcc-4.6-dynamic-linker.patch
+32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch"
+d1d3ad2b0c185b5548125a1b81bee154 gcc-pure64.patch
+c94014ece84407a36d239417a2bad25d gcc-go.patch
+978e3fac97ad99902a86bafc6f283727 gcc-libgcc-x86.get_pc_thunk.bx.patch"
diff --git a/main/gcc/PR32219.patch b/main/gcc/PR32219.patch
deleted file mode 100644
index b926e941f..000000000
--- a/main/gcc/PR32219.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From gcc-patches-return-258497-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org Tue Mar 16 13:32:55 2010
-Return-Path: <gcc-patches-return-258497-listarch-gcc-patches=gcc dot gnu dot org at gcc dot gnu dot org>
-Delivered-To: listarch-gcc-patches at gcc dot gnu dot org
-Received: (qmail 25550 invoked by alias); 16 Mar 2010 13:32:54 -0000
-Received: (qmail 25534 invoked by uid 22791); 16 Mar 2010 13:32:53 -0000
-X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,SUBJ_ALL_CAPS
-X-Spam-Check-By: sourceware.org
-Received: from mail-bw0-f210.google.com (HELO mail-bw0-f210.google.com) (209.85.218.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Mar 2010 13:32:48 +0000
-Received: by bwz2 with SMTP id 2so4002140bwz.30 for <multiple recipients>; Tue, 16 Mar 2010 06:32:45 -0700 (PDT)
-Received: by 10.204.14.84 with SMTP id f20mr2900449bka.209.1268746365293; Tue, 16 Mar 2010 06:32:45 -0700 (PDT)
-Received: from s42.loc (85-127-85-230.dynamic.xdsl-line.inode.at [85.127.85.230]) by mx.google.com with ESMTPS id 14sm3626793bwz.14.2010.03.16.06.32.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Mar 2010 06:32:44 -0700 (PDT)
-Received: from cow by s42.loc with local (Exim 4.71) (envelope-from <rep.dot.nop@gmail.com>) id 1NrX2W-0008Nj-5o; Tue, 16 Mar 2010 14:42:32 +0100
-From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
-To: gcc-patches at gcc dot gnu dot org
-Cc: rguenth at gcc dot gnu dot org, Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
-Subject: [PATCH] PR32219
-Date: Tue, 16 Mar 2010 14:42:27 +0100
-Message-Id: <1268746947-32108-1-git-send-email-rep.dot.nop@gmail.com>
-Mailing-List: contact gcc-patches-help at gcc dot gnu dot org; run by ezmlm
-Precedence: bulk
-List-Id: <gcc-patches.gcc.gnu.org>
-List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
-List-Post: <mailto:gcc-patches at gcc dot gnu dot org>
-List-Help: <mailto:gcc-patches-help at gcc dot gnu dot org>
-Sender: gcc-patches-owner at gcc dot gnu dot org
-Delivered-To: mailing list gcc-patches at gcc dot gnu dot org
-
-Hi,
-
-As suggested by richi.
-regtested on i686-linux-gnu with all default languages and no regressions.
-Ok for trunk?
-
-gcc/ChangeLog
-2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
-
- PR target/32219
- * varasm.c (default_binds_local_p_1): Weak data is not local.
-
-gcc/testsuite/ChangeLog
-2010-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
-
- PR target/32219
- * gcc.dg/visibility-21.c: New test.
-
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
----
- gcc/testsuite/gcc.dg/visibility-21.c | 14 ++++++++++++++
- gcc/varasm.c | 8 ++++----
- 2 files changed, 18 insertions(+), 4 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
-
-diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
-new file mode 100644
-index 0000000..be7deda
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/visibility-21.c
-@@ -0,0 +1,14 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+ if (f)
-+ f();
-+ return 0;
-+}
-+
-diff --git a/gcc/varasm.c b/gcc/varasm.c
-index 6b8222f..6b9269a 100644
---- a/gcc/varasm.c
-+++ b/gcc/varasm.c
-@@ -6613,6 +6613,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
- /* Static variables are always local. */
- else if (! TREE_PUBLIC (exp))
- local_p = true;
-+ /* Weak data can be overridden by a strong symbol
-+ in another module and so are not local. */
-+ else if (DECL_WEAK (exp))
-+ local_p = false;
- /* A variable is local if the user has said explicitly that it will
- be. */
- else if (DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6625,10 +6629,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
- local. */
- else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
- local_p = true;
-- /* Default visibility weak data can be overridden by a strong symbol
-- in another module and so are not local. */
-- else if (DECL_WEAK (exp))
-- local_p = false;
- /* If PIC, then assume that any global name can be overridden by
- symbols resolved from other modules, unless we are compiling with
- -fwhole-program, which assumes that names are local. */
---
-1.7.0
-
diff --git a/main/gcc/gcc-4.5-dynamic-linker.patch b/main/gcc/gcc-4.6-dynamic-linker.patch
index a11c7f934..a6b235cd1 100644
--- a/main/gcc/gcc-4.5-dynamic-linker.patch
+++ b/main/gcc/gcc-4.6-dynamic-linker.patch
@@ -17,7 +17,7 @@ index ae2416b..b0b9b2c 100644
@@ -971,7 +971,7 @@ INTERNAL_CFLAGS = -DIN_GCC @CROSS@
# This is the variable actually used when we compile. If you change this,
# you probably want to update BUILD_CFLAGS in configure.ac
- ALL_CFLAGS = $(T_CFLAGS) \
+ ALL_CFLAGS = $(ESP_NOPIE_CFLAGS) $(T_CFLAGS) $(CFLAGS-$@) \
- $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@
+ $(CFLAGS) $(INTERNAL_CFLAGS) $(COVERAGE_FLAGS) $(WARN_CFLAGS) @DEFS@ @NOSTDINC@
@@ -57,8 +57,8 @@ index c48fc93..3068717 100644
-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define GLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
#else
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index fce1ed1..c3bcd50 100644
@@ -94,8 +94,8 @@ index 5c716cd..b5e464e 100644
%{shared:-G -Bdynamic} \
%{!shared: %{!static: \
%{rdynamic:-export-dynamic} \
-- %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
-+ %{!dynamic-linker:-dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER}} \
+- -dynamic-linker /lib/ld-uClibc.so.0} \
++ -dynamic-linker DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER} \
%{static}} -init __init -fini __fini"
#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h"
@@ -207,13 +207,13 @@ index e567e9a..c052fd0 100644
+#define UCLIBC_DYNAMIC_LINKER DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #define LINUX_DYNAMIC_LINKER \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
- #define LINUX_DYNAMIC_LINKER32 \
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
@@ -135,3 +135,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #define TARGET_HAS_SINCOS (OPTION_GLIBC)
- #define TARGET_POSIX_IO
+ /* Whether we have sincos that follows the GNU extension. */
+ #define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC)
+
+#ifdef NOSTDINC
+#undef STANDARD_INCLUDE_DIR
@@ -270,13 +270,15 @@ index 2f24dfa..850cb22 100644
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+-#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+#define GLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define GLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
++#define BIONIC_DYNAMIC_LINKERN32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
#define LINUX_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
-
+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+ BIONIC_DYNAMIC_LINKERN32)
diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h
index ac9f8c5..8ab78b1 100644
--- a/gcc/config/mn10300/linux.h
@@ -306,9 +308,9 @@ index da7bca3..c36e7d6 100644
+#define GLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER32 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
+#define UCLIBC_DYNAMIC_LINKER64 DYNAMIC_LINKER_PREFIX "/" DYNAMIC_LINKER
- #if UCLIBC_DEFAULT
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
- #else
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h
index ddbcfa9..59bfd28 100644
--- a/gcc/config/s390/linux.h
diff --git a/main/gcc/gcc-4.6-pr32219.patch b/main/gcc/gcc-4.6-pr32219.patch
new file mode 100644
index 000000000..8233e5b23
--- /dev/null
+++ b/main/gcc/gcc-4.6-pr32219.patch
@@ -0,0 +1,25 @@
+--- ./gcc/varasm.c.orig
++++ ./gcc/varasm.c
+@@ -6758,6 +6758,10 @@
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+ local_p = true;
++ /* Weak data can be overridden by a strong symbol
++ in another module and so are not local. */
++ else if (DECL_WEAK (exp))
++ local_p = false;
+ /* A variable is local if the user has said explicitly that it will
+ be. */
+ else if ((DECL_VISIBILITY_SPECIFIED (exp)
+@@ -6771,11 +6775,6 @@
+ local. */
+ else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
+ local_p = true;
+- /* Default visibility weak data can be overridden by a strong symbol
+- in another module and so are not local. */
+- else if (DECL_WEAK (exp)
+- && !resolved_locally)
+- local_p = false;
+ /* If PIC, then assume that any global name can be overridden by
+ symbols resolved from other modules. */
+ else if (shlib)
diff --git a/main/gcc/gcc-go.patch b/main/gcc/gcc-go.patch
new file mode 100644
index 000000000..a882a5a38
--- /dev/null
+++ b/main/gcc/gcc-go.patch
@@ -0,0 +1,11 @@
+--- gcc-4.6.1.orig/gcc/go/Make-lang.in
++++ gcc-4.6.1/gcc/go/Make-lang.in
+@@ -63,7 +63,7 @@
+ go/unsafe.o
+
+ go1$(exeext): $(GO_OBJS) attribs.o $(BACKEND) $(LIBDEPS)
+- $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -o $@ \
++ $(CXX) $(ALL_CXXFLAGS) $(LDFLAGS) -fno-PIE -o $@ \
+ $(GO_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS)
+
+ # Documentation.
diff --git a/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch b/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch
new file mode 100644
index 000000000..551e6150a
--- /dev/null
+++ b/main/gcc/gcc-libgcc-x86.get_pc_thunk.bx.patch
@@ -0,0 +1,38 @@
+Index: libgcc/config/i386/morestack.S
+===================================================================
+--- ./libgcc/config/i386/morestack.S (revision 173993)
++++ ./libgcc/config/i386/morestack.S (revision 173994)
+@@ -278,8 +278,7 @@
+ movl 4(%esp),%eax # Function argument.
+ movl %eax,(%esp)
+ #ifdef __PIC__
+-#undef __i686
+- call __i686.get_pc_thunk.bx # %ebx may not be set up for us.
++ call __x86.get_pc_thunk.bx # %ebx may not be set up for us.
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ call _Unwind_Resume@PLT # Resume unwinding.
+ #else
+@@ -449,6 +448,23 @@
+ .size __morestack, . - __morestack
+ #endif
+
++#if !defined(__x86_64__) && defined(__PIC__)
++# Output the thunk to get PC into bx, since we use it above.
++ .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat
++ .globl __x86.get_pc_thunk.bx
++ .hidden __x86.get_pc_thunk.bx
++#ifdef __ELF__
++ .type __x86.get_pc_thunk.bx, @function
++#endif
++__x86.get_pc_thunk.bx:
++ .cfi_startproc
++ movl (%esp), %ebx
++ ret
++ .cfi_endproc
++#ifdef __ELF__
++ .size __x86.get_pc_thunk.bx, . - __x86.get_pc_thunk.bx
++#endif
++#endif
+
+ # The exception table. This tells the personality routine to execute
+ # the exception handler.
diff --git a/main/gcc/gcc-spec-env.patch b/main/gcc/gcc-spec-env.patch
index 9d5e666a5..57e7567e5 100644
--- a/main/gcc/gcc-spec-env.patch
+++ b/main/gcc/gcc-spec-env.patch
@@ -1,8 +1,9 @@
Add support for external spec file via the GCC_SPECS env var. This
allows us to easily control pie/ssp defaults with gcc-config profiles.
- Original patch by Rob Holland. Extended to support multiple
- entries separated by ':' by Kevin F. Quinn
+ Original patch by Rob Holland
+ Extended to support multiple entries separated by ':' by Kevin F. Quinn
+ Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
--- gcc-4/gcc/gcc.c
+++ gcc-4/gcc/gcc.c
@@ -15,7 +16,7 @@
+ * each spec listed, the string is overwritten at token boundaries
+ * (':') with '\0', an effect of strtok_r().
+ */
-+ GET_ENVIRONMENT (specs_file, "GCC_SPECS");
++ specs_file = getenv ("GCC_SPECS");
+ if (specs_file && (strlen(specs_file) > 0))
+ {
+ char *spec, *saveptr;
diff --git a/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch b/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch
deleted file mode 100644
index c9b54adbe..000000000
--- a/main/gcc/gcc4-stack-protector-uclibc-no_tls.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-diff -u gcc/config/i386/linux.h gcc/config/i386/linux.h
---- a/gcc/config/i386/linux.h 2 Jul 2005 08:52:20 -0000 1.60
-+++ b/gcc/config/i386/linux.h 2 Jul 2005 08:52:20 -0000 1.60
-@@ -186,7 +186,7 @@
- /* This macro may be overridden in i386/k*bsd-gnu.h. */
- #define REG_NAME(reg) reg
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* i386 glibc provides __stack_chk_guard in %gs:0x14. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
- #endif
-diff -u gcc/config/i386/linux64.h gcc/config/i386/linux64.h
---- a/gcc/config/i386/linux64.h 2 Jul 2005 08:52:20 -0000 1.33
-+++ b/gcc/config/i386/linux64.h 2 Jul 2005 08:52:20 -0000 1.33
-@@ -74,7 +74,7 @@
- /* This macro may be overridden in i386/k*bsd-gnu.h. */
- #define REG_NAME(reg) reg
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* i386 glibc provides __stack_chk_guard in %gs:0x14,
- x86_64 glibc provides it in %fs:0x28. */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
-diff -u gcc/config/rs6000/linux.h gcc/config/rs6000/linux.h
---- a/gcc/config/rs6000/linux.h 2 Jul 2005 08:52:11 -0000 1.53
-+++ b/gcc/config/rs6000/linux.h 2 Jul 2005 08:52:11 -0000 1.53
-@@ -114,7 +114,7 @@
-
- #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */
- #define TARGET_THREAD_SSP_OFFSET -0x7008
- #endif
-diff -u gcc/config/rs6000/linux64.h gcc/config/rs6000/linux64.h
---- a/gcc/config/rs6000/linux64.h 2 Jul 2005 08:52:15 -0000 1.81
-+++ b/gcc/config/rs6000/linux64.h 2 Jul 2005 08:52:15 -0000 1.81
-@@ -548,7 +548,7 @@
-
- #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* ppc32 glibc provides __stack_chk_guard in -0x7008(2),
- ppc64 glibc provides it at -0x7010(13). */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008)
-diff -u gcc/config/s390/linux.h gcc/config/s390/linux.h
---- a/gcc/config/s390/linux.h 2005-08-22 15:53:01.000000000 +0200 1.40
-+++ b/gcc/config/s390/linux.h 2005-08-22 15:53:01.000000000 +0200 1.40
-@@ -94,7 +94,7 @@
-
- #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h"
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* s390 glibc provides __stack_chk_guard in 0x14(tp),
- s390x glibc provides it at 0x28(tp). */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14)
-diff -u gcc/config/sparc/linux.h gcc/config/sparc/linux.h
---- a/gcc/config/sparc/linux.h 6 Jul 2005 07:48:57 -0000 1.72
-+++ b/gcc/config/sparc/linux.h 6 Jul 2005 07:48:57 -0000 1.72
-@@ -230,7 +230,7 @@
- #undef NEED_INDICATE_EXEC_STACK
- #define NEED_INDICATE_EXEC_STACK 1
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14]. */
- #define TARGET_THREAD_SSP_OFFSET 0x14
- #endif
-diff -u gcc/config/sparc/linux64.h gcc/config/sparc/linux64.h
---- a/gcc/config/sparc/linux64.h 6 Jul 2005 07:48:57 -0000 1.95
-+++ b/gcc/config/sparc/linux64.h 6 Jul 2005 07:48:57 -0000 1.95
-@@ -364,7 +364,7 @@
- #undef NEED_INDICATE_EXEC_STACK
- #define NEED_INDICATE_EXEC_STACK 1
-
--#ifdef TARGET_LIBC_PROVIDES_SSP
-+#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__
- /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14],
- sparc64 glibc provides it at [%g7 + 0x28]. */
- #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14)