mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] qt5: extend GCC11 build fix
@ 2021-06-18 18:34 Lucas Stach
  2021-06-18 18:34 ` [ptxdist] [PATCH 2/2] gst-plugins-good1: fix build with GCC11 Lucas Stach
  2021-06-29  5:09 ` [ptxdist] [APPLIED] qt5: extend GCC11 build fix Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Lucas Stach @ 2021-06-18 18:34 UTC (permalink / raw)
  To: ptxdist

One more instance of missing <limits> include has been found while
building with a target GCC11. Extend the last patch to fix this.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 ...8-qtbase-include-limits-where-necessary.patch | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch b/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
index 33138cc3623c..a7b82435a5ed 100644
--- a/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
+++ b/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
@@ -15,7 +15,8 @@ Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
  qtbase/src/corelib/global/qfloat16.h            | 1 +
  qtbase/src/corelib/text/qbytearraymatcher.h     | 2 ++
  qtbase/src/corelib/tools/qoffsetstringarray_p.h | 1 +
- 4 files changed, 6 insertions(+)
+ qtdeclarative/src/3rdparty/masm/yarr/Yarr.h     | 2 ++
+ 5 files changed, 8 insertions(+)
 
 diff --git a/qtbase/src/corelib/global/qendian.h b/qtbase/src/corelib/global/qendian.h
 index 257efbbdbecf..a97776c761b7 100644
@@ -67,3 +68,16 @@ index 4dd9e9603bc1..8b3fbfe55985 100644
  #include <tuple>
  #include <array>
  
+diff --git a/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h b/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
+index ccf78f988000..cd745256e9e1 100644
+--- a/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
++++ b/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
+@@ -27,6 +27,8 @@
+ 
+ #pragma once
+ 
++#include <limits>
++
+ #include <limits.h>
+ #include "YarrErrorCode.h"
+ 
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 2/2] gst-plugins-good1: fix build with GCC11
  2021-06-18 18:34 [ptxdist] [PATCH 1/2] qt5: extend GCC11 build fix Lucas Stach
