[cairo-commit] 3 commits - meson.build perf/cairo-perf-graph-files.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Oct 28 13:06:38 UTC 2022


 meson.build                   |    2 +-
 perf/cairo-perf-graph-files.c |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 8f1190dc825ad9ca805c39025dcbcb9aed8b496d
Merge: 0a111ad1f 392b2b02f
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Oct 28 13:06:36 2022 +0000

    Merge branch 'remove-explicit-dependency-on-libssp' into 'master'
    
    Remove explicit dependency on libssp
    
    See merge request cairo/cairo!360

commit 392b2b02f71c1dcb1221077e8665466100f558c8
Author: Luca Bacci <luca.bacci982 at gmail.com>
Date:   Fri Oct 14 17:04:37 2022 +0200

    perf: fix compilation on Win32

diff --git a/perf/cairo-perf-graph-files.c b/perf/cairo-perf-graph-files.c
index 1fd99e4ad..ef98da973 100644
--- a/perf/cairo-perf-graph-files.c
+++ b/perf/cairo-perf-graph-files.c
@@ -30,9 +30,12 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <errno.h>
+
+#ifdef G_OS_UNIX
+#include <unistd.h>
 #include <fcntl.h>
+#endif
 
 #include <cairo.h>
 
@@ -232,6 +235,8 @@ show_case_toggled (GtkCellRendererToggle *cell,
     graph_view_update_visible ((GraphView *) app->gv);
 }
 
+#ifdef G_OS_UNIX
+
 static gboolean
 git_read (GIOChannel	   *io,
 	  GIOCondition	    cond,
@@ -300,6 +305,8 @@ do_git (struct _app_data  *app,
     g_io_add_watch (app->git_io, G_IO_IN | G_IO_HUP, (GIOFunc) git_read, app);
 }
 
+#endif
+
 static void
 gv_report_selected (GraphView	     *gv,
 		    int 	      i,
@@ -327,7 +334,11 @@ gv_report_selected (GraphView	     *gv,
 	argv[3] = id;
 	argv[4] = NULL;
 
+#ifdef G_OS_UNIX
 	do_git (app, argv);
+#else
+        g_print ("id: %s\n", id);
+#endif
 	g_free (id);
     }
 }
commit c75220fe089f649a7179520b2969da43d8e0e8b3
Author: Luca Bacci <luca.bacci982 at gmail.com>
Date:   Fri Oct 14 16:28:11 2022 +0200

    Remove explicit dependency on libssp
    
    It's not needed anymore.
    
    Linking explicitly with libssp was required for toolchains where the
    target libc doesn't implement stack smashing protection routines on
    its own, and instead delegates to the generic implementations provided
    by libssp. Notably, this was the case of mingw-w64 toolchains.
    
    After discussion upstream with Meson developers [1], the stance taken
    is that Meson users (and Meson itself) shall have no knowledge of the
    libc internals and whether libssp is required. instead, libc's should
    declare a dependency on the generic libssp on their own by means of
    .spec files [2].
    
    Following the discussion in Meson Github, the issue was then fixed in
    mingw-w64 upstream [3].
    
    References:
     * https://github.com/mesonbuild/meson/issues/10673
     * https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html
     * https://github.com/msys2/MINGW-packages/issues/13401

diff --git a/meson.build b/meson.build
index 970f49a52..180cfacf5 100644
--- a/meson.build
+++ b/meson.build
@@ -69,7 +69,7 @@ if cc.get_id() != 'msvc'
   ]
 
   if get_option('optimization') in ['1', '2', '3']
-    cflags += ['-Wp,-D_FORTIFY_SOURCE=2', '-Wl,-lssp']
+    cflags += '-Wp,-D_FORTIFY_SOURCE=2'
   endif
 
   supported_cflags = cc.get_supported_arguments(cflags)


More information about the cairo-commit mailing list