summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-05-25 01:39:33 +0000
committerMike Frysinger <vapier@gentoo.org>2005-05-25 01:39:33 +0000
commite734e27810a3b0b92e58b751de595a03cfbcad0a (patch)
tree143cd98f15ca6dbc8bccadfc3c0de08a99ee537a /sys-devel/gcc/files/stubs
parentFirst round of Tiger package.provided updates. (diff)
downloadhistorical-e734e27810a3b0b92e58b751de595a03cfbcad0a.tar.gz
historical-e734e27810a3b0b92e58b751de595a03cfbcad0a.tar.bz2
historical-e734e27810a3b0b92e58b751de595a03cfbcad0a.zip
stub files in case the toolchain doesnt really support htb/ssp
Diffstat (limited to 'sys-devel/gcc/files/stubs')
-rw-r--r--sys-devel/gcc/files/stubs/gcc-3.3-htb-stub.patch59
-rw-r--r--sys-devel/gcc/files/stubs/gcc-3.3-ssp-stub.patch45
-rw-r--r--sys-devel/gcc/files/stubs/gcc-3.4-htb-stub.patch31
-rw-r--r--sys-devel/gcc/files/stubs/gcc-3.4-ssp-stub.patch43
4 files changed, 178 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/stubs/gcc-3.3-htb-stub.patch b/sys-devel/gcc/files/stubs/gcc-3.3-htb-stub.patch
new file mode 100644
index 000000000000..f6d81040c58c
--- /dev/null
+++ b/sys-devel/gcc/files/stubs/gcc-3.3-htb-stub.patch
@@ -0,0 +1,59 @@
+--- gcc-3.3.6/gcc/c-opts.c
++++ gcc-3.3.6/gcc/c-opts.c
+@@ -193,6 +193,8 @@ static void sanitize_cpp_opts PARAMS ((v
+ OPT("fall-virtual", CL_CXX, OPT_fall_virtual) \
+ OPT("falt-external-templates",CL_CXX, OPT_falt_external_templates) \
+ OPT("fasm", CL_ALL, OPT_fasm) \
++ OPT("fbc-strings-only", CL_ALL, OPT_fbc_strings_only) \
++ OPT("fbounds-checking", CL_ALL, OPT_fbounds_checking) \
+ OPT("fbuiltin", CL_ALL, OPT_fbuiltin) \
+ OPT("fbuiltin-", CL_ALL | CL_JOINED, OPT_fbuiltin_) \
+ OPT("fcheck-new", CL_CXX, OPT_fcheck_new) \
+@@ -1037,6 +1039,11 @@ c_common_decode_option (argc, argv)
+ flag_no_asm = !on;
+ break;
+
++ case OPT_fbounds_checking:
++ case OPT_fbc_strings_only:
++ warning ("htb stub: bounds checking is not supported");
++ break;
++
+ case OPT_fbuiltin:
+ flag_no_builtin = !on;
+ break;
+--- gcc-3.3.6/gcc/cp/lang-options.h
++++ gcc-3.3.6/gcc/cp/lang-options.h
+@@ -32,6 +32,8 @@ DEFINE_LANG_NAME ("C++")
+ { "-fno-alt-external-templates", "" },
+ { "-fansi-overloading", "" },
+ { "-fno-ansi-overloading", "" },
++ { "-fbounds-checking", "" },
++ { "-fno-bounds-checking", "" },
+ { "-fcheck-new",
+ N_("Check the return value of new") },
+ { "-fno-check-new", "" },
+@@ -117,6 +119,9 @@ DEFINE_LANG_NAME ("C++")
+ { "-fxref",
+ N_("Emit cross referencing information") },
+ { "-fno-xref", "" },
++ { "-fbounds-checking",
++ N_("Generate array and pointer bounds checking code") },
++ { "-fno-bounds-checking", "" },
+
+ { "-Wreturn-type",
+ N_("Warn about inconsistent return types") },
+--- gcc-3.3.6/gcc/toplev.c
++++ gcc-3.3.6/gcc/toplev.c
+@@ -1249,6 +1267,12 @@ documented_lang_options[] =
+ { "-fshort-wchar",
+ N_("Override the underlying type for wchar_t to `unsigned short'") },
+ { "-fno-short-wchar", "" },
++ { "-fbounds-checking",
++ N_("Generate array and pointer bounds checking code") },
++ { "-fno-bounds-checking", "" },
++ { "-fbc-strings-only",
++ N_("Restrict bounds checking to strings only") },
++ { "-fno-bc-strings-only", "" },
+
+ { "-Wall",
+ N_("Enable most warning messages") },
diff --git a/sys-devel/gcc/files/stubs/gcc-3.3-ssp-stub.patch b/sys-devel/gcc/files/stubs/gcc-3.3-ssp-stub.patch
new file mode 100644
index 000000000000..ed996e7df428
--- /dev/null
+++ b/sys-devel/gcc/files/stubs/gcc-3.3-ssp-stub.patch
@@ -0,0 +1,45 @@
+--- gcc-3.3.6/gcc/toplev.c
++++ gcc-3.3.6/gcc/toplev.c
+@@ -904,6 +904,10 @@ int align_functions_log;
+ minimum function alignment. Zero means no alignment is forced. */
+ int force_align_functions_log;
+
++int flag_propolice_protection = 0;
++int flag_stack_protection = 0;
++int warn_stack_protector = 0;
++
+ /* Table of supported debugging formats. */
+ static const struct
+ {
+@@ -1188,6 +1197,10 @@ static const lang_independent_options f_
+ N_("Trap for signed overflow in addition / subtraction / multiplication") },
+ { "new-ra", &flag_new_regalloc, 1,
+ N_("Use graph coloring register allocation.") },
++ {"stack-protector", &flag_propolice_protection, 1,
++ N_("Enables stack protection") },
++ {"stack-protector-all", &flag_stack_protection, 1,
++ N_("Enables stack protection of every function") } ,
+ };
+
+ /* Table of language-specific options. */
+@@ -1547,7 +1560,9 @@ static const lang_independent_options W_
+ {"missing-noreturn", &warn_missing_noreturn, 1,
+ N_("Warn about functions which might be candidates for attribute noreturn") },
+ {"strict-aliasing", &warn_strict_aliasing, 1,
+- N_ ("Warn about code which might break the strict aliasing rules") }
++ N_ ("Warn about code which might break the strict aliasing rules") },
++ {"stack-protector", &warn_stack_protector, 1,
++ N_("Warn when disabling stack protector for some reason")}
+ };
+
+ void
+@@ -5230,6 +5247,9 @@ process_options ()
+ /* The presence of IEEE signaling NaNs, implies all math can trap. */
+ if (flag_signaling_nans)
+ flag_trapping_math = 1;
++
++ if (flag_stack_protection || flag_propolice_protection)
++ warning ("ssp stub: stack protector is not supported");
+ }
+
+ /* Initialize the compiler back end. */
diff --git a/sys-devel/gcc/files/stubs/gcc-3.4-htb-stub.patch b/sys-devel/gcc/files/stubs/gcc-3.4-htb-stub.patch
new file mode 100644
index 000000000000..6b6d66338945
--- /dev/null
+++ b/sys-devel/gcc/files/stubs/gcc-3.4-htb-stub.patch
@@ -0,0 +1,31 @@
+--- gcc-3.4.4/gcc/c.opt
++++ gcc-3.4.4/gcc/c.opt
+@@ -426,6 +426,14 @@ fasm
+ C ObjC C++ ObjC++
+ Recognize the \"asm\" keyword
+
++fbounds-checking
++C
++Generate code to check bounds before indexing arrays
++
++fbc-strings-only
++C
++Restrict bounds checking to strings only
++
+ fbuiltin
+ C ObjC C++ ObjC++
+ Recognize built-in functions
+--- gcc-3.4.4/gcc/c-opts.c
++++ gcc-3.4.4/gcc/c-opts.c
+@@ -708,6 +708,11 @@ c_common_handle_option (size_t scode, co
+ flag_no_asm = !value;
+ break;
+
++ case OPT_fbounds_checking:
++ case OPT_fbc_strings_only:
++ warning ("htb stub: bounds checking is not supported");
++ break;
++
+ case OPT_fbuiltin:
+ flag_no_builtin = !value;
+ break;
diff --git a/sys-devel/gcc/files/stubs/gcc-3.4-ssp-stub.patch b/sys-devel/gcc/files/stubs/gcc-3.4-ssp-stub.patch
new file mode 100644
index 000000000000..74353d824c51
--- /dev/null
+++ b/sys-devel/gcc/files/stubs/gcc-3.4-ssp-stub.patch
@@ -0,0 +1,43 @@
+--- gcc-3.4.3/gcc/common.opt
++++ gcc-3.4.3/gcc/common.opt
+@@ -152,6 +152,10 @@ Wunused-variable
+ Common
+ Warn when a variable is unused
+
++Wstack-protector
++Common
++Warn when not issuing stack smashing protection for some reason
++
+ aux-info
+ Common Separate
+ -aux-info <file> Emit declaration information into <file>
+@@ -743,6 +747,14 @@ fzero-initialized-in-bss
+ Common
+ Put zero initialized data in the bss section
+
++fstack-protector
++Common
++Enables stack protection
++
++fstack-protector-all
++Common
++Enables stack protection of every function
++
+ g
+ Common JoinedOrMissing
+ Generate debug information in default format
+--- gcc-3.4.3.orig/gcc/opts.c 2005-01-10 20:01:46.000000000 -0800
++++ gcc-3.4.3/gcc/opts.c 2005-01-11 00:04:13.000000000 -0800
+@@ -804,6 +807,12 @@ common_handle_option (size_t scode, cons
+ warn_unused_variable = value;
+ break;
+
++ case OPT_fstack_protector:
++ case OPT_fstack_protector_all:
++ case OPT_Wstack_protector:
++ warning ("ssp stub: stack protector is not supported");
++ break;
++
+ case OPT_aux_info:
+ case OPT_aux_info_:
+ aux_info_file_name = arg;