@ 2021-06-18 18:34 ` Lucas Stach
  2021-06-29  5:09   ` [ptxdist] [APPLIED] " Michael Olbrich
  2021-06-29  5:09 ` [ptxdist] [APPLIED] qt5: extend GCC11 build fix Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2021-06-18 18:34 UTC (permalink / raw)
  To: ptxdist

Building with GCC11 is currently broken as GCC will no longer accept
parameters declared as volatile with atomic operations. Pick the upstream
fix to get rid of this issue.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 ...st-don-t-use-volatile-to-mean-atomic.patch | 311 ++++++++++++++++++
 patches/gst-plugins-good-1.18.4/series        |   4 +
 2 files changed, 315 insertions(+)
 create mode 100644 patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch
 create mode 100644 patches/gst-plugins-good-1.18.4/series

diff --git a/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch b/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch
new file mode 100644
index 000000000000..548f814e0da1
--- /dev/null
+++ b/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch
@@ -0,0 +1,311 @@
+From: Matthew Waters <matthew@centricular.com>
+Date: Thu, 18 Mar 2021 19:52:53 +1100
+Subject: [PATCH] gst: don't use volatile to mean atomic
+
+volatile is not sufficient to provide atomic guarantees and real atomics
+should be used instead.  GCC 11 has started warning about using volatile
+with atomic operations.
+
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
+
+Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911>
+---
+ ext/jack/gstjack.c             |  6 +++---
+ ext/jack/gstjackaudiosink.c    |  2 +-
+ ext/jack/gstjackaudiosrc.c     |  2 +-
+ ext/pulse/pulsesink.h          |  2 +-
+ ext/qt/gstqsgtexture.cc        |  2 +-
+ ext/qt/gstqtglutility.cc       |  2 +-
+ ext/qt/qtglrenderer.cc         |  6 +++---
+ ext/qt/qtitem.cc               |  2 +-
+ ext/qt/qtwindow.cc             |  4 ++--
+ ext/vpx/gstvpxdec.c            |  2 +-
+ ext/vpx/gstvpxenc.c            | 14 +++++++-------
+ gst/audioparsers/gstac3parse.h |  2 +-
+ sys/rpicamsrc/gstrpicamsrc.c   |  2 +-
+ sys/ximage/ximageutil.c        |  2 +-
+ 14 files changed, 25 insertions(+), 25 deletions(-)
+
+diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c
+index ca98dc40592b..fdd507d87207 100644
+--- a/ext/jack/gstjack.c
++++ b/ext/jack/gstjack.c
+@@ -28,7 +28,7 @@
+ GType
+ gst_jack_connect_get_type (void)
+ {
+-  static volatile gsize jack_connect_type = 0;
++  static gsize jack_connect_type = 0;
+ 
+   if (g_once_init_enter (&jack_connect_type)) {
+     static const GEnumValue jack_connect_enums[] = {
+@@ -50,7 +50,7 @@ gst_jack_connect_get_type (void)
+ GType
+ gst_jack_transport_get_type (void)
+ {
+-  static volatile gsize type = 0;
++  static gsize type = 0;
+ 
+   if (g_once_init_enter (&type)) {
+     static const GFlagsValue flag_values[] = {
+@@ -84,7 +84,7 @@ gst_jack_client_free (gpointer jclient)
+ GType
+ gst_jack_client_get_type (void)
+ {
+-  static volatile gsize jack_client_type = 0;
++  static gsize jack_client_type = 0;
+ 
+   if (g_once_init_enter (&jack_client_type)) {
+     /* hackish, but makes it show up nicely in gst-inspect */
+diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
+index ee7cea8c0623..6e8d04ae5b3b 100644
+--- a/ext/jack/gstjackaudiosink.c
++++ b/ext/jack/gstjackaudiosink.c
+@@ -131,7 +131,7 @@ gst_jack_audio_sink_free_channels (GstJackAudioSink * sink)
+ static GType
+ gst_jack_ring_buffer_get_type (void)
+ {
+-  static volatile gsize ringbuffer_type = 0;
++  static gsize ringbuffer_type = 0;
+ 
+   if (g_once_init_enter (&ringbuffer_type)) {
+     static const GTypeInfo ringbuffer_info = {
+diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c
+index 1d2cf82ee6e8..d43a447a76aa 100644
+--- a/ext/jack/gstjackaudiosrc.c
++++ b/ext/jack/gstjackaudiosrc.c
+@@ -151,7 +151,7 @@ gst_jack_audio_src_free_channels (GstJackAudioSrc * src)
+ static GType
+ gst_jack_ring_buffer_get_type (void)
+ {
+-  static volatile gsize ringbuffer_type = 0;
++  static gsize ringbuffer_type = 0;
+ 
+   if (g_once_init_enter (&ringbuffer_type)) {
+     static const GTypeInfo ringbuffer_info = { sizeof (GstJackRingBufferClass),
+diff --git a/ext/pulse/pulsesink.h b/ext/pulse/pulsesink.h
+index 86f3dcdbb751..51ec86a25ad6 100644
+--- a/ext/pulse/pulsesink.h
++++ b/ext/pulse/pulsesink.h
+@@ -72,7 +72,7 @@ struct _GstPulseSink
+   GstStructure *properties;
+   pa_proplist *proplist;
+ 
+-  volatile gint format_lost;
++  gint format_lost;
+   GstClockTime format_lost_time;
+ };
+ 
+diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
+index a05d26edd51d..bfa79cda0fe3 100644
+--- a/ext/qt/gstqsgtexture.cc
++++ b/ext/qt/gstqsgtexture.cc
+@@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ 
+ GstQSGTexture::GstQSGTexture ()
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+ 
+   initializeOpenGLFunctions();
+ 
+diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
+index acb89b6e1e3b..d2c092202bd3 100644
+--- a/ext/qt/gstqtglutility.cc
++++ b/ext/qt/gstqtglutility.cc
+@@ -66,7 +66,7 @@ gst_qt_get_gl_display ()
+ {
+   GstGLDisplay *display = NULL;
+   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
+-  static volatile gsize _debug;
++  static gsize _debug;
+ 
+   g_assert (app != NULL);
+ 
+diff --git a/ext/qt/qtglrenderer.cc b/ext/qt/qtglrenderer.cc
+index 2ad5601fc381..52965fd0bdb9 100644
+--- a/ext/qt/qtglrenderer.cc
++++ b/ext/qt/qtglrenderer.cc
+@@ -22,7 +22,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
+ static void
+ init_debug (void)
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+ 
+   if (g_once_init_enter (&_debug)) {
+     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglrenderer", 0,
+@@ -115,7 +115,7 @@ typedef enum
+ 
+ struct SharedRenderData
+ {
+-  volatile int refcount;
++  int refcount;
+   SharedRenderDataState state;
+   GMutex lock;
+   GCond cond;
+@@ -130,7 +130,7 @@ shared_render_data_new (void)
+ {
+   struct SharedRenderData *ret = g_new0 (struct SharedRenderData, 1);
+ 
+-  ret->refcount = 1;
++  g_atomic_int_set (&ret->refcount, 1);
+   g_mutex_init (&ret->lock);
+ 
+   return ret;
+diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
+index 7659800b6bb8..bc99639b4129 100644
+--- a/ext/qt/qtitem.cc
++++ b/ext/qt/qtitem.cc
+@@ -104,7 +104,7 @@ void InitializeSceneGraph::run()
+ 
+ QtGLVideoItem::QtGLVideoItem()
+ {
+-  static volatile gsize _debug;
++  static gsize _debug;
+ 
+   if (g_once_init_enter (&_debug)) {
+     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
+diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
+index 9360c3337f09..7c44ac54ebfd 100644
+--- a/ext/qt/qtwindow.cc
++++ b/ext/qt/qtwindow.cc
+@@ -103,7 +103,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindow *src ) :
+   QQuickWindow( parent ), source (src)
+ {
+   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
+-  static volatile gsize _debug;
++  static gsize _debug;
+ 
+   g_assert (app != NULL);
+ 
+@@ -152,7 +152,7 @@ QtGLWindow::beforeRendering()
+ 
+   g_mutex_lock (&this->priv->lock);
+ 
+-  static volatile gsize once = 0;
++  static gsize once = 0;
+   if (g_once_init_enter(&once)) {
+     this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
+     g_once_init_leave(&once,1);
+diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c
+index e92aa85c7e10..74cc3c9702a3 100644
+--- a/ext/vpx/gstvpxdec.c
++++ b/ext/vpx/gstvpxdec.c
+@@ -79,7 +79,7 @@ gst_vpx_dec_post_processing_flags_get_type (void)
+     {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+diff --git a/ext/vpx/gstvpxenc.c b/ext/vpx/gstvpxenc.c
+index cd5b30d14dc2..4b3b4f77084f 100644
+--- a/ext/vpx/gstvpxenc.c
++++ b/ext/vpx/gstvpxenc.c
+@@ -165,7 +165,7 @@ gst_vpx_enc_end_usage_get_type (void)
+     {VPX_CQ, "Constant Quality Mode (CQ) mode", "cq"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -188,7 +188,7 @@ gst_vpx_enc_multipass_mode_get_type (void)
+     {VPX_RC_LAST_PASS, "Last pass of multipass encoding", "last-pass"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -210,7 +210,7 @@ gst_vpx_enc_kf_mode_get_type (void)
+     {VPX_KF_DISABLED, "Don't automatically place keyframes", "disabled"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -232,7 +232,7 @@ gst_vpx_enc_tuning_get_type (void)
+     {VP8_TUNE_SSIM, "Tune for SSIM", "ssim"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -256,7 +256,7 @@ gst_vpx_enc_scaling_mode_get_type (void)
+     {VP8E_ONETWO, "1:2", "1:2"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -280,7 +280,7 @@ gst_vpx_enc_token_partitions_get_type (void)
+     {VP8_EIGHT_TOKENPARTITION, "Eight token partitions", "8"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+@@ -303,7 +303,7 @@ gst_vpx_enc_er_flags_get_type (void)
+         "Allow partitions to be decoded independently", "partitions"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+ 
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+diff --git a/gst/audioparsers/gstac3parse.h b/gst/audioparsers/gstac3parse.h
+index 0e7af5acd7e5..81e2104d5e06 100644
+--- a/gst/audioparsers/gstac3parse.h
++++ b/gst/audioparsers/gstac3parse.h
+@@ -62,7 +62,7 @@ struct _GstAc3Parse {
+   gint                  blocks;
+   gboolean              eac;
+   gboolean              sent_codec_tag;
+-  volatile gint         align;
++  gint                  align;
+   GstPadChainFunction   baseparse_chainfunc;
+ };
+ 
+diff --git a/sys/rpicamsrc/gstrpicamsrc.c b/sys/rpicamsrc/gstrpicamsrc.c
+index a148d4106d52..f719acb4ce42 100644
+--- a/sys/rpicamsrc/gstrpicamsrc.c
++++ b/sys/rpicamsrc/gstrpicamsrc.c
+@@ -292,7 +292,7 @@ gst_rpi_cam_src_sensor_mode_get_type (void)
+         "640x480 4:3 60.1-90fps", "640x480-fast"},
+     {0, NULL, NULL}
+   };
+-  static volatile GType id = 0;
++  static GType id = 0;
+   if (g_once_init_enter ((gsize *) & id)) {
+     GType _id;
+     _id = g_enum_register_static ("GstRpiCamSrcSensorMode", values);
+diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c
+index 57c9392c79fa..018b60515601 100644
+--- a/sys/ximage/ximageutil.c
++++ b/sys/ximage/ximageutil.c
+@@ -26,7 +26,7 @@
+ GType
+ gst_meta_ximage_api_get_type (void)
+ {
+-  static volatile GType type;
++  static GType type;
+   static const gchar *tags[] = { "memory", NULL };
+ 
+   if (g_once_init_enter (&type)) {
diff --git a/patches/gst-plugins-good-1.18.4/series b/patches/gst-plugins-good-1.18.4/series
new file mode 100644
index 000000000000..8ec8c07140fa
--- /dev/null
+++ b/patches/gst-plugins-good-1.18.4/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-gst-don-t-use-volatile-to-mean-atomic.patch
+# 4e886ca480d92593b4af01c1f83c6503  - git-ptx-patches magic
-- 
2.29.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] qt5: extend GCC11 build fix
  2021-06-18 18:34 [ptxdist] [PATCH 1/2] qt5: extend GCC11 build fix Lucas Stach
  2021-06-18 18:34 ` [ptxdist] [PATCH 2/2] gst-plugins-good1: fix build with GCC11 Lucas Stach
