libgphoto2/0001-configure-fix-symver-support-checks.patch
Petr Šabata a19eff145d RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/libgphoto2#6dde32f5372e7d616525bf56ffc4763aeef271cf
2020-10-15 16:07:16 +02:00

67 lines
2.0 KiB
Diff

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