aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--upstream/Wformat.patch45
-rw-r--r--upstream/config_all.patch10
-rw-r--r--upstream/config_i386.patch37
3 files changed, 79 insertions, 13 deletions
diff --git a/upstream/Wformat.patch b/upstream/Wformat.patch
new file mode 100644
index 0000000..be0b07a
--- /dev/null
+++ b/upstream/Wformat.patch
@@ -0,0 +1,45 @@
+--- a/gcc/c-family/c-common.c 2012-02-13 21:12:54.000000000 +0100
++++ b/gcc/c-family/c-common.c 2012-07-09 23:17:18.375234684 +0200
+@@ -202,7 +202,19 @@ int warn_unknown_pragmas; /* Tri state v
+ /* Warn about format/argument anomalies in calls to formatted I/O functions
+ (*printf, *scanf, strftime, strfmon, etc.). */
+
++#ifdef ENABLE_ESPF
++int warn_format = 1;
++#else
+ int warn_format;
++#endif
++
++/* Warn about possible security problems with format functions. */
++
++#ifdef ENABLE_ESPF
++int warn_format_security = 1;
++#else
++int warn_format_security;
++#endif
+
+ /* C/ObjC language option variables. */
+
+--- a/gcc/c-family/c-common.h 2011-12-20 21:44:13.000000000 +0100
++++ b/gcc/c-family/c-common.h 2012-07-09 23:16:33.355233344 +0200
+@@ -594,6 +594,9 @@ extern int warn_unknown_pragmas; /* Tri
+
+ extern int warn_format;
+
++/* Warn about possible security problems with format functions. */
++
++extern int warn_format_security;
+
+ /* C/ObjC language option variables. */
+
+--- a/gcc/c-family/c.opt 2012-02-06 11:31:18.000000000 +0100
++++ b/gcc/c-family/c.opt 2012-07-09 22:07:11.449109322 +0200
+@@ -392,7 +392,7 @@ C ObjC C++ ObjC++ Var(warn_format_contai
+ Warn about format strings that contain NUL bytes
+
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning
++C ObjC C++ ObjC++ Warning
+ Warn about possible security problems with format functions
+
+ Wformat-y2k
diff --git a/upstream/config_all.patch b/upstream/config_all.patch
index f3af62d..f7c8e9b 100644
--- a/upstream/config_all.patch
+++ b/upstream/config_all.patch
@@ -1,6 +1,6 @@
--- a/gcc/config/linux.h 2011-07-07 17:38:34.000000000 +0200
-+++ b/gcc/config/linux.h 2012-07-06 17:09:54.414853750 +0200
-@@ -104,3 +104,29 @@ see the files COPYING3 and COPYING.RUNTI
++++ b/gcc/config/linux.h 2012-07-09 14:24:08.599281404 +0200
+@@ -104,3 +104,31 @@ see the files COPYING3 and COPYING.RUNTI
/* Whether we have sincos that follows the GNU extension. */
#undef TARGET_HAS_SINCOS
#define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC)
@@ -15,18 +15,20 @@
+#endif
+#ifdef ENABLE_ESPF_SSP
+#define ESPF_GCC_SSP_SPEC \
-+ "%{nostdlib|nodefaultlibs|fno-stack-protector| \
++ "%{nostdlib|nodefaultlibs|fno-stack-protector|freestanding| \
+ fstack-protector|fstack-protector-all:;:-fstack-protector}"
+#else
+#define ESPF_GCC_SSP_SPEC ""
+#endif
+#ifdef ENABLE_ESPF_FORTIFY
+#define ESPF_CPP_UNIQUE_OPTIONS_SPEC \
-+ "%{D_FORTIFY_SOURCE|D_FORTIFY_SOURCE=*|U_FORTIFY_SOURCE:;:-D _FORTIFY_SOURCE=2}"
++ "%{D_FORTIFY_SOURCE|D_FORTIFY_SOURCE=*|U_FORTIFY_SOURCE:;:-D_FORTIFY_SOURCE=2}"
+#else
+#define ESPF_CPP_UNIQUE_OPTIONS_SPEC ""
+#endif
+#define ESPF_DRIVER_SELF_SPECS \
+ ESPF_GCC_PIE_SPEC, \
+ ESPF_GCC_SSP_SPEC
++#define ESPF_EXTRA_SPECS \
++ { "espf_cpp_unique_options", ESPF_CPP_UNIQUE_OPTIONS_SPEC }
+#endif
diff --git a/upstream/config_i386.patch b/upstream/config_i386.patch
index c6632c9..58ceebe 100644
--- a/upstream/config_i386.patch
+++ b/upstream/config_i386.patch
@@ -18,22 +18,41 @@
+#ifdef ENABLE_ESPF
+#define DRIVER_SELF_SPECS ESPF_DRIVER_SELF_SPECS
+#endif
+--- a/gcc/config/i386/gnu-user.h 2011-05-05 14:32:50.000000000 +0200
++++ b/gcc/config/i386/gnu-user.h 2012-07-09 14:28:38.726289455 +0200
+@@ -93,9 +93,16 @@ along with GCC; see the file COPYING3.
+ "--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}}"
+
+ #undef SUBTARGET_EXTRA_SPECS
++#if def ENABLE_ESPF
+ #define SUBTARGET_EXTRA_SPECS \
+ { "link_emulation", GNU_USER_LINK_EMULATION },\
+- { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }, \
++ ESPF_EXTRA_SPECS
++#else
++#define SUBTARGET_EXTRA_SPECS \
++ { "link_emulation", GNU_USER_LINK_EMULATION },\
++ { "dynamic_linker", GNU_USER_DYNAMIC_LINKER }
++#endif
+
+ #undef LINK_SPEC
+ #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
--- a/gcc/config/i386/i386.h 2011-11-24 23:11:12.000000000 +0100
-+++ b/gcc/config/i386/i386.h 2012-07-06 17:30:46.694891067 +0200
-@@ -620,10 +620,17 @@ enum target_cpu_default
- #define SUBTARGET_EXTRA_SPECS
- #endif
++++ b/gcc/config/i386/i386.h 2012-07-09 14:21:24.575276517 +0200
+@@ -617,13 +617,16 @@ enum target_cpu_default
+ Do not define this macro if it does not need to do anything. */
+ #ifndef SUBTARGET_EXTRA_SPECS
+#ifdef ENABLE_ESPF
-+#define ESPF_EXTRA_SPECS \
-+ { "espf_cpp_unique_options", ESPF_CPP_UNIQUE_OPTIONS_SPEC }
++#define SUBTARGET_EXTRA_SPECS ESPF_EXTRA_SPECS
+#else
-+#define ESPF_EXTRA_SPECS { "", "" }
+ #define SUBTARGET_EXTRA_SPECS
+ #endif
+#endif
-+
+
#define EXTRA_SPECS \
{ "cc1_cpu", CC1_CPU_SPEC }, \
-+ ESPF_EXTRA_SPECS, \
SUBTARGET_EXTRA_SPECS
-