Patchwork [v9,5/5] (temp) FORTIFY_SOURCES hack

login
register
mail settings
Submitter Alon Levy
Date Aug. 20, 2012, 1:26 p.m.
Message ID <1345469181-1708-5-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/178848/
State New
Headers show

Comments

Alon Levy - Aug. 20, 2012, 1:26 p.m.
---
 .gitmodules    | 3 +++
 compiler.h     | 7 +++++++
 spice-protocol | 1 +
 3 files changed, 11 insertions(+)
 create mode 160000 spice-protocol
Blue Swirl - Aug. 20, 2012, 7:49 p.m.
On Mon, Aug 20, 2012 at 1:26 PM, Alon Levy <alevy@redhat.com> wrote:
> ---
>  .gitmodules    | 3 +++
>  compiler.h     | 7 +++++++
>  spice-protocol | 1 +
>  3 files changed, 11 insertions(+)
>  create mode 160000 spice-protocol
>
> diff --git a/.gitmodules b/.gitmodules
> index eca876f..ba6844b 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -19,3 +19,6 @@
>  [submodule "roms/sgabios"]
>         path = roms/sgabios
>         url = git://git.qemu.org/sgabios.git
> +[submodule "spice-protocol"]
> +       path = spice-protocol
> +       url = git://git.freedesktop.org/git/spice/spice-protocol
> diff --git a/compiler.h b/compiler.h
> index 07ba1f8..622aeda 100644
> --- a/compiler.h
> +++ b/compiler.h
> @@ -57,4 +57,11 @@
>  #define GCC_FMT_ATTR(n, m)
>  #endif
>
> +/* Enable compile-time and run-time bounds-checking, and some warnings. */
> +#ifdef __OPTIMIZE__
> +#if __OPTIMIZE__
> +# define _FORTIFY_SOURCE 2
> +#endif
> +#endif

_FORTIFY_SOURCE is already defined by configure:
if test "$debug" = "no" ; then
  CFLAGS="-O2 -D_FORTIFY_SOURCE=2 $CFLAGS"
fi

> +
>  #endif /* COMPILER_H */
> diff --git a/spice-protocol b/spice-protocol
> new file mode 160000
> index 0000000..26cd194
> --- /dev/null
> +++ b/spice-protocol
> @@ -0,0 +1 @@
> +Subproject commit 26cd1946a5c959a53c78fa16f1b3e84a9682121b
> --
> 1.7.11.2
>
>
Alon Levy - Aug. 21, 2012, 9:43 a.m.
> On Mon, Aug 20, 2012 at 1:26 PM, Alon Levy <alevy@redhat.com> wrote:
> > ---
> >  .gitmodules    | 3 +++
> >  compiler.h     | 7 +++++++
> >  spice-protocol | 1 +
> >  3 files changed, 11 insertions(+)
> >  create mode 160000 spice-protocol

I accidentally sent this patch, you can see the "(temp)" in the title.

> >
> > diff --git a/.gitmodules b/.gitmodules
> > index eca876f..ba6844b 100644
> > --- a/.gitmodules
> > +++ b/.gitmodules
> > @@ -19,3 +19,6 @@
> >  [submodule "roms/sgabios"]
> >         path = roms/sgabios
> >         url = git://git.qemu.org/sgabios.git
> > +[submodule "spice-protocol"]
> > +       path = spice-protocol
> > +       url = git://git.freedesktop.org/git/spice/spice-protocol
> > diff --git a/compiler.h b/compiler.h
> > index 07ba1f8..622aeda 100644
> > --- a/compiler.h
> > +++ b/compiler.h
> > @@ -57,4 +57,11 @@
> >  #define GCC_FMT_ATTR(n, m)
> >  #endif
> >
> > +/* Enable compile-time and run-time bounds-checking, and some
> > warnings. */
> > +#ifdef __OPTIMIZE__
> > +#if __OPTIMIZE__
> > +# define _FORTIFY_SOURCE 2
> > +#endif
> > +#endif
> 
> _FORTIFY_SOURCE is already defined by configure:
> if test "$debug" = "no" ; then
>   CFLAGS="-O2 -D_FORTIFY_SOURCE=2 $CFLAGS"
> fi
> 
> > +
> >  #endif /* COMPILER_H */
> > diff --git a/spice-protocol b/spice-protocol
> > new file mode 160000
> > index 0000000..26cd194
> > --- /dev/null
> > +++ b/spice-protocol
> > @@ -0,0 +1 @@
> > +Subproject commit 26cd1946a5c959a53c78fa16f1b3e84a9682121b
> > --
> > 1.7.11.2
> >
> >
> 
>

Patch

diff --git a/.gitmodules b/.gitmodules
index eca876f..ba6844b 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -19,3 +19,6 @@ 
 [submodule "roms/sgabios"]
 	path = roms/sgabios
 	url = git://git.qemu.org/sgabios.git
+[submodule "spice-protocol"]
+	path = spice-protocol
+	url = git://git.freedesktop.org/git/spice/spice-protocol
diff --git a/compiler.h b/compiler.h
index 07ba1f8..622aeda 100644
--- a/compiler.h
+++ b/compiler.h
@@ -57,4 +57,11 @@ 
 #define GCC_FMT_ATTR(n, m)
 #endif
 
+/* Enable compile-time and run-time bounds-checking, and some warnings. */
+#ifdef __OPTIMIZE__
+#if __OPTIMIZE__
+# define _FORTIFY_SOURCE 2
+#endif
+#endif
+
 #endif /* COMPILER_H */
diff --git a/spice-protocol b/spice-protocol
new file mode 160000
index 0000000..26cd194
--- /dev/null
+++ b/spice-protocol
@@ -0,0 +1 @@ 
+Subproject commit 26cd1946a5c959a53c78fa16f1b3e84a9682121b