forked from linux-nfc/neard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
acinclude.m4
47 lines (44 loc) · 1.2 KB
/
acinclude.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
AC_DEFUN([NEARD_PROG_CC_PIE], [
AC_CACHE_CHECK([whether ${CC-cc} accepts -fPIE], neard_cv_prog_cc_pie, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fPIE -pie -c conftest.c 2>&1`"; then
neard_cv_prog_cc_pie=yes
else
neard_cv_prog_cc_pie=no
fi
rm -rf conftest*
])
])
AC_DEFUN([NEARD_PROG_CC_ASAN], [
AC_CACHE_CHECK([whether ${CC-cc} accepts -fsanitize=address], neard_cv_prog_cc_asan, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fsanitize=address -c conftest.c 2>&1`"; then
neard_cv_prog_cc_asan=yes
else
neard_cv_prog_cc_asan=no
fi
rm -rf conftest*
])
])
AC_DEFUN([NEARD_PROG_CC_LSAN], [
AC_CACHE_CHECK([whether ${CC-cc} accepts -fsanitize=leak], neard_cv_prog_cc_lsan, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fsanitize=leak -c conftest.c 2>&1`"; then
neard_cv_prog_cc_lsan=yes
else
neard_cv_prog_cc_lsan=no
fi
rm -rf conftest*
])
])
AC_DEFUN([NEARD_PROG_CC_UBSAN], [
AC_CACHE_CHECK([whether ${CC-cc} accepts -fsanitize=undefined], neard_cv_prog_cc_ubsan, [
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -fsanitize=undefined -c conftest.c 2>&1`"; then
neard_cv_prog_cc_ubsan=yes
else
neard_cv_prog_cc_ubsan=no
fi
rm -rf conftest*
])
])