And renumber the remaining patches.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+++ /dev/null
-Fix build on platforms where __USER_LABEL_PREFIX__ is not empty
-
-On most platforms, a C language symbol and its assembly equivalent are
-identical. However, on the Blackfin architecture, this isn't the case,
-the corresponding C language symbol in assembly is prepended with a
-"_". Blackfin therefore has __USER_LABEL_PREFIX__ defined to "_".
-
-Cairo already has some code to cope with __USER_LABEL_PREFIX__, but
-this code isn't completely correct: it prepends both assembly symbols
-and C symbols with __USER_LABEL_PREFIX__, which cannot work.
-
-This patch fixes that by using the existing slim_hidden_asmname() to
-define assembly symbols, and introduce a new slim_hidden_realname()
-for C symbols.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/src/cairo-compiler-private.h
-===================================================================
---- a/src/cairo-compiler-private.h
-+++ b/src/cairo-compiler-private.h
-@@ -93,12 +93,13 @@
- __asm__ (slim_hidden_asmname (internal))
- # define slim_hidden_def1(name, internal) \
- extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \
-- __attribute__((__alias__(slim_hidden_asmname(internal))))
-+ __attribute__((__alias__(slim_hidden_realname(internal))))
- # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__)
- # define slim_hidden_ulp1(x) slim_hidden_ulp2(x)
- # define slim_hidden_ulp2(x) #x
- # define slim_hidden_asmname(name) slim_hidden_asmname1(name)
- # define slim_hidden_asmname1(name) slim_hidden_ulp #name
-+# define slim_hidden_realname(name) #name
- #else
- # define slim_hidden_proto(name) int _cairo_dummy_prototype(void)
- # define slim_hidden_proto_no_warn(name) int _cairo_dummy_prototype(void)
-Index: b/util/cairo-script/cairo-script-private.h
-===================================================================
---- a/util/cairo-script/cairo-script-private.h
-+++ b/util/cairo-script/cairo-script-private.h
-@@ -109,12 +109,13 @@
- __asm__ (slim_hidden_asmname (internal))
- # define slim_hidden_def1(name, internal) \
- extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \
-- __attribute__((__alias__(slim_hidden_asmname(internal))))
-+ __attribute__((__alias__(slim_hidden_realname(internal))))
- # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__)
- # define slim_hidden_ulp1(x) slim_hidden_ulp2(x)
- # define slim_hidden_ulp2(x) #x
- # define slim_hidden_asmname(name) slim_hidden_asmname1(name)
- # define slim_hidden_asmname1(name) slim_hidden_ulp #name
-+# define slim_hidden_realname(name) #name
- #else
- # define slim_hidden_proto(name) int _csi_dummy_prototype(void)
- # define slim_hidden_proto_no_warn(name) int _csi_dummy_prototype(void)
--- /dev/null
+test: fix build when SHOULD_FORK is false
+
+The code in test/cairo-test-runner.c properly takes into account
+platforms that do have fork() support, and uses the SHOULD_FORK define
+to know whether fork is available or not.
+
+However, this SHOULD_FORK macro is used to guard the inclusion of
+<unistd.h>, which is needed to get the prototype of other functions
+(namely readlink and getppid), that are used in portions of this file
+not guarded by SHOULD_FORK.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/test/cairo-test-runner.c
+===================================================================
+--- a/test/cairo-test-runner.c
++++ b/test/cairo-test-runner.c
+@@ -36,10 +36,10 @@
+ #include <pixman.h> /* for version information */
+
+ #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
+-#if SHOULD_FORK
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#if SHOULD_FORK
+ #if HAVE_SIGNAL_H
+ #include <signal.h>
+ #endif
--- /dev/null
+Fix build with gcc 4.9
+
+cairo fails to build with gcc 4.9 due to a bad interaction of cairo
+modules with the LTO mechanism. The suggested workaround is to pass
+-ffat-lto-objects. See
+https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream
+bug report, and
+https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for
+the ArchLinux bug report.
+
+This patch passes -ffat-lto-objects when gcc understands this option,
+in order to provide compatibility with gcc versions older than 4.8,
+which did not provide this option, but are anyway unaffected by the
+issue.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -37,6 +37,16 @@
+ m4_include(build/configure.ac.pthread) dnl checks for pthreads
+ AC_CACHE_SAVE
+
++old_cflags=$CFLAGS
++CFLAGS=-ffat-lto-objects
++AC_MSG_CHECKING([whether CC supports -ffat-lto-objects])
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
++ [AC_MSG_RESULT([yes])]
++ [LTO_CFLAGS=-ffat-lto-objects],
++ [AC_MSG_RESULT([no])]
++)
++CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}"
++
+ dnl ===========================================================================
+
+ AC_CHECK_LIB(z, compress,
+++ /dev/null
-test: fix build when SHOULD_FORK is false
-
-The code in test/cairo-test-runner.c properly takes into account
-platforms that do have fork() support, and uses the SHOULD_FORK define
-to know whether fork is available or not.
-
-However, this SHOULD_FORK macro is used to guard the inclusion of
-<unistd.h>, which is needed to get the prototype of other functions
-(namely readlink and getppid), that are used in portions of this file
-not guarded by SHOULD_FORK.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/test/cairo-test-runner.c
-===================================================================
---- a/test/cairo-test-runner.c
-+++ b/test/cairo-test-runner.c
-@@ -36,10 +36,10 @@
- #include <pixman.h> /* for version information */
-
- #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
--#if SHOULD_FORK
- #if HAVE_UNISTD_H
- #include <unistd.h>
- #endif
-+#if SHOULD_FORK
- #if HAVE_SIGNAL_H
- #include <signal.h>
- #endif
+++ /dev/null
-Fix build with gcc 4.9
-
-cairo fails to build with gcc 4.9 due to a bad interaction of cairo
-modules with the LTO mechanism. The suggested workaround is to pass
--ffat-lto-objects. See
-https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream
-bug report, and
-https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for
-the ArchLinux bug report.
-
-This patch passes -ffat-lto-objects when gcc understands this option,
-in order to provide compatibility with gcc versions older than 4.8,
-which did not provide this option, but are anyway unaffected by the
-issue.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: b/configure.ac
-===================================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -37,6 +37,16 @@
- m4_include(build/configure.ac.pthread) dnl checks for pthreads
- AC_CACHE_SAVE
-
-+old_cflags=$CFLAGS
-+CFLAGS=-ffat-lto-objects
-+AC_MSG_CHECKING([whether CC supports -ffat-lto-objects])
-+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-+ [AC_MSG_RESULT([yes])]
-+ [LTO_CFLAGS=-ffat-lto-objects],
-+ [AC_MSG_RESULT([no])]
-+)
-+CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}"
-+
- dnl ===========================================================================
-
- AC_CHECK_LIB(z, compress,