mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-11 04:27:44 -05:00
Fix symver build error on non-ELF platforms
The following error is observed on Microblaze [1] build:
error: symver is only supported on ELF platforms
due to using __attribute__((symver)) on non-ELF platform.
[1] http://autobuild.buildroot.net/results/1e9/1e965d83d75615f35308440c5db044314a349357/build-end.log
ac_check_attribute_symver.m4 was downloaded from
https://github.com/smuellerDD/libkcapi/blob/master/m4/ac_check_attribute_symver.m4
This commit is contained in:
parent
b7389e2e2e
commit
d5170e1d0b
3 changed files with 26 additions and 1 deletions
24
m4/ac_check_attribute_symver.m4
Normal file
24
m4/ac_check_attribute_symver.m4
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
dnl Check compiler support for symver function attribute
|
||||
AC_DEFUN([AC_CHECK_ATTRIBUTE_SYMVER], [
|
||||
saved_CFLAGS=$CFLAGS
|
||||
CFLAGS="-O0 -Werror"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[
|
||||
void _test_attribute_symver(void);
|
||||
__attribute__((__symver__("sym@VER_1.2.3"))) void _test_attribute_symver(void) {}
|
||||
]],
|
||||
[[
|
||||
_test_attribute_symver()
|
||||
]]
|
||||
)],
|
||||
[
|
||||
AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 1, [Define to 1 if __attribute__((symver)) is supported])
|
||||
],
|
||||
[
|
||||
AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 0, [Define to 0 if __attribute__((symver)) is not supported])
|
||||
]
|
||||
)
|
||||
CFLAGS=$saved_CFLAGS
|
||||
])
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue