]> git.pld-linux.org Git - packages/libgphoto2.git/commitdiff
- missing patch auto/th/libgphoto2-2.5.25-1
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 11 Sep 2020 20:50:25 +0000 (22:50 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 11 Sep 2020 20:50:25 +0000 (22:50 +0200)
libgphoto2-configure-fix-symver-support-checks.patch [new file with mode: 0644]

diff --git a/libgphoto2-configure-fix-symver-support-checks.patch b/libgphoto2-configure-fix-symver-support-checks.patch
new file mode 100644 (file)
index 0000000..7455d53
--- /dev/null
@@ -0,0 +1,66 @@
+From be61c7fd7d60f57dcc07e6a7c5d3d49938546b61 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ferenc=20W=C3=A1gner?= <wferi@debian.org>
+Date: Sat, 18 Jul 2020 12:35:30 +0200
+Subject: [PATCH] configure: fix symver support checks
+
+The versioned test symbols must be external, so move them into the
+prologue, otherwise GCC 9.3 (at least) reports "Error: invalid attempt
+to declare external version name as default in symbol `f@@VER2'".
+Also suppress warnings about missing prototypes and return
+statements for these test functions.
+---
+ configure.ac                 | 11 ++++++-----
+ libgphoto2_port/configure.ac | 11 ++++++-----
+ 2 files changed, 12 insertions(+), 10 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f73c81d88..51d1e18b3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -259,13 +259,14 @@ AC_SYS_LARGEFILE
+ AC_MSG_CHECKING([for asm .symver support])
+ AC_COMPILE_IFELSE([dnl
+-      AC_LANG_PROGRAM([[]],[[
+-              int f1() { }
+-              int f2() { }
++      AC_LANG_PROGRAM([[
++              void f1(void);
++              void f1() {}
++              void f2(void);
++              void f2() {}
+               asm(".symver f1, f@VER1");
+               asm(".symver f2, f@@VER2");
+-              int main(int argc, char **argv) { }
+-      ]])dnl
++      ]],[])dnl
+ ],[
+       AC_DEFINE([HAVE_ASM_SYMVERS],1,[Define if there is asm .symver support.])
+       VERSIONMAPLDFLAGS="-Wl,--version-script=\$(srcdir)/libgphoto2.ver"
+diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac
+index 6af8bd914..a8546aa36 100644
+--- a/libgphoto2_port/configure.ac
++++ b/libgphoto2_port/configure.ac
+@@ -165,13 +165,14 @@ AC_CHECK_LIB([regex],[regexec])
+ AC_MSG_CHECKING([for asm .symver support])
+ AC_COMPILE_IFELSE([dnl
+-      AC_LANG_PROGRAM([[]],[[
+-              int f1() { }
+-              int f2() { }
++      AC_LANG_PROGRAM([[
++              void f1(void);
++              void f1() {}
++              void f2(void);
++              void f2() {}
+               asm(".symver f1, f@VER1");
+               asm(".symver f2, f@@VER2");
+-              int main(int argc, char **argv) { }
+-      ]])dnl
++      ]],[])dnl
+ ],[
+       AC_DEFINE([HAVE_ASM_SYMVERS],1,[Define if there is asm .symver support.])
+       VERSIONMAPLDFLAGS="-Wl,--version-script=\$(srcdir)/libgphoto2_port.ver"
+-- 
+2.26.2
+
This page took 0.058655 seconds and 4 git commands to generate.