[packages/crossavr-gcc] - disable -Wformat-security as in native gcc - rel 4

baggins baggins at pld-linux.org
Sat Dec 8 00:01:17 CET 2012


commit 8449b5922e9b02d2263507e9dc53ae9c54a2c52a
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Dec 8 00:00:37 2012 +0100

    - disable -Wformat-security as in native gcc
    - rel 4

 crossavr-gcc.spec     |  14 +++--
 format-security.patch | 161 --------------------------------------------------
 2 files changed, 8 insertions(+), 167 deletions(-)
---
diff --git a/crossavr-gcc.spec b/crossavr-gcc.spec
index 2f01360..fe84950 100644
--- a/crossavr-gcc.spec
+++ b/crossavr-gcc.spec
@@ -1,7 +1,7 @@
 #
-# Conditional build:                                                          
-%bcond_with	bootstrap	# for bootstraping                              
-#                                             
+# Conditional build:
+%bcond_with	bootstrap	# for bootstraping
+#
 Summary:	Cross AVR GNU binary utility development utilities - gcc
 Summary(es.UTF-8):	Utilitarios para desarrollo de binarios de la GNU - AVR gcc
 Summary(fr.UTF-8):	Utilitaires de développement binaire de GNU - AVR gcc
@@ -10,10 +10,9 @@ Summary(pt_BR.UTF-8):	Utilitários para desenvolvimento de binários da GNU - AV
 Summary(tr.UTF-8):	GNU geliştirme araçları - AVR gcc
 Name:		crossavr-gcc
 Version:	4.6.2
-Release:	3
+Release:	4
 Epoch:		1
 Patch1:		gcc-bug51969.patch
-Patch2:		format-security.patch
 # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.0.663.
 Patch100:	200-gcc-libiberty-Makefile.in.patch
 Patch101:	300-gcc-fixedpoint-3-4-2010.patch
@@ -87,6 +86,10 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		gcclib		%{_libdir}/gcc/%{target}/%{version}
 %define		_noautostrip	.*%{gcclib}.*/libgc.*\\.a
 
+# functions with printf format attribute but with special parser and also
+# receiving non constant format strings
+%define		Werror_cflags	%{nil}
+
 %description
 This package contains a cross-gcc which allows the creation of
 binaries to be run on Atmel AVR on other machines.
@@ -115,7 +118,6 @@ Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
 %setup -q -n gcc-%{version}
 cd gcc/config/%{target} && %undos -f c,h && cd -
 %patch1 -p2
-%patch2 -p1
 %patch100 -p0
 %patch101 -p0
 %patch102 -p0