@ 2021-06-29  5:09 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2021-06-29  5:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Lucas Stach

Thanks, applied as 5e6e844e2161eb3154f95258c81109d0a83dce82.

Michael

[sent from post-receive hook]

On Tue, 29 Jun 2021 07:09:20 +0200, Lucas Stach <l.stach@pengutronix.de> wrote:
> One more instance of missing <limits> include has been found while
> building with a target GCC11. Extend the last patch to fix this.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20210618183455.9037-1-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch b/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
> index 33138cc3623c..a7b82435a5ed 100644
> --- a/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
> +++ b/patches/qt-everywhere-src-5.15.2/0008-qtbase-include-limits-where-necessary.patch
> @@ -15,7 +15,8 @@ Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
>   qtbase/src/corelib/global/qfloat16.h            | 1 +
>   qtbase/src/corelib/text/qbytearraymatcher.h     | 2 ++
>   qtbase/src/corelib/tools/qoffsetstringarray_p.h | 1 +
> - 4 files changed, 6 insertions(+)
> + qtdeclarative/src/3rdparty/masm/yarr/Yarr.h     | 2 ++
> + 5 files changed, 8 insertions(+)
>  
>  diff --git a/qtbase/src/corelib/global/qendian.h b/qtbase/src/corelib/global/qendian.h
>  index 257efbbdbecf..a97776c761b7 100644
> @@ -67,3 +68,16 @@ index 4dd9e9603bc1..8b3fbfe55985 100644
>   #include <tuple>
>   #include <array>
>   
> +diff --git a/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h b/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
> +index ccf78f988000..cd745256e9e1 100644
> +--- a/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
> ++++ b/qtdeclarative/src/3rdparty/masm/yarr/Yarr.h
> +@@ -27,6 +27,8 @@
> + 
> + #pragma once
> + 
> ++#include <limits>
> ++
> + #include <limits.h>
> + #include "YarrErrorCode.h"
> + 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] gst-plugins-good1: fix build with GCC11
  2021-06-18 18:34 ` [ptxdist] [PATCH 2/2] gst-plugins-good1: fix build with GCC11 Lucas Stach
@ 2021-06-29  5:09   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2021-06-29  5:09 UTC (permalink / raw)
  To: ptxdist; +Cc: Lucas Stach

Thanks, applied as 59b2e433e5159e4d9e108434bfe68d8bc0dcd737.

Michael

[sent from post-receive hook]

On Tue, 29 Jun 2021 07:09:21 +0200, Lucas Stach <l.stach@pengutronix.de> wrote:
> Building with GCC11 is currently broken as GCC will no longer accept
> parameters declared as volatile with atomic operations. Pick the upstream
> fix to get rid of this issue.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20210618183455.9037-2-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch b/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch
> new file mode 100644
> index 000000000000..548f814e0da1
> --- /dev/null
> +++ b/patches/gst-plugins-good-1.18.4/0001-gst-don-t-use-volatile-to-mean-atomic.patch
> @@ -0,0 +1,311 @@
> +From: Matthew Waters <matthew@centricular.com>
> +Date: Thu, 18 Mar 2021 19:52:53 +1100
> +Subject: [PATCH] gst: don't use volatile to mean atomic
> +
> +volatile is not sufficient to provide atomic guarantees and real atomics
> +should be used instead.  GCC 11 has started warning about using volatile
> +with atomic operations.
> +
> +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
> +
> +Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
> +
> +Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/911>
> +---
> + ext/jack/gstjack.c             |  6 +++---
> + ext/jack/gstjackaudiosink.c    |  2 +-
> + ext/jack/gstjackaudiosrc.c     |  2 +-
> + ext/pulse/pulsesink.h          |  2 +-
> + ext/qt/gstqsgtexture.cc        |  2 +-
> + ext/qt/gstqtglutility.cc       |  2 +-
> + ext/qt/qtglrenderer.cc         |  6 +++---
> + ext/qt/qtitem.cc               |  2 +-
> + ext/qt/qtwindow.cc             |  4 ++--
> + ext/vpx/gstvpxdec.c            |  2 +-
> + ext/vpx/gstvpxenc.c            | 14 +++++++-------
> + gst/audioparsers/gstac3parse.h |  2 +-
> + sys/rpicamsrc/gstrpicamsrc.c   |  2 +-
> + sys/ximage/ximageutil.c        |  2 +-
> + 14 files changed, 25 insertions(+), 25 deletions(-)
> +
> +diff --git a/ext/jack/gstjack.c b/ext/jack/gstjack.c
> +index ca98dc40592b..fdd507d87207 100644
> +--- a/ext/jack/gstjack.c
> ++++ b/ext/jack/gstjack.c
> +@@ -28,7 +28,7 @@
> + GType
> + gst_jack_connect_get_type (void)
> + {
> +-  static volatile gsize jack_connect_type = 0;
> ++  static gsize jack_connect_type = 0;
> + 
> +   if (g_once_init_enter (&jack_connect_type)) {
> +     static const GEnumValue jack_connect_enums[] = {
> +@@ -50,7 +50,7 @@ gst_jack_connect_get_type (void)
> + GType
> + gst_jack_transport_get_type (void)
> + {
> +-  static volatile gsize type = 0;
> ++  static gsize type = 0;
> + 
> +   if (g_once_init_enter (&type)) {
> +     static const GFlagsValue flag_values[] = {
> +@@ -84,7 +84,7 @@ gst_jack_client_free (gpointer jclient)
> + GType
> + gst_jack_client_get_type (void)
> + {
> +-  static volatile gsize jack_client_type = 0;
> ++  static gsize jack_client_type = 0;
> + 
> +   if (g_once_init_enter (&jack_client_type)) {
> +     /* hackish, but makes it show up nicely in gst-inspect */
> +diff --git a/ext/jack/gstjackaudiosink.c b/ext/jack/gstjackaudiosink.c
> +index ee7cea8c0623..6e8d04ae5b3b 100644
> +--- a/ext/jack/gstjackaudiosink.c
> ++++ b/ext/jack/gstjackaudiosink.c
> +@@ -131,7 +131,7 @@ gst_jack_audio_sink_free_channels (GstJackAudioSink * sink)
> + static GType
> + gst_jack_ring_buffer_get_type (void)
> + {
> +-  static volatile gsize ringbuffer_type = 0;
> ++  static gsize ringbuffer_type = 0;
> + 
> +   if (g_once_init_enter (&ringbuffer_type)) {
> +     static const GTypeInfo ringbuffer_info = {
> +diff --git a/ext/jack/gstjackaudiosrc.c b/ext/jack/gstjackaudiosrc.c
> +index 1d2cf82ee6e8..d43a447a76aa 100644
> +--- a/ext/jack/gstjackaudiosrc.c
> ++++ b/ext/jack/gstjackaudiosrc.c
> +@@ -151,7 +151,7 @@ gst_jack_audio_src_free_channels (GstJackAudioSrc * src)
> + static GType
> + gst_jack_ring_buffer_get_type (void)
> + {
> +-  static volatile gsize ringbuffer_type = 0;
> ++  static gsize ringbuffer_type = 0;
> + 
> +   if (g_once_init_enter (&ringbuffer_type)) {
> +     static const GTypeInfo ringbuffer_info = { sizeof (GstJackRingBufferClass),
> +diff --git a/ext/pulse/pulsesink.h b/ext/pulse/pulsesink.h
> +index 86f3dcdbb751..51ec86a25ad6 100644
> +--- a/ext/pulse/pulsesink.h
> ++++ b/ext/pulse/pulsesink.h
> +@@ -72,7 +72,7 @@ struct _GstPulseSink
> +   GstStructure *properties;
> +   pa_proplist *proplist;
> + 
> +-  volatile gint format_lost;
> ++  gint format_lost;
> +   GstClockTime format_lost_time;
> + };
> + 
> +diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc
> +index a05d26edd51d..bfa79cda0fe3 100644
> +--- a/ext/qt/gstqsgtexture.cc
> ++++ b/ext/qt/gstqsgtexture.cc
> +@@ -35,7 +35,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
> + 
> + GstQSGTexture::GstQSGTexture ()
> + {
> +-  static volatile gsize _debug;
> ++  static gsize _debug;
> + 
> +   initializeOpenGLFunctions();
> + 
> +diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
> +index acb89b6e1e3b..d2c092202bd3 100644
> +--- a/ext/qt/gstqtglutility.cc
> ++++ b/ext/qt/gstqtglutility.cc
> +@@ -66,7 +66,7 @@ gst_qt_get_gl_display ()
> + {
> +   GstGLDisplay *display = NULL;
> +   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
> +-  static volatile gsize _debug;
> ++  static gsize _debug;
> + 
> +   g_assert (app != NULL);
> + 
> +diff --git a/ext/qt/qtglrenderer.cc b/ext/qt/qtglrenderer.cc
> +index 2ad5601fc381..52965fd0bdb9 100644
> +--- a/ext/qt/qtglrenderer.cc
> ++++ b/ext/qt/qtglrenderer.cc
> +@@ -22,7 +22,7 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
> + static void
> + init_debug (void)
> + {
> +-  static volatile gsize _debug;
> ++  static gsize _debug;
> + 
> +   if (g_once_init_enter (&_debug)) {
> +     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglrenderer", 0,
> +@@ -115,7 +115,7 @@ typedef enum
> + 
> + struct SharedRenderData
> + {
> +-  volatile int refcount;
> ++  int refcount;
> +   SharedRenderDataState state;
> +   GMutex lock;
> +   GCond cond;
> +@@ -130,7 +130,7 @@ shared_render_data_new (void)
> + {
> +   struct SharedRenderData *ret = g_new0 (struct SharedRenderData, 1);
> + 
> +-  ret->refcount = 1;
> ++  g_atomic_int_set (&ret->refcount, 1);
> +   g_mutex_init (&ret->lock);
> + 
> +   return ret;
> +diff --git a/ext/qt/qtitem.cc b/ext/qt/qtitem.cc
> +index 7659800b6bb8..bc99639b4129 100644
> +--- a/ext/qt/qtitem.cc
> ++++ b/ext/qt/qtitem.cc
> +@@ -104,7 +104,7 @@ void InitializeSceneGraph::run()
> + 
> + QtGLVideoItem::QtGLVideoItem()
> + {
> +-  static volatile gsize _debug;
> ++  static gsize _debug;
> + 
> +   if (g_once_init_enter (&_debug)) {
> +     GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget");
> +diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc
> +index 9360c3337f09..7c44ac54ebfd 100644
> +--- a/ext/qt/qtwindow.cc
> ++++ b/ext/qt/qtwindow.cc
> +@@ -103,7 +103,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindow *src ) :
> +   QQuickWindow( parent ), source (src)
> + {
> +   QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
> +-  static volatile gsize _debug;
> ++  static gsize _debug;
> + 
> +   g_assert (app != NULL);
> + 
> +@@ -152,7 +152,7 @@ QtGLWindow::beforeRendering()
> + 
> +   g_mutex_lock (&this->priv->lock);
> + 
> +-  static volatile gsize once = 0;
> ++  static gsize once = 0;
> +   if (g_once_init_enter(&once)) {
> +     this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch();
> +     g_once_init_leave(&once,1);
> +diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c
> +index e92aa85c7e10..74cc3c9702a3 100644
> +--- a/ext/vpx/gstvpxdec.c
> ++++ b/ext/vpx/gstvpxdec.c
> +@@ -79,7 +79,7 @@ gst_vpx_dec_post_processing_flags_get_type (void)
> +     {C_FLAGS (VP8_MFQE), "Multi-frame quality enhancement", "mfqe"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +diff --git a/ext/vpx/gstvpxenc.c b/ext/vpx/gstvpxenc.c
> +index cd5b30d14dc2..4b3b4f77084f 100644
> +--- a/ext/vpx/gstvpxenc.c
> ++++ b/ext/vpx/gstvpxenc.c
> +@@ -165,7 +165,7 @@ gst_vpx_enc_end_usage_get_type (void)
> +     {VPX_CQ, "Constant Quality Mode (CQ) mode", "cq"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -188,7 +188,7 @@ gst_vpx_enc_multipass_mode_get_type (void)
> +     {VPX_RC_LAST_PASS, "Last pass of multipass encoding", "last-pass"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -210,7 +210,7 @@ gst_vpx_enc_kf_mode_get_type (void)
> +     {VPX_KF_DISABLED, "Don't automatically place keyframes", "disabled"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -232,7 +232,7 @@ gst_vpx_enc_tuning_get_type (void)
> +     {VP8_TUNE_SSIM, "Tune for SSIM", "ssim"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -256,7 +256,7 @@ gst_vpx_enc_scaling_mode_get_type (void)
> +     {VP8E_ONETWO, "1:2", "1:2"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -280,7 +280,7 @@ gst_vpx_enc_token_partitions_get_type (void)
> +     {VP8_EIGHT_TOKENPARTITION, "Eight token partitions", "8"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +@@ -303,7 +303,7 @@ gst_vpx_enc_er_flags_get_type (void)
> +         "Allow partitions to be decoded independently", "partitions"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> + 
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +diff --git a/gst/audioparsers/gstac3parse.h b/gst/audioparsers/gstac3parse.h
> +index 0e7af5acd7e5..81e2104d5e06 100644
> +--- a/gst/audioparsers/gstac3parse.h
> ++++ b/gst/audioparsers/gstac3parse.h
> +@@ -62,7 +62,7 @@ struct _GstAc3Parse {
> +   gint                  blocks;
> +   gboolean              eac;
> +   gboolean              sent_codec_tag;
> +-  volatile gint         align;
> ++  gint                  align;
> +   GstPadChainFunction   baseparse_chainfunc;
> + };
> + 
> +diff --git a/sys/rpicamsrc/gstrpicamsrc.c b/sys/rpicamsrc/gstrpicamsrc.c
> +index a148d4106d52..f719acb4ce42 100644
> +--- a/sys/rpicamsrc/gstrpicamsrc.c
> ++++ b/sys/rpicamsrc/gstrpicamsrc.c
> +@@ -292,7 +292,7 @@ gst_rpi_cam_src_sensor_mode_get_type (void)
> +         "640x480 4:3 60.1-90fps", "640x480-fast"},
> +     {0, NULL, NULL}
> +   };
> +-  static volatile GType id = 0;
> ++  static GType id = 0;
> +   if (g_once_init_enter ((gsize *) & id)) {
> +     GType _id;
> +     _id = g_enum_register_static ("GstRpiCamSrcSensorMode", values);
> +diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c
> +index 57c9392c79fa..018b60515601 100644
> +--- a/sys/ximage/ximageutil.c
> ++++ b/sys/ximage/ximageutil.c
> +@@ -26,7 +26,7 @@
> + GType
> + gst_meta_ximage_api_get_type (void)
> + {
> +-  static volatile GType type;
> ++  static GType type;
> +   static const gchar *tags[] = { "memory", NULL };
> + 
> +   if (g_once_init_enter (&type)) {
> diff --git a/patches/gst-plugins-good-1.18.4/series b/patches/gst-plugins-good-1.18.4/series
> new file mode 100644
> index 000000000000..8ec8c07140fa
> --- /dev/null
> +++ b/patches/gst-plugins-good-1.18.4/series
> @@ -0,0 +1,4 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +0001-gst-don-t-use-volatile-to-mean-atomic.patch
> +# 4e886ca480d92593b4af01c1f83c6503  - git-ptx-patches magic

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-29  5:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 18:34 [ptxdist] [PATCH 1/2] qt5: extend GCC11 build fix Lucas Stach
2021-06-18 18:34 ` [ptxdist] [PATCH 2/2] gst-plugins-good1: fix build with GCC11 Lucas Stach
2021-06-29  5:09   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-06-29  5:09 ` [ptxdist] [APPLIED] qt5: extend GCC11 build fix Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox