summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.inc3
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6/gcc-poison-parameters.patch76
2 files changed, 1 insertions, 78 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.inc b/meta/recipes-devtools/gcc/gcc-4.6.inc
index 28a70f3c08..290d8f289c 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.inc
@@ -1,6 +1,6 @@
1require gcc-common.inc 1require gcc-common.inc
2 2
3PR = "r7" 3PR = "r8"
4 4
5# Third digit in PV should be incremented after a minor release 5# Third digit in PV should be incremented after a minor release
6# happens from this branch on gcc e.g. currently its 4.6.0 6# happens from this branch on gcc e.g. currently its 4.6.0
@@ -62,7 +62,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH};proto=http \
62 file://64bithack.patch \ 62 file://64bithack.patch \
63 file://optional_libstdc.patch \ 63 file://optional_libstdc.patch \
64 file://disable_relax_pic_calls_flag.patch \ 64 file://disable_relax_pic_calls_flag.patch \
65 file://gcc-poison-parameters.patch \
66 file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ 65 file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
67 file://COLLECT_GCC_OPTIONS.patch \ 66 file://COLLECT_GCC_OPTIONS.patch \
68 file://volatile_access_backport.patch \ 67 file://volatile_access_backport.patch \
diff --git a/meta/recipes-devtools/gcc/gcc-4.6/gcc-poison-parameters.patch b/meta/recipes-devtools/gcc/gcc-4.6/gcc-poison-parameters.patch
deleted file mode 100644
index 58bf32fd02..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6/gcc-poison-parameters.patch
+++ /dev/null
@@ -1,76 +0,0 @@
1Upstream-Status: Pending
2
3gcc: add poison parameters detection
4
5Add the logic that, if not configured with "--enable-target-optspace",
6gcc will meet error when build target app with "-Os" option.
7This could avoid potential binary crash.
8
9Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
10
11Index: gcc-4.6.0/gcc/config.in
12===================================================================
13--- gcc-4.6.0.orig/gcc/config.in
14+++ gcc-4.6.0/gcc/config.in
15@@ -150,6 +150,12 @@
16 #endif
17
18
19+/* Define to enable target optspace support. */
20+#ifndef USED_FOR_TARGET
21+#undef ENABLE_TARGET_OPTSPACE
22+#endif
23+
24+
25 /* Define if you want all operations on RTL (the basic data structure of the
26 optimizer and back end) to be checked for dynamic type safety at runtime.
27 This is quite expensive. */
28Index: gcc-4.6.0/gcc/configure
29===================================================================
30--- gcc-4.6.0.orig/gcc/configure
31+++ gcc-4.6.0/gcc/configure
32@@ -26434,6 +26434,13 @@ $as_echo "#define ENABLE_LIBQUADMATH_SUP
33 fi
34
35
36+if test x"$enable_target_optspace" != x; then :
37+
38+$as_echo "#define ENABLE_TARGET_OPTSPACE 1" >>confdefs.h
39+
40+fi
41+
42+
43 # Configure the subdirectories
44 # AC_CONFIG_SUBDIRS($subdirs)
45
46Index: gcc-4.6.0/gcc/configure.ac
47===================================================================
48--- gcc-4.6.0.orig/gcc/configure.ac
49+++ gcc-4.6.0/gcc/configure.ac
50@@ -4907,6 +4907,11 @@ if test "${ENABLE_LIBQUADMATH_SUPPORT}"
51 fi
52
53
54+AC_SUBST(enable_target_optspace)
55+if test x"$enable_target_optspace" != x; then
56+ AC_DEFINE(ENABLE_TARGET_OPTSPACE, 1, [Define to enable target optspace support.])
57+fi
58+
59 # Configure the subdirectories
60 # AC_CONFIG_SUBDIRS($subdirs)
61
62Index: gcc-4.6.0/gcc/opts.c
63===================================================================
64--- gcc-4.6.0.orig/gcc/opts.c
65+++ gcc-4.6.0/gcc/opts.c
66@@ -605,6 +605,10 @@ default_options_optimization (struct gcc
67 maybe_set_param_value (PARAM_MIN_CROSSJUMP_INSNS,
68 default_param_value (PARAM_MIN_CROSSJUMP_INSNS),
69 opts->x_param_values, opts_set->x_param_values);
70+#ifndef ENABLE_TARGET_OPTSPACE
71+ if (optimize_size == 1)
72+ error ("Do not use -Os option if --enable-target-optspace is not set.");
73+#endif
74
75 /* Allow default optimizations to be specified on a per-machine basis. */
76 maybe_default_options (opts, opts_set,