diff --git a/format-security.patch b/format-security.patch
deleted file mode 100644
index f6a7bbe..0000000
--- a/format-security.patch
+++ /dev/null
@@ -1,161 +0,0 @@
---- gcc-4.6.2/libcpp/expr.c~	2011-04-29 00:39:59.000000000 +0200
-+++ gcc-4.6.2/libcpp/expr.c	2012-12-07 22:38:30.102991906 +0100
-@@ -434,9 +434,9 @@
- 		                : N_("use of C99 long long integer constant");
- 
- 	  if (CPP_OPTION (pfile, c99))
--            cpp_warning (pfile, CPP_W_LONG_LONG, message);
-+            cpp_warning (pfile, CPP_W_LONG_LONG, "%s", message);
-           else
--            cpp_pedwarning (pfile, CPP_W_LONG_LONG, message);
-+            cpp_pedwarning (pfile, CPP_W_LONG_LONG, "%s", message);
-         }
- 
-       result |= CPP_N_INTEGER;
---- gcc-4.6.2/libcpp/macro.c~	2010-09-29 16:49:14.000000000 +0200
-+++ gcc-4.6.2/libcpp/macro.c	2012-12-07 22:45:54.119642910 +0100
-@@ -1761,7 +1761,7 @@
- 	     function-like macros, but not at the end.  */
- 	  if (following_paste_op)
- 	    {
--	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+	      cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
- 	      return false;
- 	    }
- 	  break;
-@@ -1774,7 +1774,7 @@
- 	     function-like macros, but not at the beginning.  */
- 	  if (macro->count == 1)
- 	    {
--	      cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
-+	      cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
- 	      return false;
- 	    }
- 
---- gcc-4.6.2/gcc/lto-wrapper.c~	2011-02-01 15:42:08.000000000 +0100
-+++ gcc-4.6.2/gcc/lto-wrapper.c	2012-12-07 22:52:38.609628642 +0100
-@@ -181,10 +181,10 @@
-       if (err != 0)
- 	{
- 	  errno = err;
--	  fatal_perror (errmsg);
-+	  fatal_perror ("%s", errmsg);
- 	}
-       else
--	fatal (errmsg);
-+	fatal ("%s", errmsg);
-     }
- 
-   return pex;
---- gcc-4.6.2/gcc/dwarf2asm.c~	2010-12-04 23:01:32.000000000 +0100
-+++ gcc-4.6.2/gcc/dwarf2asm.c	2012-12-07 23:00:36.922945101 +0100
-@@ -167,7 +167,7 @@
- #ifndef ASM_OUTPUT_DWARF_VMS_DELTA
-   /* VMS Delta is only special on ia64-vms, but this funtion also gets
-      called on alpha-vms so it has to do something sane.  */
--  dw2_asm_output_delta (size, lab1, lab2, comment);
-+  dw2_asm_output_delta (size, lab1, lab2, "%s", comment);
- #else
-   ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2);
-   if (flag_debug_asm && comment)
---- gcc-4.6.2/gcc/dwarf2out.c~	2012-12-07 22:26:41.836350223 +0100
-+++ gcc-4.6.2/gcc/dwarf2out.c	2012-12-07 23:09:09.071038835 +0100
-@@ -11274,7 +11274,7 @@
- 	      }
- 
- 	    dw2_asm_output_data (HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR,
--				 first, name);
-+				 first, "%s", name);
- 	    dw2_asm_output_data (HOST_BITS_PER_WIDE_INT / HOST_BITS_PER_CHAR,
- 				 second, NULL);
- 	  }
---- gcc-4.6.2/gcc/opts.c~	2011-02-17 23:51:57.000000000 +0100
-+++ gcc-4.6.2/gcc/opts.c	2012-12-07 23:15:33.207691953 +0100
-@@ -996,7 +996,7 @@
- 		      if (* (const char **) flag_var != NULL)
- 			snprintf (new_help + strlen (new_help),
- 				  sizeof (new_help) - strlen (new_help),
--				  * (const char **) flag_var);
-+				  "%s", * (const char **) flag_var);
- 		    }
- 		  else if (option->var_type == CLVC_ENUM)
- 		    {
-@@ -1010,7 +1010,7 @@
- 			arg = _("[default]");
- 		      snprintf (new_help + strlen (new_help),
- 				sizeof (new_help) - strlen (new_help),
--				arg);
-+				"%s", arg);
- 		    }
- 		  else
- 		    sprintf (new_help + strlen (new_help),
---- gcc-4.6.2/gcc/tree-sra.c~	2011-10-19 10:45:45.000000000 +0200
-+++ gcc-4.6.2/gcc/tree-sra.c	2012-12-07 23:19:42.351016497 +0100
-@@ -3480,7 +3480,7 @@
- {
-   basic_block bb;
- 
--  fprintf (dump_file, str);
-+  fprintf (dump_file, "%s", str);
-   FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
-     {
-       fprintf (f, "%4i  %i   ", bb->index, bitmap_bit_p (final_bbs, bb->index));
---- gcc-4.6.2/gcc/tree-ssa-uninit.c~	2010-11-30 12:41:24.000000000 +0100
-+++ gcc-4.6.2/gcc/tree-ssa-uninit.c	2012-12-07 23:21:21.597679662 +0100
-@@ -604,7 +604,7 @@
- {
-   size_t i, j;
-   VEC(use_pred_info_t, heap) *one_pred_chain;
--  fprintf (dump_file, msg);
-+  fprintf (dump_file, "%s", msg);
-   print_gimple_stmt (dump_file, usestmt, 0, 0);
-   fprintf (dump_file, "is guarded by :\n");
-   /* do some dumping here:  */
---- gcc-4.6.2/gcc/config/avr/avr.c~	2012-12-07 22:26:44.269683471 +0100
-+++ gcc-4.6.2/gcc/config/avr/avr.c	2012-12-07 23:23:14.087675694 +0100
-@@ -1413,7 +1413,7 @@
-   switch (GET_CODE (addr))
-     {
-     case REG:
--      fprintf (file, ptrreg_to_str (REGNO (addr)));
-+      fprintf (file, "%s", ptrreg_to_str (REGNO (addr)));
-       break;
- 
-     case PRE_DEC:
-@@ -1485,7 +1485,7 @@
-       if (x == zero_reg_rtx)
- 	fprintf (file, "__zero_reg__");
-       else
--	fprintf (file, reg_names[true_regnum (x) + abcd]);
-+	fprintf (file, "%s", reg_names[true_regnum (x) + abcd]);
-     }
-   else if (GET_CODE (x) == CONST_INT)
-     fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) + abcd);
---- gcc-4.6.2/gcc/collect2.c~	2011-01-06 19:50:20.000000000 +0100
-+++ gcc-4.6.2/gcc/collect2.c	2012-12-07 23:25:18.514337971 +0100
-@@ -2086,10 +2086,10 @@
-       if (err != 0)
- 	{
- 	  errno = err;
--	  fatal_perror (errmsg);
-+	  fatal_perror ("%s", errmsg);
- 	}
-       else
--	fatal (errmsg);
-+	fatal ("%s", errmsg);
-     }
- 
-   if (response_arg)
-@@ -2627,10 +2627,10 @@
-       if (err != 0)
- 	{
- 	  errno = err;
--	  fatal_perror (errmsg);
-+	  fatal_perror ("%s", errmsg);
- 	}
-       else
--	fatal (errmsg);
-+	fatal ("%s", errmsg);
-     }
- 
-   int_handler  = (void (*) (int)) signal (SIGINT,  SIG_IGN);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossavr-gcc.git/commitdiff/8449b5922e9b02d2263507e9dc53ae9c54a2c52a



More information about the pld-cvs-commit mailing list