diff options
author | Arnaud Vrac <rawoul@gmail.com> | 2017-08-05 13:58:59 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-08-11 09:58:14 +0200 |
commit | d6d97dad03292c7b4f3d977189ef57188b51bdee (patch) | |
tree | c275fa03f772e5d25d26efcbc0ccd2754fa813ff /configure.ac | |
parent | 7b5fe9b0762a64136a540d8c342c1b99f23508f2 (diff) | |
download | weston-d6d97dad03292c7b4f3d977189ef57188b51bdee.tar.gz weston-d6d97dad03292c7b4f3d977189ef57188b51bdee.tar.bz2 weston-d6d97dad03292c7b4f3d977189ef57188b51bdee.zip |
configure.ac: fix linking when using compiler sanitizers
The GCC address sanitizer overrides dlopen and dlclose, so the configure
test does not detect libdl as a needed dependency for linking. It is
still needed though, as dlsym is not exported by the sanitizer. The
result is that linking fails in the end.
Fix this by checking for dlsym instead of dlopen.
This can be reproduced by configuring the build with:
CFLAGS="-fsanitize=address -fsanitize=undefined"
LDFLAGS="-fsanitize=address -fsanitize=undefined"
Signed-off-by: Arnaud Vrac <rawoul@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index f7ec2c94..1aca3d42 100644 --- a/configure.ac +++ b/configure.ac @@ -86,7 +86,8 @@ AC_ARG_VAR([WESTON_SHELL_CLIENT], PKG_PROG_PKG_CONFIG() -WESTON_SEARCH_LIBS([DLOPEN], [dl], [dlopen]) +# Check for dlsym instead of dlopen because ASAN hijacks the latter +WESTON_SEARCH_LIBS([DL], [dl], [dlsym]) # In old glibc versions (< 2.17) clock_gettime() and clock_getres() are in librt WESTON_SEARCH_LIBS([CLOCK_GETTIME], [rt], [clock_gettime]) |