From 007924a6c95fe5468280a92a08d113b8b0d232bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sat, 7 May 2016 04:32:04 +0200 Subject: [PATCH] cairo: reduce stack size footprint for musl --- srcpkgs/cairo/patches/musl-stacksize.patch | 23 ++++++++++++++++++++++ srcpkgs/cairo/template | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/cairo/patches/musl-stacksize.patch diff --git a/srcpkgs/cairo/patches/musl-stacksize.patch b/srcpkgs/cairo/patches/musl-stacksize.patch new file mode 100644 index 00000000000..79142f9fb7a --- /dev/null +++ b/srcpkgs/cairo/patches/musl-stacksize.patch @@ -0,0 +1,23 @@ +Reduce the footprint of stack frame usage by turning +some large(r) structures as `static __thread` instead. + +--- src/cairo-rectangular-scan-converter.c 2015-10-27 22:04:21.000000000 +0100 ++++ src/cairo-rectangular-scan-converter.c 2016-05-07 04:25:26.640851782 +0200 +@@ -489,7 +489,7 @@ + cairo_span_renderer_t *renderer, + rectangle_t **rectangles) + { +- sweep_line_t sweep_line; ++ static __thread sweep_line_t sweep_line; + rectangle_t *start, *stop; + cairo_status_t status; + +@@ -656,7 +656,7 @@ + cairo_span_renderer_t *renderer) + { + cairo_rectangular_scan_converter_t *self = converter; +- rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)]; ++ static __thread rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)]; + rectangle_t **rectangles; + struct _cairo_rectangular_scan_converter_chunk *chunk; + cairo_status_t status; diff --git a/srcpkgs/cairo/template b/srcpkgs/cairo/template index ecb7813c5b2..f624e5e4512 100644 --- a/srcpkgs/cairo/template +++ b/srcpkgs/cairo/template @@ -1,7 +1,7 @@ # Template build file for 'cairo'. pkgname=cairo version=1.14.6 -revision=1 +revision=2 build_style=gnu-configure configure_args="--disable-static --disable-lto --enable-tee $(vopt_if opengl '--enable-gl --enable-egl')