diff options
author | Ferenc Wágner <wferi@debian.org> | 2020-07-18 12:35:30 +0200 |
---|---|---|
committer | Ferenc Wágner <wferi@debian.org> | 2020-07-18 16:30:17 +0200 |
commit | be61c7fd7d60f57dcc07e6a7c5d3d49938546b61 (patch) | |
tree | c2b292c36d9dc8ba5640af207fe5d73e8c021ae2 /libgphoto2_port | |
parent | 986c14f36832eee0c28984c0acbdc021227a4f28 (diff) | |
download | libgphoto2-be61c7fd7d60f57dcc07e6a7c5d3d49938546b61.tar.gz |
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.
Diffstat (limited to 'libgphoto2_port')
-rw-r--r-- | libgphoto2_port/configure.ac | 11 |
1 files changed, 6 insertions, 5 deletions
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" |