Re: CVS commit: src/gnu/dist/gcc4/gcc

2011-05-13 Thread Iain Hibbert
On Sat, 7 May 2011, Christos Zoulas wrote:

 Add a no_stack_protector function attribute to localize the effect
 of disabling stack protection on a function-by-function level, as
 opposed to per source file.

how should we enable use of this, is the patch below ok or should it have
additional restrictions? (kernel scope only? __SSP__/__SSP_ALL__?)

also, anybody with FSF privileges prepared to push the gcc addition
upstream?

iain

Index: cdefs.h
===
RCS file: /cvsroot/src/sys/sys/cdefs.h,v
retrieving revision 1.84
diff -u -p -r1.84 cdefs.h
--- cdefs.h 19 Feb 2011 02:21:21 -  1.84
+++ cdefs.h 13 May 2011 07:56:42 -
@@ -266,6 +266,12 @@
 #define__BEGIN_DECLS   __BEGIN_PUBLIC_DECLS
 #define__END_DECLS __END_PUBLIC_DECLS

+#if __GNUC_PREREQ__(4, 1)
+#define__nossp __attribute__((__no_stack_protector__))
+#else
+#define__nossp /* nothing */
+#endif
+
 /*
  * Non-static C99 inline functions are optional bodies.  They don't
  * create global symbols if not used, but can be replaced if desirable.


re: CVS commit: src/gnu/dist/gcc4/gcc/config/rs6000

2011-02-26 Thread matthew green

 Module Name:  src
 Committed By: matt
 Date: Fri Feb 25 22:36:10 UTC 2011
 
 Modified Files:
   src/gnu/dist/gcc4/gcc/config/rs6000: netbsd.h
 
 Log Message:
 Explicitly make sure TARGET_SECURE_PLT is defined correctly rather than
 relying on HAVE_AS_REL16 from auto-host.h.

please add a doc/HACKS entry for this, and perhaps add a comment
to netbsd.h itself that this change should not be sent upstream
or ported back to prior releases.

thanks.


.mrg.