mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-21 13:47:48 +00:00
637b137512
- add gcc-4.4.0 patches, vampirised from the Gentoo patchset - gcc-4.4.0 auto-selects and uses appropriate companion linraries -------- diffstat follows -------- /devel/gcc-4.4/scripts/build/cc/gcc.sh | 20 18 2 0 + /devel/gcc-4.4/patches/gcc/4.4.0/280-freebsd.patch | 188 188 0 0 ++++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/140-default-format-security.patch | 98 98 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/290-freebsd.patch | 128 128 0 0 +++++++ /devel/gcc-4.4/patches/gcc/4.4.0/310-uclibc-conf.patch | 70 70 0 0 ++++ /devel/gcc-4.4/patches/gcc/4.4.0/240-libstdc++-pic.patch | 106 106 0 0 ++++++ /devel/gcc-4.4/patches/gcc/4.4.0/260-sh-libgcc-stacks.patch | 50 50 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/100-alpha-mieee-default.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/180-libgomp-no-werror.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/170-sparc64-bsd.patch | 58 58 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/200-libiberty.h-asprintf.patch | 30 30 0 0 ++ /devel/gcc-4.4/patches/gcc/4.4.0/220-libiberty-pic.patch | 22 22 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/110-trampolinewarn.patch | 54 54 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/160-netbsd-symbolic.patch | 22 22 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/190-flatten-switch-stmt-00.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/150-default-fortify-source.patch | 52 52 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/340-libmudflap-susv3-legacy.patch | 96 96 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/120-java-nomulti.patch | 92 92 0 0 +++++ /devel/gcc-4.4/patches/gcc/4.4.0/270-sh-pr24836.patch | 48 48 0 0 +++ /devel/gcc-4.4/patches/gcc/4.4.0/330-c99-snprintf.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/230-superh-default-multilib.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/250-ia64-noteGNUstack.patch | 158 158 0 0 +++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/300-pr40105.patch | 360 360 0 0 ++++++++++++++++++++ /devel/gcc-4.4/patches/gcc/4.4.0/210-arm-unbreak-armv4t.patch | 24 24 0 0 + /devel/gcc-4.4/patches/gcc/4.4.0/130-cross-compile.patch | 78 78 0 0 ++++ /devel/gcc-4.4/patches/gcc/4.4.0/320-missing-execinfo_h.patch | 24 24 0 0 + /devel/gcc-4.4/config/cc/gcc.in | 1 1 0 0 + 27 files changed, 1945 insertions(+), 2 deletions(-)
181 lines
6.4 KiB
Diff
181 lines
6.4 KiB
Diff
diff -durN gcc-4.4.0.orig/gcc/Makefile.in gcc-4.4.0/gcc/Makefile.in
|
||
--- gcc-4.4.0.orig/gcc/Makefile.in 2009-03-25 13:00:32.000000000 +0100
|
||
+++ gcc-4.4.0/gcc/Makefile.in 2009-05-27 21:38:50.000000000 +0200
|
||
@@ -2785,7 +2785,8 @@
|
||
value-prof.h $(TREE_INLINE_H) $(TARGET_H)
|
||
cfgrtl.o : cfgrtl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||
$(FLAGS_H) insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h \
|
||
- output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) insn-config.h $(EXPR_H) \
|
||
+ output.h $(TOPLEV_H) $(FUNCTION_H) except.h $(TM_P_H) $(INSN_ATTR_H) \
|
||
+ insn-config.h $(EXPR_H) \
|
||
$(CFGLAYOUT_H) $(CFGLOOP_H) $(OBSTACK_H) $(TARGET_H) $(TREE_H) \
|
||
tree-pass.h $(DF_H) $(GGC_H)
|
||
cfganal.o : cfganal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||
diff -durN gcc-4.4.0.orig/gcc/cfgrtl.c gcc-4.4.0/gcc/cfgrtl.c
|
||
--- gcc-4.4.0.orig/gcc/cfgrtl.c 2008-12-12 22:16:09.000000000 +0100
|
||
+++ gcc-4.4.0/gcc/cfgrtl.c 2009-05-27 21:38:50.000000000 +0200
|
||
@@ -53,6 +53,7 @@
|
||
#include "toplev.h"
|
||
#include "tm_p.h"
|
||
#include "obstack.h"
|
||
+#include "insn-attr.h"
|
||
#include "insn-config.h"
|
||
#include "cfglayout.h"
|
||
#include "expr.h"
|
||
@@ -427,13 +428,27 @@
|
||
return 0;
|
||
}
|
||
|
||
+static unsigned int
|
||
+rest_of_pass_free_cfg (void)
|
||
+{
|
||
+#ifdef DELAY_SLOTS
|
||
+ /* The resource.c machinery uses DF but the CFG isn't guaranteed to be
|
||
+ valid at that point so it would be too late to call df_analyze. */
|
||
+ if (optimize > 0 && flag_delayed_branch)
|
||
+ df_analyze ();
|
||
+#endif
|
||
+
|
||
+ free_bb_for_insn ();
|
||
+ return 0;
|
||
+}
|
||
+
|
||
struct rtl_opt_pass pass_free_cfg =
|
||
{
|
||
{
|
||
RTL_PASS,
|
||
NULL, /* name */
|
||
NULL, /* gate */
|
||
- free_bb_for_insn, /* execute */
|
||
+ rest_of_pass_free_cfg, /* execute */
|
||
NULL, /* sub */
|
||
NULL, /* next */
|
||
0, /* static_pass_number */
|
||
diff -durN gcc-4.4.0.orig/gcc/resource.c gcc-4.4.0/gcc/resource.c
|
||
--- gcc-4.4.0.orig/gcc/resource.c 2009-02-20 16:20:38.000000000 +0100
|
||
+++ gcc-4.4.0/gcc/resource.c 2009-05-27 21:38:50.000000000 +0200
|
||
@@ -135,8 +135,6 @@
|
||
static int
|
||
find_basic_block (rtx insn, int search_limit)
|
||
{
|
||
- basic_block bb;
|
||
-
|
||
/* Scan backwards to the previous BARRIER. Then see if we can find a
|
||
label that starts a basic block. Return the basic block number. */
|
||
for (insn = prev_nonnote_insn (insn);
|
||
@@ -157,11 +155,8 @@
|
||
for (insn = next_nonnote_insn (insn);
|
||
insn && LABEL_P (insn);
|
||
insn = next_nonnote_insn (insn))
|
||
- {
|
||
- FOR_EACH_BB (bb)
|
||
- if (insn == BB_HEAD (bb))
|
||
- return bb->index;
|
||
- }
|
||
+ if (BLOCK_FOR_INSN (insn))
|
||
+ return BLOCK_FOR_INSN (insn)->index;
|
||
|
||
return -1;
|
||
}
|
||
@@ -848,13 +843,12 @@
|
||
(with no intervening active insns) to see if any of them start a basic
|
||
block. If we hit the start of the function first, we use block 0.
|
||
|
||
- Once we have found a basic block and a corresponding first insns, we can
|
||
- accurately compute the live status from basic_block_live_regs and
|
||
- reg_renumber. (By starting at a label following a BARRIER, we are immune
|
||
- to actions taken by reload and jump.) Then we scan all insns between
|
||
- that point and our target. For each CLOBBER (or for call-clobbered regs
|
||
- when we pass a CALL_INSN), mark the appropriate registers are dead. For
|
||
- a SET, mark them as live.
|
||
+ Once we have found a basic block and a corresponding first insn, we can
|
||
+ accurately compute the live status (by starting at a label following a
|
||
+ BARRIER, we are immune to actions taken by reload and jump.) Then we
|
||
+ scan all insns between that point and our target. For each CLOBBER (or
|
||
+ for call-clobbered regs when we pass a CALL_INSN), mark the appropriate
|
||
+ registers are dead. For a SET, mark them as live.
|
||
|
||
We have to be careful when using REG_DEAD notes because they are not
|
||
updated by such things as find_equiv_reg. So keep track of registers
|
||
@@ -954,13 +948,10 @@
|
||
TARGET. Otherwise, we must assume everything is live. */
|
||
if (b != -1)
|
||
{
|
||
- regset regs_live = DF_LR_IN (BASIC_BLOCK (b));
|
||
+ regset regs_live = df_get_live_in (BASIC_BLOCK (b));
|
||
rtx start_insn, stop_insn;
|
||
|
||
- /* Compute hard regs live at start of block -- this is the real hard regs
|
||
- marked live, plus live pseudo regs that have been renumbered to
|
||
- hard regs. */
|
||
-
|
||
+ /* Compute hard regs live at start of block. */
|
||
REG_SET_TO_HARD_REG_SET (current_live_regs, regs_live);
|
||
|
||
/* Get starting and ending insn, handling the case where each might
|
||
@@ -1046,10 +1037,24 @@
|
||
|
||
else if (LABEL_P (real_insn))
|
||
{
|
||
+ basic_block bb;
|
||
+
|
||
/* A label clobbers the pending dead registers since neither
|
||
reload nor jump will propagate a value across a label. */
|
||
AND_COMPL_HARD_REG_SET (current_live_regs, pending_dead_regs);
|
||
CLEAR_HARD_REG_SET (pending_dead_regs);
|
||
+
|
||
+ /* We must conservatively assume that all registers that used
|
||
+ to be live here still are. The fallthrough edge may have
|
||
+ left a live register uninitialized. */
|
||
+ bb = BLOCK_FOR_INSN (real_insn);
|
||
+ if (bb)
|
||
+ {
|
||
+ HARD_REG_SET extra_live;
|
||
+
|
||
+ REG_SET_TO_HARD_REG_SET (extra_live, df_get_live_in (bb));
|
||
+ IOR_HARD_REG_SET (current_live_regs, extra_live);
|
||
+ }
|
||
}
|
||
|
||
/* The beginning of the epilogue corresponds to the end of the
|
||
@@ -1121,6 +1126,7 @@
|
||
init_resource_info (rtx epilogue_insn)
|
||
{
|
||
int i;
|
||
+ basic_block bb;
|
||
|
||
/* Indicate what resources are required to be valid at the end of the current
|
||
function. The condition code never is and memory always is. If the
|
||
@@ -1189,6 +1195,11 @@
|
||
/* Allocate and initialize the tables used by mark_target_live_regs. */
|
||
target_hash_table = XCNEWVEC (struct target_info *, TARGET_HASH_PRIME);
|
||
bb_ticks = XCNEWVEC (int, last_basic_block);
|
||
+
|
||
+ /* Set the BLOCK_FOR_INSN of each label that starts a basic block. */
|
||
+ FOR_EACH_BB (bb)
|
||
+ if (LABEL_P (BB_HEAD (bb)))
|
||
+ BLOCK_FOR_INSN (BB_HEAD (bb)) = bb;
|
||
}
|
||
|
||
/* Free up the resources allocated to mark_target_live_regs (). This
|
||
@@ -1197,6 +1208,8 @@
|
||
void
|
||
free_resource_info (void)
|
||
{
|
||
+ basic_block bb;
|
||
+
|
||
if (target_hash_table != NULL)
|
||
{
|
||
int i;
|
||
@@ -1222,6 +1235,10 @@
|
||
free (bb_ticks);
|
||
bb_ticks = NULL;
|
||
}
|
||
+
|
||
+ FOR_EACH_BB (bb)
|
||
+ if (LABEL_P (BB_HEAD (bb)))
|
||
+ BLOCK_FOR_INSN (BB_HEAD (bb)) = NULL;
|
||
}
|
||
|
||
/* Clear any hashed information that we have stored for INSN. */
|