From b1dd356f5eab11fa6fc18013189e51c13fdd763b Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Mon, 8 Nov 2010 08:30:41 -0800 Subject: gcc: upgrade from 4.5.0 to 4.5.1 Removed these patches which are not needed anymore. gcc-4.5.0_to_svn_162697.patch.bz2 : All the commits in this patch is part of the 4.5.1 branch. So moving to 4.5.1 makes this patch obsolete gcc_revert_base_version_to_4.5.0.patch: moving to 4.5.1 removes need of this patch gcc-pr43698-arm-rev-instr.patch: upstream has this fix. Signed-off-by: Nitin A Kamble --- .../gcc/gcc-4.5.1/gcc-poison-parameters.patch | 83 ++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-4.5.1/gcc-poison-parameters.patch (limited to 'meta/recipes-devtools/gcc/gcc-4.5.1/gcc-poison-parameters.patch') diff --git a/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-poison-parameters.patch b/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-poison-parameters.patch new file mode 100644 index 0000000..3cc7cba --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.5.1/gcc-poison-parameters.patch @@ -0,0 +1,83 @@ +gcc: add poison parameters detection + +Add the logic that, if not configured with "--enable-target-optspace", +gcc will meet error when build target app with "-Os" option. +This could avoid potential binary crash. + +Signed-off-by: Dongxiao Xu + +diff --git a/gcc/config.in b/gcc/config.in +index a9e208f..3004321 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -132,6 +132,12 @@ + #endif + + ++/* Define to enable target optspace support. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_TARGET_OPTSPACE ++#endif ++ ++ + /* Define if you want all operations on RTL (the basic data structure of the + optimizer and back end) to be checked for dynamic type safety at runtime. + This is quite expensive. */ +diff --git a/gcc/configure b/gcc/configure +index 2e022ed..004ec0b 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -909,6 +909,7 @@ enable_maintainer_mode + enable_version_specific_runtime_libs + with_slibdir + enable_plugin ++enable_target_optspace + ' + ac_precious_vars='build_alias + host_alias +@@ -25289,6 +25290,13 @@ $as_echo "#define ENABLE_PLUGIN 1" >>confdefs.h + + fi + ++if test x"$enable_target_optspace" != x; then : ++ ++$as_echo "#define ENABLE_TARGET_OPTSPACE 1" >>confdefs.h ++ ++fi ++ ++ + # Configure the subdirectories + # AC_CONFIG_SUBDIRS($subdirs) + +diff --git a/gcc/configure.ac b/gcc/configure.ac +index ac4ca70..18ec0aa 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4434,6 +4434,11 @@ if test x"$enable_plugin" = x"yes"; then + AC_DEFINE(ENABLE_PLUGIN, 1, [Define to enable plugin support.]) + fi + ++AC_SUBST(enable_target_optspace) ++if test x"$enable_target_optspace" != x; then ++ AC_DEFINE(ENABLE_TARGET_OPTSPACE, 1, [Define to enable target optspace support.]) ++fi ++ + # Configure the subdirectories + # AC_CONFIG_SUBDIRS($subdirs) + +diff --git a/gcc/opts.c b/gcc/opts.c +index 139cd26..2fdd96a 100644 +--- a/gcc/opts.c ++++ b/gcc/opts.c +@@ -945,6 +945,11 @@ decode_options (unsigned int argc, const char **argv) + else + set_param_value ("min-crossjump-insns", initial_min_crossjump_insns); + ++#ifndef ENABLE_TARGET_OPTSPACE ++ if (optimize_size == 1) ++ error ("Do not use -Os option if --enable-target-optspace is not set."); ++#endif ++ + if (first_time_p) + { + /* Initialize whether `char' is signed. */ -- cgit v1.1